| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #include "SkAdvancedTypefaceMetrics.h" | 9 #include "SkAdvancedTypefaceMetrics.h" |
| 10 #include "SkBase64.h" | 10 #include "SkBase64.h" |
| (...skipping 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1048 #ifndef SK_GDI_ALWAYS_USE_TEXTMETRICS_FOR_FONT_METRICS | 1048 #ifndef SK_GDI_ALWAYS_USE_TEXTMETRICS_FOR_FONT_METRICS |
| 1049 my->fTop = SkIntToScalar(-otm.otmrcFontBox.top); | 1049 my->fTop = SkIntToScalar(-otm.otmrcFontBox.top); |
| 1050 my->fAscent = SkIntToScalar(-otm.otmAscent); | 1050 my->fAscent = SkIntToScalar(-otm.otmAscent); |
| 1051 my->fDescent = SkIntToScalar(-otm.otmDescent); | 1051 my->fDescent = SkIntToScalar(-otm.otmDescent); |
| 1052 my->fBottom = SkIntToScalar(-otm.otmrcFontBox.bottom); | 1052 my->fBottom = SkIntToScalar(-otm.otmrcFontBox.bottom); |
| 1053 my->fLeading = SkIntToScalar(otm.otmLineGap); | 1053 my->fLeading = SkIntToScalar(otm.otmLineGap); |
| 1054 my->fAvgCharWidth = SkIntToScalar(otm.otmTextMetrics.tmAveCharWidth); | 1054 my->fAvgCharWidth = SkIntToScalar(otm.otmTextMetrics.tmAveCharWidth); |
| 1055 my->fMaxCharWidth = SkIntToScalar(otm.otmTextMetrics.tmMaxCharWidth); | 1055 my->fMaxCharWidth = SkIntToScalar(otm.otmTextMetrics.tmMaxCharWidth); |
| 1056 my->fXMin = SkIntToScalar(otm.otmrcFontBox.left); | 1056 my->fXMin = SkIntToScalar(otm.otmrcFontBox.left); |
| 1057 my->fXMax = SkIntToScalar(otm.otmrcFontBox.right); | 1057 my->fXMax = SkIntToScalar(otm.otmrcFontBox.right); |
| 1058 #endif |
| 1059 #ifndef SK_IGNORE_UNDERLINE_POSITION_FIX |
| 1058 my->fUnderlineThickness = SkIntToScalar(otm.otmsUnderscoreSize); | 1060 my->fUnderlineThickness = SkIntToScalar(otm.otmsUnderscoreSize); |
| 1059 my->fUnderlinePosition = -SkIntToScalar(otm.otmsUnderscorePosition); | 1061 my->fUnderlinePosition = -SkIntToScalar(otm.otmsUnderscorePosition); |
| 1060 | 1062 |
| 1061 my->fFlags |= SkPaint::FontMetrics::kUnderlineThinknessIsValid_Flag; | 1063 my->fFlags |= SkPaint::FontMetrics::kUnderlineThinknessIsValid_Flag; |
| 1062 my->fFlags |= SkPaint::FontMetrics::kUnderlinePositionIsValid_Flag; | 1064 my->fFlags |= SkPaint::FontMetrics::kUnderlinePositionIsValid_Flag; |
| 1063 #endif | 1065 #endif |
| 1064 my->fXHeight = SkIntToScalar(otm.otmsXHeight); | 1066 my->fXHeight = SkIntToScalar(otm.otmsXHeight); |
| 1065 | 1067 |
| 1066 GLYPHMETRICS gm; | 1068 GLYPHMETRICS gm; |
| 1067 sk_bzero(&gm, sizeof(gm)); | 1069 sk_bzero(&gm, sizeof(gm)); |
| (...skipping 1547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2615 | 2617 |
| 2616 private: | 2618 private: |
| 2617 SkTDArray<ENUMLOGFONTEX> fLogFontArray; | 2619 SkTDArray<ENUMLOGFONTEX> fLogFontArray; |
| 2618 }; | 2620 }; |
| 2619 | 2621 |
| 2620 /////////////////////////////////////////////////////////////////////////////// | 2622 /////////////////////////////////////////////////////////////////////////////// |
| 2621 | 2623 |
| 2622 SkFontMgr* SkFontMgr_New_GDI() { | 2624 SkFontMgr* SkFontMgr_New_GDI() { |
| 2623 return SkNEW(SkFontMgrGDI); | 2625 return SkNEW(SkFontMgrGDI); |
| 2624 } | 2626 } |
| OLD | NEW |