| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 //#define ENABLE_GLYPH_SPEW // for tracing calls | 80 //#define ENABLE_GLYPH_SPEW // for tracing calls |
| 81 //#define DUMP_STRIKE_CREATION | 81 //#define DUMP_STRIKE_CREATION |
| 82 | 82 |
| 83 //#define SK_GAMMA_APPLY_TO_A8 | 83 //#define SK_GAMMA_APPLY_TO_A8 |
| 84 | 84 |
| 85 using namespace skia_advanced_typeface_metrics_utils; | 85 using namespace skia_advanced_typeface_metrics_utils; |
| 86 | 86 |
| 87 static bool isLCD(const SkScalerContext::Rec& rec) { | 87 static bool isLCD(const SkScalerContext::Rec& rec) { |
| 88 switch (rec.fMaskFormat) { | 88 switch (rec.fMaskFormat) { |
| 89 case SkMask::kLCD16_Format: | 89 case SkMask::kLCD16_Format: |
| 90 case SkMask::kLCD32_Format: | |
| 91 return true; | 90 return true; |
| 92 default: | 91 default: |
| 93 return false; | 92 return false; |
| 94 } | 93 } |
| 95 } | 94 } |
| 96 | 95 |
| 97 ////////////////////////////////////////////////////////////////////////// | 96 ////////////////////////////////////////////////////////////////////////// |
| 98 | 97 |
| 99 struct SkFaceRec; | 98 struct SkFaceRec; |
| 100 | 99 |
| (...skipping 1700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1801 if (style) { | 1800 if (style) { |
| 1802 *style = SkFontStyle(weight, width, slant); | 1801 *style = SkFontStyle(weight, width, slant); |
| 1803 } | 1802 } |
| 1804 if (isFixedPitch) { | 1803 if (isFixedPitch) { |
| 1805 *isFixedPitch = FT_IS_FIXED_WIDTH(face); | 1804 *isFixedPitch = FT_IS_FIXED_WIDTH(face); |
| 1806 } | 1805 } |
| 1807 | 1806 |
| 1808 FT_Done_Face(face); | 1807 FT_Done_Face(face); |
| 1809 return true; | 1808 return true; |
| 1810 } | 1809 } |
| OLD | NEW |