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 "SkBitmap.h" | 10 #include "SkBitmap.h" |
(...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 } |
OLD | NEW |