Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(464)

Side by Side Diff: src/ports/SkFontHost_win.cpp

Issue 271333002: Stage fixes for underline position. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ports/SkFontHost_FreeType.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « src/ports/SkFontHost_FreeType.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698