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

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

Issue 490913003: Revert to old autohinting behavior on Android. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 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
« no previous file with comments | « no previous file | 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 "SkBitmap.h" 10 #include "SkBitmap.h"
(...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after
946 case SkPaint::kNo_Hinting: 946 case SkPaint::kNo_Hinting:
947 loadFlags = FT_LOAD_NO_HINTING; 947 loadFlags = FT_LOAD_NO_HINTING;
948 linearMetrics = true; 948 linearMetrics = true;
949 break; 949 break;
950 case SkPaint::kSlight_Hinting: 950 case SkPaint::kSlight_Hinting:
951 loadFlags = FT_LOAD_TARGET_LIGHT; // This implies FORCE_AUTOHIN T 951 loadFlags = FT_LOAD_TARGET_LIGHT; // This implies FORCE_AUTOHIN T
952 break; 952 break;
953 case SkPaint::kNormal_Hinting: 953 case SkPaint::kNormal_Hinting:
954 if (fRec.fFlags & SkScalerContext::kForceAutohinting_Flag) { 954 if (fRec.fFlags & SkScalerContext::kForceAutohinting_Flag) {
955 loadFlags = FT_LOAD_FORCE_AUTOHINT; 955 loadFlags = FT_LOAD_FORCE_AUTOHINT;
956 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
957 } else {
958 loadFlags = FT_LOAD_NO_AUTOHINT;
959 #endif
956 } 960 }
957 break; 961 break;
958 case SkPaint::kFull_Hinting: 962 case SkPaint::kFull_Hinting:
959 if (fRec.fFlags & SkScalerContext::kForceAutohinting_Flag) { 963 if (fRec.fFlags & SkScalerContext::kForceAutohinting_Flag) {
960 loadFlags = FT_LOAD_FORCE_AUTOHINT; 964 loadFlags = FT_LOAD_FORCE_AUTOHINT;
961 break; 965 break;
962 } 966 }
963 loadFlags = FT_LOAD_TARGET_NORMAL; 967 loadFlags = FT_LOAD_TARGET_NORMAL;
964 if (isLCD(fRec)) { 968 if (isLCD(fRec)) {
965 if (fLCDIsVert) { 969 if (fLCDIsVert) {
(...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after
1720 *style = (SkTypeface::Style) tempStyle; 1724 *style = (SkTypeface::Style) tempStyle;
1721 } 1725 }
1722 if (isFixedPitch) { 1726 if (isFixedPitch) {
1723 *isFixedPitch = FT_IS_FIXED_WIDTH(face); 1727 *isFixedPitch = FT_IS_FIXED_WIDTH(face);
1724 } 1728 }
1725 1729
1726 FT_Done_Face(face); 1730 FT_Done_Face(face);
1727 FT_Done_FreeType(library); 1731 FT_Done_FreeType(library);
1728 return true; 1732 return true;
1729 } 1733 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698