Changeset 219422 in webkit
- Timestamp:
- Jul 12, 2017 1:44:41 PM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r219421 r219422 1 2017-07-12 Alicia Boya García <aboya@igalia.com> 2 3 [FreeType] Enable BCI on webfonts 4 https://bugs.webkit.org/show_bug.cgi?id=174403 5 6 Reviewed by Michael Catanzaro. 7 8 The FreeType BCI hinter used to be disabled on webfonts in favor of 9 the autohinter. 10 11 FreeType BCI hinter has improved considerably in the past and now most 12 other browsers enable it too. Given the old reasons no longer apply, 13 the BCI has now been enabled in order to get better text rendering when 14 embedded hints are available. 15 16 * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp: 17 (WebCore::FontCustomPlatformData::FontCustomPlatformData): 18 1 19 2017-07-12 Commit Queue <commit-queue@webkit.org> 2 20 -
trunk/Source/WebCore/platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp
r206433 r219422 36 36 37 37 FontCustomPlatformData::FontCustomPlatformData(FT_Face freeTypeFace, SharedBuffer& buffer) 38 : m_fontFace(cairo_ft_font_face_create_for_ft_face(freeTypeFace, FT_LOAD_ FORCE_AUTOHINT))38 : m_fontFace(cairo_ft_font_face_create_for_ft_face(freeTypeFace, FT_LOAD_DEFAULT)) 39 39 { 40 // FT_LOAD_FORCE_AUTOHINT prohibits use of the font's native hinting. This41 // is a safe option for custom fonts because (a) some such fonts may have42 // broken hinting, which site admins may not notice if other browsers do not43 // use the native hints, and (b) allowing native hints exposes the FreeType44 // bytecode interpreter to potentially-malicious input. Treating web fonts45 // differently than system fonts is non-ideal, but the result of autohinting46 // is always decent, whereas native hints sometimes look terrible, and47 // unlike system fonts where Fontconfig may change the hinting settings on a48 // per-font basis, the same settings are used for all web fonts. Note that49 // Chrome is considering switching from autohinting to native hinting in50 // https://code.google.com/p/chromium/issues/detail?id=173207 but this is51 // more risk than we want to assume for now. See52 // https://bugs.webkit.org/show_bug.cgi?id=140994 before changing this, and53 // also consider that (a) the fonts' native hints will all be designed to54 // work on Windows, and might not look good at all with FreeType, whereas55 // automatic hints will always look decent, and (b) Fontconfig is not56 // capable of providing any per-font hinting settings for web fonts, unlike57 // for system fonts, so it seems acceptable to treat them differently.58 59 40 buffer.ref(); // This is balanced by the buffer->deref() in releaseCustomFontData. 60 41 static cairo_user_data_key_t bufferKey;
Note: See TracChangeset
for help on using the changeset viewer.