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

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

Issue 139943004: Clarify kAutohinting is kForceAutohinting. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Update all platforms. Created 6 years, 11 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/core/SkScalerContext.h ('k') | src/ports/SkFontHost_mac.cpp » ('j') | 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 "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after
908 } else { 908 } else {
909 switch (fRec.getHinting()) { 909 switch (fRec.getHinting()) {
910 case SkPaint::kNo_Hinting: 910 case SkPaint::kNo_Hinting:
911 loadFlags = FT_LOAD_NO_HINTING; 911 loadFlags = FT_LOAD_NO_HINTING;
912 linearMetrics = true; 912 linearMetrics = true;
913 break; 913 break;
914 case SkPaint::kSlight_Hinting: 914 case SkPaint::kSlight_Hinting:
915 loadFlags = FT_LOAD_TARGET_LIGHT; // This implies FORCE_AUTOHIN T 915 loadFlags = FT_LOAD_TARGET_LIGHT; // This implies FORCE_AUTOHIN T
916 break; 916 break;
917 case SkPaint::kNormal_Hinting: 917 case SkPaint::kNormal_Hinting:
918 if (fRec.fFlags & SkScalerContext::kAutohinting_Flag) 918 if (fRec.fFlags & SkScalerContext::kForceAutohinting_Flag) {
919 loadFlags = FT_LOAD_FORCE_AUTOHINT; 919 loadFlags = FT_LOAD_FORCE_AUTOHINT;
920 else 920 }
921 loadFlags = FT_LOAD_NO_AUTOHINT;
922 break; 921 break;
923 case SkPaint::kFull_Hinting: 922 case SkPaint::kFull_Hinting:
924 if (fRec.fFlags & SkScalerContext::kAutohinting_Flag) { 923 if (fRec.fFlags & SkScalerContext::kForceAutohinting_Flag) {
925 loadFlags = FT_LOAD_FORCE_AUTOHINT; 924 loadFlags = FT_LOAD_FORCE_AUTOHINT;
926 break; 925 break;
927 } 926 }
928 loadFlags = FT_LOAD_TARGET_NORMAL; 927 loadFlags = FT_LOAD_TARGET_NORMAL;
929 if (isLCD(fRec)) { 928 if (isLCD(fRec)) {
930 if (fLCDIsVert) { 929 if (fLCDIsVert) {
931 loadFlags = FT_LOAD_TARGET_LCD_V; 930 loadFlags = FT_LOAD_TARGET_LCD_V;
932 } else { 931 } else {
933 loadFlags = FT_LOAD_TARGET_LCD; 932 loadFlags = FT_LOAD_TARGET_LCD;
934 } 933 }
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after
1678 *style = (SkTypeface::Style) tempStyle; 1677 *style = (SkTypeface::Style) tempStyle;
1679 } 1678 }
1680 if (isFixedPitch) { 1679 if (isFixedPitch) {
1681 *isFixedPitch = FT_IS_FIXED_WIDTH(face); 1680 *isFixedPitch = FT_IS_FIXED_WIDTH(face);
1682 } 1681 }
1683 1682
1684 FT_Done_Face(face); 1683 FT_Done_Face(face);
1685 FT_Done_FreeType(library); 1684 FT_Done_FreeType(library);
1686 return true; 1685 return true;
1687 } 1686 }
OLDNEW
« no previous file with comments | « src/core/SkScalerContext.h ('k') | src/ports/SkFontHost_mac.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698