| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
| 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 | 9 |
| 10 #ifndef SkAdvancedTypefaceMetrics_DEFINED | 10 #ifndef SkAdvancedTypefaceMetrics_DEFINED |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 SK_DECLARE_INST_COUNT(SkAdvancedTypefaceMetrics) | 28 SK_DECLARE_INST_COUNT(SkAdvancedTypefaceMetrics) |
| 29 | 29 |
| 30 SkString fFontName; | 30 SkString fFontName; |
| 31 | 31 |
| 32 enum FontType { | 32 enum FontType { |
| 33 kType1_Font, | 33 kType1_Font, |
| 34 kType1CID_Font, | 34 kType1CID_Font, |
| 35 kCFF_Font, | 35 kCFF_Font, |
| 36 kTrueType_Font, | 36 kTrueType_Font, |
| 37 kOther_Font, | 37 kOther_Font, |
| 38 kNotEmbeddable_Font |
| 38 }; | 39 }; |
| 39 // The type of the underlying font program. This field determines which | 40 // The type of the underlying font program. This field determines which |
| 40 // of the following fields are valid. If it is kOther_Font the per glyph | 41 // of the following fields are valid. If it is kOther_Font or |
| 41 // information will never be populated. | 42 // kNotEmbeddable_Font, the per glyph information will never be populated. |
| 42 FontType fType; | 43 FontType fType; |
| 43 | 44 |
| 44 enum FontFlags { | 45 // fMultiMaster may be true for Type1_Font or CFF_Font. |
| 45 kEmpty_FontFlag = 0x0, //!<No flags set | 46 bool fMultiMaster; |
| 46 kMultiMaster_FontFlag = 0x1, //!<May be true for Type1 or CFF fonts. | |
| 47 kNotEmbeddable_FontFlag = 0x2, //!<May not be embedded. | |
| 48 kNotSubsettable_FontFlag = 0x4, //!<May not be subset. | |
| 49 }; | |
| 50 // Global font flags. | |
| 51 FontFlags fFlags; | |
| 52 | |
| 53 uint16_t fLastGlyphID; // The last valid glyph ID in the font. | 47 uint16_t fLastGlyphID; // The last valid glyph ID in the font. |
| 54 uint16_t fEmSize; // The size of the em box (defines font units). | 48 uint16_t fEmSize; // The size of the em box (defines font units). |
| 55 | 49 |
| 56 // These enum values match the values used in the PDF file format. | 50 // These enum values match the values used in the PDF file format. |
| 57 enum StyleFlags { | 51 enum StyleFlags { |
| 58 kFixedPitch_Style = 0x00001, | 52 kFixedPitch_Style = 0x00001, |
| 59 kSerif_Style = 0x00002, | 53 kSerif_Style = 0x00002, |
| 60 kScript_Style = 0x00008, | 54 kScript_Style = 0x00008, |
| 61 kItalic_Style = 0x00040, | 55 kItalic_Style = 0x00040, |
| 62 kAllCaps_Style = 0x10000, | 56 kAllCaps_Style = 0x10000, |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 SkAdvancedTypefaceMetrics::AdvanceMetric<Data>* getAdvanceData( | 147 SkAdvancedTypefaceMetrics::AdvanceMetric<Data>* getAdvanceData( |
| 154 FontHandle fontHandle, | 148 FontHandle fontHandle, |
| 155 int num_glyphs, | 149 int num_glyphs, |
| 156 const uint32_t* glyphIDs, | 150 const uint32_t* glyphIDs, |
| 157 uint32_t glyphIDsCount, | 151 uint32_t glyphIDsCount, |
| 158 bool (*getAdvance)(FontHandle fontHandle, int gId, Data* data)); | 152 bool (*getAdvance)(FontHandle fontHandle, int gId, Data* data)); |
| 159 | 153 |
| 160 } // namespace skia_advanced_typeface_metrics_utils | 154 } // namespace skia_advanced_typeface_metrics_utils |
| 161 | 155 |
| 162 #endif | 156 #endif |
| OLD | NEW |