|
1 diff --git a/gfx/skia/include/core/SkPostConfig.h b/gfx/skia/include/core/SkPostConfig.h |
|
2 index 0135b85..bb108f8 100644 |
|
3 --- a/gfx/skia/include/core/SkPostConfig.h |
|
4 +++ b/gfx/skia/include/core/SkPostConfig.h |
|
5 @@ -253,7 +253,7 @@ |
|
6 ////////////////////////////////////////////////////////////////////// |
|
7 |
|
8 #ifndef SK_OVERRIDE |
|
9 -#if defined(SK_BUILD_FOR_WIN) |
|
10 +#if defined(_MSC_VER) |
|
11 #define SK_OVERRIDE override |
|
12 #elif defined(__clang__) |
|
13 // Some documentation suggests we should be using __attribute__((override)), |
|
14 diff --git a/gfx/skia/src/ports/SkFontHost_win.cpp b/gfx/skia/src/ports/SkFontHost_win.cpp |
|
15 index dd9c5dc..ca2c3dc 100644 |
|
16 --- a/gfx/skia/src/ports/SkFontHost_win.cpp |
|
17 +++ b/gfx/skia/src/ports/SkFontHost_win.cpp |
|
18 @@ -22,7 +22,7 @@ |
|
19 #ifdef WIN32 |
|
20 #include "windows.h" |
|
21 #include "tchar.h" |
|
22 -#include "Usp10.h" |
|
23 +#include "usp10.h" |
|
24 |
|
25 // always packed xxRRGGBB |
|
26 typedef uint32_t SkGdiRGB; |
|
27 @@ -1033,6 +1033,10 @@ SkAdvancedTypefaceMetrics* SkFontHost::GetAdvancedTypefaceMetrics( |
|
28 HFONT savefont = (HFONT)SelectObject(hdc, font); |
|
29 HFONT designFont = NULL; |
|
30 |
|
31 + const char stem_chars[] = {'i', 'I', '!', '1'}; |
|
32 + int16_t min_width; |
|
33 + unsigned glyphCount; |
|
34 + |
|
35 // To request design units, create a logical font whose height is specified |
|
36 // as unitsPerEm. |
|
37 OUTLINETEXTMETRIC otm; |
|
38 @@ -1046,7 +1050,7 @@ SkAdvancedTypefaceMetrics* SkFontHost::GetAdvancedTypefaceMetrics( |
|
39 if (!GetOutlineTextMetrics(hdc, sizeof(otm), &otm)) { |
|
40 goto Error; |
|
41 } |
|
42 - const unsigned glyphCount = calculateGlyphCount(hdc); |
|
43 + glyphCount = calculateGlyphCount(hdc); |
|
44 |
|
45 info = new SkAdvancedTypefaceMetrics; |
|
46 info->fEmSize = otm.otmEMSquare; |
|
47 @@ -1115,9 +1119,8 @@ SkAdvancedTypefaceMetrics* SkFontHost::GetAdvancedTypefaceMetrics( |
|
48 |
|
49 // Figure out a good guess for StemV - Min width of i, I, !, 1. |
|
50 // This probably isn't very good with an italic font. |
|
51 - int16_t min_width = SHRT_MAX; |
|
52 + min_width = SHRT_MAX; |
|
53 info->fStemV = 0; |
|
54 - char stem_chars[] = {'i', 'I', '!', '1'}; |
|
55 for (size_t i = 0; i < SK_ARRAY_COUNT(stem_chars); i++) { |
|
56 ABC abcWidths; |
|
57 if (GetCharABCWidths(hdc, stem_chars[i], stem_chars[i], &abcWidths)) { |