1 --- qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/skia/src/ports/SkFontHost_FreeType.cpp.orig 2017-10-10 17:42:06.956950985 +0200
2 +++ qtwebengine-opensource-src-5.9.1/src/3rdparty/chromium/third_party/skia/src/ports/SkFontHost_FreeType.cpp 2017-10-10 17:46:05.824187787 +0200
5 : fGetVarDesignCoordinates(nullptr)
7 - , fIsLCDSupported(false)
10 if (FT_New_Library(&gFTMemory, &fLibrary)) {
16 - // Setup LCD filtering. This reduces color fringes for LCD smoothed glyphs.
17 - // The default has changed over time, so this doesn't mean the same thing to all users.
18 - if (FT_Library_SetLcdFilter(fLibrary, FT_LCD_FILTER_DEFAULT) == 0) {
19 - fIsLCDSupported = true;
20 - fLCDExtra = 2; //Using a filter adds one full pixel to each side.
22 + FT_Library_SetLcdFilter(fLibrary, FT_LCD_FILTER_DEFAULT);
29 FT_Library library() { return fLibrary; }
30 - bool isLCDSupported() { return fIsLCDSupported; }
31 - int lcdExtra() { return fLCDExtra; }
33 // FT_Get_{MM,Var}_{Blend,Design}_Coordinates were added in FreeType 2.7.1.
34 // Prior to this there was no way to get the coordinates out of the FT_Face.
39 - bool fIsLCDSupported;
42 // FT_Library_SetLcdFilterWeights was introduced in FreeType 2.4.0.
43 // The following platforms provide FreeType of at least 2.4.0.
45 rec->fTextSize = SkIntToScalar(1 << 14);
49 - // TODO: re-work so that FreeType is set-up and selected by the SkFontMgr.
50 - SkAutoMutexAcquire ama(gFTMutex);
52 - if (!gFTLibrary->isLCDSupported()) {
53 - // If the runtime Freetype library doesn't support LCD, disable it here.
54 - rec->fMaskFormat = SkMask::kA8_Format;
59 SkPaint::Hinting h = rec->getHinting();
60 if (SkPaint::kFull_Hinting == h && !isLCD(*rec)) {
61 // collapse full->normal hinting if we're not doing LCD
62 @@ -1115,11 +1092,11 @@
63 void SkScalerContext_FreeType::updateGlyphIfLCD(SkGlyph* glyph) {
66 - glyph->fHeight += gFTLibrary->lcdExtra();
67 - glyph->fTop -= gFTLibrary->lcdExtra() >> 1;
68 + glyph->fHeight += 2;
71 - glyph->fWidth += gFTLibrary->lcdExtra();
72 - glyph->fLeft -= gFTLibrary->lcdExtra() >> 1;