OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "SkAdvancedTypefaceMetrics.h" | 8 #include "SkAdvancedTypefaceMetrics.h" |
9 #include "SkBitmap.h" | 9 #include "SkBitmap.h" |
10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 #include FT_XFREE86_H | 43 #include FT_XFREE86_H |
44 | 44 |
45 // FT_LOAD_COLOR and the corresponding FT_Pixel_Mode::FT_PIXEL_MODE_BGRA | 45 // FT_LOAD_COLOR and the corresponding FT_Pixel_Mode::FT_PIXEL_MODE_BGRA |
46 // were introduced in FreeType 2.5.0. | 46 // were introduced in FreeType 2.5.0. |
47 // The following may be removed once FreeType 2.5.0 is required to build. | 47 // The following may be removed once FreeType 2.5.0 is required to build. |
48 #ifndef FT_LOAD_COLOR | 48 #ifndef FT_LOAD_COLOR |
49 # define FT_LOAD_COLOR ( 1L << 20 ) | 49 # define FT_LOAD_COLOR ( 1L << 20 ) |
50 # define FT_PIXEL_MODE_BGRA 7 | 50 # define FT_PIXEL_MODE_BGRA 7 |
51 #endif | 51 #endif |
52 | 52 |
53 // FT_HAS_COLOR and the corresponding FT_FACE_FLAG_COLOR | |
54 // were introduced in FreeType 2.5.1 | |
55 // The following may be removed once FreeType 2.5.1 is required to build. | |
56 #ifndef FT_HAS_COLOR | |
57 # define FT_HAS_COLOR(face) false | |
58 #endif | |
59 | |
60 //#define ENABLE_GLYPH_SPEW // for tracing calls | 53 //#define ENABLE_GLYPH_SPEW // for tracing calls |
61 //#define DUMP_STRIKE_CREATION | 54 //#define DUMP_STRIKE_CREATION |
62 //#define SK_FONTHOST_FREETYPE_USE_NORMAL_LCD_FILTER | 55 //#define SK_FONTHOST_FREETYPE_USE_NORMAL_LCD_FILTER |
63 //#define SK_FONTHOST_FREETYPE_RUNTIME_VERSION | 56 //#define SK_FONTHOST_FREETYPE_RUNTIME_VERSION |
64 //#define SK_GAMMA_APPLY_TO_A8 | 57 //#define SK_GAMMA_APPLY_TO_A8 |
65 | 58 |
66 using namespace skia_advanced_typeface_metrics_utils; | 59 using namespace skia_advanced_typeface_metrics_utils; |
67 | 60 |
68 static bool isLCD(const SkScalerContext::Rec& rec) { | 61 static bool isLCD(const SkScalerContext::Rec& rec) { |
69 return SkMask::kLCD16_Format == rec.fMaskFormat; | 62 return SkMask::kLCD16_Format == rec.fMaskFormat; |
(...skipping 1681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1751 (*axes)[i].fTag = ftAxis.tag; | 1744 (*axes)[i].fTag = ftAxis.tag; |
1752 (*axes)[i].fMinimum = ftAxis.minimum; | 1745 (*axes)[i].fMinimum = ftAxis.minimum; |
1753 (*axes)[i].fDefault = ftAxis.def; | 1746 (*axes)[i].fDefault = ftAxis.def; |
1754 (*axes)[i].fMaximum = ftAxis.maximum; | 1747 (*axes)[i].fMaximum = ftAxis.maximum; |
1755 } | 1748 } |
1756 } | 1749 } |
1757 | 1750 |
1758 FT_Done_Face(face); | 1751 FT_Done_Face(face); |
1759 return true; | 1752 return true; |
1760 } | 1753 } |
OLD | NEW |