summaryrefslogtreecommitdiffstats
path: root/gfx/cairo/use-show-text-glyphs-if-glyph-path-fails.patch
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /gfx/cairo/use-show-text-glyphs-if-glyph-path-fails.patch
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'gfx/cairo/use-show-text-glyphs-if-glyph-path-fails.patch')
-rw-r--r--gfx/cairo/use-show-text-glyphs-if-glyph-path-fails.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/gfx/cairo/use-show-text-glyphs-if-glyph-path-fails.patch b/gfx/cairo/use-show-text-glyphs-if-glyph-path-fails.patch
new file mode 100644
index 000000000..1670eaf73
--- /dev/null
+++ b/gfx/cairo/use-show-text-glyphs-if-glyph-path-fails.patch
@@ -0,0 +1,42 @@
+From: Jonathan Kew <jkew@mozilla.com>
+bug 715798 pt 2 - fall back to show_text_glyphs even at huge sizes if scaled_font_glyph_path didn't work. r=jrmuizel
+
+diff --git a/gfx/cairo/cairo/src/cairo-gstate.c b/gfx/cairo/cairo/src/cairo-gstate.c
+--- a/gfx/cairo/cairo/src/cairo-gstate.c
++++ b/gfx/cairo/cairo/src/cairo-gstate.c
+@@ -2002,23 +2002,34 @@ cairo_status_t
+ cairo_path_fixed_t path;
+
+ _cairo_path_fixed_init (&path);
+
+ status = _cairo_scaled_font_glyph_path (gstate->scaled_font,
+ transformed_glyphs, num_glyphs,
+ &path);
+
+- if (status == CAIRO_STATUS_SUCCESS) {
++ if (status == CAIRO_STATUS_SUCCESS && !_cairo_path_fixed_fill_is_empty (&path)) {
+ status = _cairo_surface_fill (gstate->target, op, pattern,
+ &path,
+ CAIRO_FILL_RULE_WINDING,
+ gstate->tolerance,
+ gstate->scaled_font->options.antialias,
+ _gstate_get_clip (gstate, &clip));
++ } else {
++ /* if _cairo_scaled_font_glyph_path() failed, maybe the font doesn't support
++ * returning paths, so try the _cairo_surface_show_text_glyphs() option
++ */
++ status = _cairo_surface_show_text_glyphs (gstate->target, op, pattern,
++ utf8, utf8_len,
++ transformed_glyphs, num_glyphs,
++ transformed_clusters, num_clusters,
++ cluster_flags,
++ gstate->scaled_font,
++ _gstate_get_clip (gstate, &clip));
+ }
+
+ _cairo_path_fixed_fini (&path);
+ }
+
+ _cairo_clip_fini (&clip);
+
+ CLEANUP_GLYPHS: