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 SkPDFFont_DEFINED | 10 #ifndef SkPDFFont_DEFINED |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 bool hasGlyph(uint16_t glyphID); | 104 bool hasGlyph(uint16_t glyphID); |
105 | 105 |
106 /** Convert (in place) the input glyph IDs into the font encoding. If the | 106 /** Convert (in place) the input glyph IDs into the font encoding. If the |
107 * font has more glyphs than can be encoded (like a type 1 font with more | 107 * font has more glyphs than can be encoded (like a type 1 font with more |
108 * than 255 glyphs) this method only converts up to the first out of range | 108 * than 255 glyphs) this method only converts up to the first out of range |
109 * glyph ID. | 109 * glyph ID. |
110 * @param glyphIDs The input text as glyph IDs. | 110 * @param glyphIDs The input text as glyph IDs. |
111 * @param numGlyphs The number of input glyphs. | 111 * @param numGlyphs The number of input glyphs. |
112 * @return Returns the number of glyphs consumed. | 112 * @return Returns the number of glyphs consumed. |
113 */ | 113 */ |
114 size_t glyphsToPDFFontEncoding(uint16_t* glyphIDs, size_t numGlyphs); | 114 int glyphsToPDFFontEncoding(uint16_t* glyphIDs, int numGlyphs); |
115 | 115 |
116 /** Get the font resource for the passed typeface and glyphID. The | 116 /** Get the font resource for the passed typeface and glyphID. The |
117 * reference count of the object is incremented and it is the caller's | 117 * reference count of the object is incremented and it is the caller's |
118 * responsibility to unreference it when done. This is needed to | 118 * responsibility to unreference it when done. This is needed to |
119 * accommodate the weak reference pattern used when the returned object | 119 * accommodate the weak reference pattern used when the returned object |
120 * is new and has no other references. | 120 * is new and has no other references. |
121 * @param typeface The typeface to find. | 121 * @param typeface The typeface to find. |
122 * @param glyphID Specify which section of a large font is of interest. | 122 * @param glyphID Specify which section of a large font is of interest. |
123 */ | 123 */ |
124 static SkPDFFont* GetFontResource(SkTypeface* typeface, | 124 static SkPDFFont* GetFontResource(SkTypeface* typeface, |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 | 196 |
197 SkAdvancedTypefaceMetrics::FontType fFontType; | 197 SkAdvancedTypefaceMetrics::FontType fFontType; |
198 | 198 |
199 // This should be made a hash table if performance is a problem. | 199 // This should be made a hash table if performance is a problem. |
200 static SkTDArray<FontRec>& CanonicalFonts(); | 200 static SkTDArray<FontRec>& CanonicalFonts(); |
201 static SkBaseMutex& CanonicalFontsMutex(); | 201 static SkBaseMutex& CanonicalFontsMutex(); |
202 typedef SkPDFDict INHERITED; | 202 typedef SkPDFDict INHERITED; |
203 }; | 203 }; |
204 | 204 |
205 #endif | 205 #endif |
OLD | NEW |