| 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 | 9 |
| 10 #ifndef SkFontHost_DEFINED | 10 #ifndef SkFontHost_DEFINED |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 id. Passing NULL means all glyphs in the font. | 218 id. Passing NULL means all glyphs in the font. |
| 219 @param glyphIDsCount Number of elements in subsetGlyphIds. Ignored if | 219 @param glyphIDsCount Number of elements in subsetGlyphIds. Ignored if |
| 220 glyphIDs is NULL. | 220 glyphIDs is NULL. |
| 221 */ | 221 */ |
| 222 static SkAdvancedTypefaceMetrics* GetAdvancedTypefaceMetrics( | 222 static SkAdvancedTypefaceMetrics* GetAdvancedTypefaceMetrics( |
| 223 SkFontID fontID, | 223 SkFontID fontID, |
| 224 SkAdvancedTypefaceMetrics::PerGlyphInfo perGlyphInfo, | 224 SkAdvancedTypefaceMetrics::PerGlyphInfo perGlyphInfo, |
| 225 const uint32_t* glyphIDs, | 225 const uint32_t* glyphIDs, |
| 226 uint32_t glyphIDsCount); | 226 uint32_t glyphIDsCount); |
| 227 | 227 |
| 228 /** Return the number of tables in the font | |
| 229 */ | |
| 230 static int CountTables(SkFontID); | |
| 231 | |
| 232 /** Copy into tags[] (allocated by the caller) the list of table tags in | |
| 233 the font, and return the number. This will be the same as CountTables() | |
| 234 or 0 if an error occured. | |
| 235 */ | |
| 236 static int GetTableTags(SkFontID, SkFontTableTag[]); | |
| 237 | |
| 238 /** Given a table tag, return the size of its contents, or 0 if not present | |
| 239 */ | |
| 240 static size_t GetTableSize(SkFontID, SkFontTableTag); | |
| 241 | |
| 242 /** Copy the contents of a table into data (allocated by the caller). Note | |
| 243 that the contents of the table will be in their native endian order | |
| 244 (which for most truetype tables is big endian). If the table tag is | |
| 245 not found, or there is an error copying the data, then 0 is returned. | |
| 246 If this happens, it is possible that some or all of the memory pointed | |
| 247 to by data may have been written to, even though an error has occured. | |
| 248 | |
| 249 @param fontID the font to copy the table from | |
| 250 @param tag The table tag whose contents are to be copied | |
| 251 @param offset The offset in bytes into the table's contents where the | |
| 252 copy should start from. | |
| 253 @param length The number of bytes, starting at offset, of table data | |
| 254 to copy. | |
| 255 @param data storage address where the table contents are copied to | |
| 256 @return the number of bytes actually copied into data. If offset+length | |
| 257 exceeds the table's size, then only the bytes up to the table's | |
| 258 size are actually copied, and this is the value returned. If | |
| 259 offset > the table's size, or tag is not a valid table, | |
| 260 then 0 is returned. | |
| 261 */ | |
| 262 static size_t GetTableData(SkFontID fontID, SkFontTableTag tag, | |
| 263 size_t offset, size_t length, void* data); | |
| 264 | |
| 265 /////////////////////////////////////////////////////////////////////////// | 228 /////////////////////////////////////////////////////////////////////////// |
| 266 | 229 |
| 267 friend class SkTypeface; | 230 friend class SkTypeface; |
| 268 }; | 231 }; |
| 269 | 232 |
| 270 #endif | 233 #endif |
| OLD | NEW |