[webkit-reviews] review granted: [Bug 204671] [GTK] Turn off antialiasing when rendering with Ahem : [Attachment 387726] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jan 15 00:48:11 PST 2020
Carlos Garcia Campos <cgarcia at igalia.com> has granted Carlos Alberto Lopez
Perez <clopez at igalia.com>'s request for review:
Bug 204671: [GTK] Turn off antialiasing when rendering with Ahem
https://bugs.webkit.org/show_bug.cgi?id=204671
Attachment 387726: Patch
https://bugs.webkit.org/attachment.cgi?id=387726&action=review
--- Comment #2 from Carlos Garcia Campos <cgarcia at igalia.com> ---
Comment on attachment 387726
--> https://bugs.webkit.org/attachment.cgi?id=387726
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=387726&action=review
> Source/WebCore/ChangeLog:11
> + the glyps causes small pixel differences with the reference test.
glyps -> glyphs
> Source/WebCore/platform/graphics/freetype/SimpleFontDataFreeType.cpp:139
> + FcChar8* fontConfigFamilyName;
> + FcPatternGetString(m_platformData.fcPattern(), FC_FAMILY, 0,
&fontConfigFamilyName);
> + String familyName =
String::fromUTF8(reinterpret_cast<char*>(fontConfigFamilyName));
> + // Disable antialiasing for the Ahem font because many tests require
this.
> + if (equalIgnoringASCIICase(familyName, "Ahem"))
> + m_allowsAntialiasing = false;
This doesn't work for web fonts, because FC_FAMILY is not set. You need to set
the family name in FontCustomPlatformData::fontPlatformData(). Since we are
always going to modify the pattern now, we can modify
defaultFontconfigOptions() to return a RefPtr with the static pattern
duplicated. Then you can get the family name from the FC face directly
(freeTypeFace->family_name) and set it in the pattern with FcPatternAddString
More information about the webkit-reviews
mailing list