| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
| 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 | 8 |
| 9 #ifndef SkPDFFont_DEFINED | 9 #ifndef SkPDFFont_DEFINED |
| 10 #define SkPDFFont_DEFINED | 10 #define SkPDFFont_DEFINED |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 const SkAdvancedTypefaceMetrics* fontInfo(); | 166 const SkAdvancedTypefaceMetrics* fontInfo(); |
| 167 void setFontInfo(const SkAdvancedTypefaceMetrics* info); | 167 void setFontInfo(const SkAdvancedTypefaceMetrics* info); |
| 168 uint16_t firstGlyphID() const; | 168 uint16_t firstGlyphID() const; |
| 169 uint16_t lastGlyphID() const; | 169 uint16_t lastGlyphID() const; |
| 170 void setLastGlyphID(uint16_t glyphID); | 170 void setLastGlyphID(uint16_t glyphID); |
| 171 | 171 |
| 172 // Accessors for FontDescriptor associated with this object. | 172 // Accessors for FontDescriptor associated with this object. |
| 173 SkPDFDict* getFontDescriptor(); | 173 SkPDFDict* getFontDescriptor(); |
| 174 void setFontDescriptor(SkPDFDict* descriptor); | 174 void setFontDescriptor(SkPDFDict* descriptor); |
| 175 | 175 |
| 176 // Add common entries to FontDescriptor. | |
| 177 bool addCommonFontDescriptorEntries(int16_t defaultWidth); | |
| 178 | |
| 179 /** Set fFirstGlyphID and fLastGlyphID to span at most 255 glyphs, | 176 /** Set fFirstGlyphID and fLastGlyphID to span at most 255 glyphs, |
| 180 * including the passed glyphID. | 177 * including the passed glyphID. |
| 181 */ | 178 */ |
| 182 void adjustGlyphRangeForSingleByteEncoding(uint16_t glyphID); | 179 void adjustGlyphRangeForSingleByteEncoding(uint16_t glyphID); |
| 183 | 180 |
| 184 // Generate ToUnicode table according to glyph usage subset. | 181 // Generate ToUnicode table according to glyph usage subset. |
| 185 // If subset is nullptr, all available glyph ids will be used. | 182 // If subset is nullptr, all available glyph ids will be used. |
| 186 void populateToUnicodeTable(const SkPDFGlyphSet* subset); | 183 void populateToUnicodeTable(const SkPDFGlyphSet* subset); |
| 187 | 184 |
| 188 // Create instances of derived types based on fontInfo. | 185 // Create instances of derived types based on fontInfo. |
| (...skipping 16 matching lines...) Expand all Loading... |
| 205 uint16_t fLastGlyphID; | 202 uint16_t fLastGlyphID; |
| 206 sk_sp<const SkAdvancedTypefaceMetrics> fFontInfo; | 203 sk_sp<const SkAdvancedTypefaceMetrics> fFontInfo; |
| 207 sk_sp<SkPDFDict> fDescriptor; | 204 sk_sp<SkPDFDict> fDescriptor; |
| 208 | 205 |
| 209 SkAdvancedTypefaceMetrics::FontType fFontType; | 206 SkAdvancedTypefaceMetrics::FontType fFontType; |
| 210 | 207 |
| 211 typedef SkPDFDict INHERITED; | 208 typedef SkPDFDict INHERITED; |
| 212 }; | 209 }; |
| 213 | 210 |
| 214 #endif | 211 #endif |
| OLD | NEW |