зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset d679ac3a8de0 (Bug 445087. Add extra pixel on each side of the glyph's black box returned by GetGlyphOutlineW, to avoid clipping ClearType pixels. r=vlad) to fix orange.
This commit is contained in:
Родитель
ae69de7018
Коммит
7f4fa9f3fc
|
@ -44,8 +44,6 @@ glyph-safety-margin.patch: Change the glyph dropping safety margin from 2em to 1
|
|||
|
||||
win32-vertically-offset-glyph.patch: bug 454098; vertical positioning errors when drawing glyph runs including delta-y offsets on screen via GDI
|
||||
|
||||
win32-cleartype-clipping.patch: bug 445087; some glyphs are clipped, mainly on right-hand edge, when ClearType is enabled and drawing to RGBA canvas
|
||||
|
||||
==== pixman patches ====
|
||||
|
||||
endian.patch: include cairo-platform.h for endian macros
|
||||
|
|
|
@ -986,16 +986,6 @@ _cairo_win32_scaled_font_init_glyph_metrics (cairo_win32_scaled_font_t *scaled_f
|
|||
&metrics, 0, NULL, &matrix) == GDI_ERROR) {
|
||||
status = _cairo_win32_print_gdi_error ("_cairo_win32_scaled_font_init_glyph_metrics:GetGlyphOutlineW");
|
||||
memset (&metrics, 0, sizeof (GLYPHMETRICS));
|
||||
} else {
|
||||
/* The bounding box reported by Windows supposedly contains the glyph's "black" area;
|
||||
* however, antialiasing (especially with ClearType) means that the actual image that
|
||||
* needs to be rendered may "bleed" into the adjacent pixels, mainly on the right side.
|
||||
* To avoid clipping the glyphs when drawn by _cairo_surface_fallback_show_glyphs,
|
||||
* therefore, we add a pixel of "slop" to left side of the nominal "black" area,
|
||||
* and two pixels to the right (as tests show some glyphs bleed into this column).
|
||||
*/
|
||||
metrics.gmptGlyphOrigin.x -= 1;
|
||||
metrics.gmBlackBoxX += 3;
|
||||
}
|
||||
cairo_win32_scaled_font_done_font (&scaled_font->base);
|
||||
if (status)
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
diff --git a/gfx/cairo/cairo/src/cairo-win32-font.c b/gfx/cairo/cairo/src/cairo-win32-font.c
|
||||
--- a/gfx/cairo/cairo/src/cairo-win32-font.c
|
||||
+++ b/gfx/cairo/cairo/src/cairo-win32-font.c
|
||||
@@ -986,6 +986,16 @@ _cairo_win32_scaled_font_init_glyph_metr
|
||||
&metrics, 0, NULL, &matrix) == GDI_ERROR) {
|
||||
status = _cairo_win32_print_gdi_error ("_cairo_win32_scaled_font_init_glyph_metrics:GetGlyphOutlineW");
|
||||
memset (&metrics, 0, sizeof (GLYPHMETRICS));
|
||||
+ } else {
|
||||
+ /* The bounding box reported by Windows supposedly contains the glyph's "black" area;
|
||||
+ * however, antialiasing (especially with ClearType) means that the actual image that
|
||||
+ * needs to be rendered may "bleed" into the adjacent pixels, mainly on the right side.
|
||||
+ * To avoid clipping the glyphs when drawn by _cairo_surface_fallback_show_glyphs,
|
||||
+ * therefore, we add a pixel of "slop" to left side of the nominal "black" area,
|
||||
+ * and two pixels to the right (as tests show some glyphs bleed into this column).
|
||||
+ */
|
||||
+ metrics.gmptGlyphOrigin.x -= 1;
|
||||
+ metrics.gmBlackBoxX += 3;
|
||||
}
|
||||
cairo_win32_scaled_font_done_font (&scaled_font->base);
|
||||
if (status)
|
Загрузка…
Ссылка в новой задаче