SkTypeface.h revision fed86bdb8b9f037439bbfa7cdbd53a581dbc5985
1ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976eepoger@google.com 28a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com/* 3ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976eepoger@google.com * Copyright 2006 The Android Open Source Project 48a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com * 5ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976eepoger@google.com * Use of this source code is governed by a BSD-style license that can be 6ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976eepoger@google.com * found in the LICENSE file. 78a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com */ 88a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com 9ec3ed6a5ebf6f2c406d7bcf94b6bc34fcaeb976eepoger@google.com 108a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com#ifndef SkTypeface_DEFINED 118a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com#define SkTypeface_DEFINED 128a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com 13325cb9aa17b94258b362082eb3a799524f4345f3vandebo@chromium.org#include "SkAdvancedTypefaceMetrics.h" 14a02bc1519cf49afa31fb38bed097dd5014880d04bungeman@google.com#include "SkWeakRefCnt.h" 158a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com 16dc09f07671145b21c83de7153c9c9b950c871f1amike@reedtribe.orgclass SkDescriptor; 17dc09f07671145b21c83de7153c9c9b950c871f1amike@reedtribe.orgclass SkFontDescriptor; 18dc09f07671145b21c83de7153c9c9b950c871f1amike@reedtribe.orgclass SkScalerContext; 19dc09f07671145b21c83de7153c9c9b950c871f1amike@reedtribe.orgstruct SkScalerContextRec; 208a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.comclass SkStream; 21c48b2b330f8bf0e01381e27ca36f48ef5c7d8d5fvandebo@chromium.orgclass SkAdvancedTypefaceMetrics; 228a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.comclass SkWStream; 238a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com 242f3dc9dc4c970bd066be329a842a791d91f524e2reed@google.comtypedef uint32_t SkFontID; 25f11508d7f4aae52739b9c4f3bb2da2fd78fa23d9reed@google.comtypedef uint32_t SkFontTableTag; 262f3dc9dc4c970bd066be329a842a791d91f524e2reed@google.com 278a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com/** \class SkTypeface 288a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com 298a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com The SkTypeface class specifies the typeface and intrinsic style of a font. 308a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com This is used in the paint, along with optionally algorithmic settings like 318a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com textSize, textSkewX, textScaleX, kFakeBoldText_Mask, to specify 328a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com how text appears when drawn (and measured). 338a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com 34069b827f8e4f8ca212548719db64983a69b8dc25reed@android.com Typeface objects are immutable, and so they can be shared between threads. 358a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com*/ 36a02bc1519cf49afa31fb38bed097dd5014880d04bungeman@google.comclass SK_API SkTypeface : public SkWeakRefCnt { 378a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.compublic: 38fcb57b5570ec8b3176d4025d4c44d145591f819creed@google.com SK_DECLARE_INST_COUNT(SkTypeface) 39fcb57b5570ec8b3176d4025d4c44d145591f819creed@google.com 408a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com /** Style specifies the intrinsic style attributes of a given typeface 418a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com */ 428a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com enum Style { 438a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com kNormal = 0, 448a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com kBold = 0x01, 458a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com kItalic = 0x02, 468a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com 478a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com // helpers 488a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com kBoldItalic = 0x03 498a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com }; 508a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com 518a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com /** Returns the typeface's intrinsic style attributes 528a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com */ 538a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com Style style() const { return fStyle; } 548a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com 558a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com /** Returns true if getStyle() has the kBold bit set. 568a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com */ 578a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com bool isBold() const { return (fStyle & kBold) != 0; } 588a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com 598a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com /** Returns true if getStyle() has the kItalic bit set. 608a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com */ 618a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com bool isItalic() const { return (fStyle & kItalic) != 0; } 625b31b0f1eaca0cdc3aa5697e8efa1baf68b0774ereed@google.com 63875b4ecef79fd61f7d23260928638bcca4133751reed@google.com /** Returns true if the typeface is fixed-width 64875b4ecef79fd61f7d23260928638bcca4133751reed@google.com */ 65875b4ecef79fd61f7d23260928638bcca4133751reed@google.com bool isFixedWidth() const { return fIsFixedWidth; } 66875b4ecef79fd61f7d23260928638bcca4133751reed@google.com 67ef772ddb86e9ab5e7e2811c67ed75a24f3ce0e5ereed@android.com /** Return a 32bit value for this typeface, unique for the underlying font 68ef772ddb86e9ab5e7e2811c67ed75a24f3ce0e5ereed@android.com data. Will never return 0. 69ef772ddb86e9ab5e7e2811c67ed75a24f3ce0e5ereed@android.com */ 702f3dc9dc4c970bd066be329a842a791d91f524e2reed@google.com SkFontID uniqueID() const { return fUniqueID; } 71fbfcd5602128ec010c82cb733c9cdc0a3254f9f3rmistry@google.com 728a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com /** Return the uniqueID for the specified typeface. If the face is null, 73b1d9d2ef2803bd55fdc886d13033b48f8450dd14reed@android.com resolve it to the default font and return its uniqueID. Will never 74b1d9d2ef2803bd55fdc886d13033b48f8450dd14reed@android.com return 0. 758a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com */ 762f3dc9dc4c970bd066be329a842a791d91f524e2reed@google.com static SkFontID UniqueID(const SkTypeface* face); 778a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com 78ef772ddb86e9ab5e7e2811c67ed75a24f3ce0e5ereed@android.com /** Returns true if the two typefaces reference the same underlying font, 79ef772ddb86e9ab5e7e2811c67ed75a24f3ce0e5ereed@android.com handling either being null (treating null as the default font) 80ef772ddb86e9ab5e7e2811c67ed75a24f3ce0e5ereed@android.com */ 81ef772ddb86e9ab5e7e2811c67ed75a24f3ce0e5ereed@android.com static bool Equal(const SkTypeface* facea, const SkTypeface* faceb); 825b31b0f1eaca0cdc3aa5697e8efa1baf68b0774ereed@google.com 83fed86bdb8b9f037439bbfa7cdbd53a581dbc5985reed@google.com /** 84fed86bdb8b9f037439bbfa7cdbd53a581dbc5985reed@google.com * Returns a ref() to the default typeface. The caller must call unref() 85fed86bdb8b9f037439bbfa7cdbd53a581dbc5985reed@google.com * when they are done referencing the object. Never returns NULL. 86fed86bdb8b9f037439bbfa7cdbd53a581dbc5985reed@google.com */ 87fed86bdb8b9f037439bbfa7cdbd53a581dbc5985reed@google.com static SkTypeface* RefDefault(); 88fed86bdb8b9f037439bbfa7cdbd53a581dbc5985reed@google.com 898a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com /** Return a new reference to the typeface that most closely matches the 908a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com requested familyName and style. Pass null as the familyName to return 918a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com the default font for the requested style. Will never return null 925b31b0f1eaca0cdc3aa5697e8efa1baf68b0774ereed@google.com 938a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com @param familyName May be NULL. The name of the font family. 948a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com @param style The style (normal, bold, italic) of the typeface. 958a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com @return reference to the closest-matching typeface. Call must call 968a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com unref() when they are done. 978a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com */ 98069b827f8e4f8ca212548719db64983a69b8dc25reed@android.com static SkTypeface* CreateFromName(const char familyName[], Style style); 998a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com 1008a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com /** Return a new reference to the typeface that most closely matches the 1018a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com requested typeface and specified Style. Use this call if you want to 1028a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com pick a new style from the same family of the existing typeface. 1038a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com If family is NULL, this selects from the default font's family. 1045b31b0f1eaca0cdc3aa5697e8efa1baf68b0774ereed@google.com 1058a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com @param family May be NULL. The name of the existing type face. 1068a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com @param s The style (normal, bold, italic) of the type face. 1078a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com @return reference to the closest-matching typeface. Call must call 1088a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com unref() when they are done. 1098a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com */ 1108a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com static SkTypeface* CreateFromTypeface(const SkTypeface* family, Style s); 1118a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com 1128a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com /** Return a new typeface given a file. If the file does not exist, or is 1138a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com not a valid font file, returns null. 1148a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com */ 1158a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com static SkTypeface* CreateFromFile(const char path[]); 1165b31b0f1eaca0cdc3aa5697e8efa1baf68b0774ereed@google.com 1178a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com /** Return a new typeface given a stream. If the stream is 1188a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com not a valid font file, returns null. Ownership of the stream is 1198a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com transferred, so the caller must not reference it again. 1208a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com */ 1218a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com static SkTypeface* CreateFromStream(SkStream* stream); 1228a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com 12362533ed6bb490e9abf5d02686d897a93c5e85d51reed@android.com /** Write a unique signature to a stream, sufficient to reconstruct a 12462533ed6bb490e9abf5d02686d897a93c5e85d51reed@android.com typeface referencing the same font when Deserialize is called. 12562533ed6bb490e9abf5d02686d897a93c5e85d51reed@android.com */ 1268a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com void serialize(SkWStream*) const; 1275b31b0f1eaca0cdc3aa5697e8efa1baf68b0774ereed@google.com 12862533ed6bb490e9abf5d02686d897a93c5e85d51reed@android.com /** Given the data previously written by serialize(), return a new instance 12962533ed6bb490e9abf5d02686d897a93c5e85d51reed@android.com to a typeface referring to the same font. If that font is not available, 13062533ed6bb490e9abf5d02686d897a93c5e85d51reed@android.com return null. If an instance is returned, the caller is responsible for 13162533ed6bb490e9abf5d02686d897a93c5e85d51reed@android.com calling unref() when they are done with it. 13262533ed6bb490e9abf5d02686d897a93c5e85d51reed@android.com */ 1338a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com static SkTypeface* Deserialize(SkStream*); 1348a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com 135c48b2b330f8bf0e01381e27ca36f48ef5c7d8d5fvandebo@chromium.org /** Retrieve detailed typeface metrics. Used by the PDF backend. 136325cb9aa17b94258b362082eb3a799524f4345f3vandebo@chromium.org @param perGlyphInfo Indicate what glyph specific information (advances, 137325cb9aa17b94258b362082eb3a799524f4345f3vandebo@chromium.org names, etc.) should be populated. 13837ad8fb72ff1b3faac93b01ead2c79e1a06fc172vandebo@chromium.org @param glyphIDs For per-glyph info, specify subset of the font by 13937ad8fb72ff1b3faac93b01ead2c79e1a06fc172vandebo@chromium.org giving glyph ids. Each integer represents a glyph 14037ad8fb72ff1b3faac93b01ead2c79e1a06fc172vandebo@chromium.org id. Passing NULL means all glyphs in the font. 14137ad8fb72ff1b3faac93b01ead2c79e1a06fc172vandebo@chromium.org @param glyphIDsCount Number of elements in subsetGlyphIds. Ignored if 14237ad8fb72ff1b3faac93b01ead2c79e1a06fc172vandebo@chromium.org glyphIDs is NULL. 143c48b2b330f8bf0e01381e27ca36f48ef5c7d8d5fvandebo@chromium.org @return The returned object has already been referenced. 1442a22e10ab2946c5590cd2a258427ce3ccfca9bfavandebo@chromium.org */ 145c48b2b330f8bf0e01381e27ca36f48ef5c7d8d5fvandebo@chromium.org SkAdvancedTypefaceMetrics* getAdvancedTypefaceMetrics( 14637ad8fb72ff1b3faac93b01ead2c79e1a06fc172vandebo@chromium.org SkAdvancedTypefaceMetrics::PerGlyphInfo perGlyphInfo, 14737ad8fb72ff1b3faac93b01ead2c79e1a06fc172vandebo@chromium.org const uint32_t* glyphIDs = NULL, 14837ad8fb72ff1b3faac93b01ead2c79e1a06fc172vandebo@chromium.org uint32_t glyphIDsCount = 0) const; 149325cb9aa17b94258b362082eb3a799524f4345f3vandebo@chromium.org 150f11508d7f4aae52739b9c4f3bb2da2fd78fa23d9reed@google.com // Table getters -- may fail if the underlying font format is not organized 151f11508d7f4aae52739b9c4f3bb2da2fd78fa23d9reed@google.com // as 4-byte tables. 152f11508d7f4aae52739b9c4f3bb2da2fd78fa23d9reed@google.com 153f11508d7f4aae52739b9c4f3bb2da2fd78fa23d9reed@google.com /** Return the number of tables in the font. */ 154f11508d7f4aae52739b9c4f3bb2da2fd78fa23d9reed@google.com int countTables() const; 155fbfcd5602128ec010c82cb733c9cdc0a3254f9f3rmistry@google.com 156f11508d7f4aae52739b9c4f3bb2da2fd78fa23d9reed@google.com /** Copy into tags[] (allocated by the caller) the list of table tags in 157f11508d7f4aae52739b9c4f3bb2da2fd78fa23d9reed@google.com * the font, and return the number. This will be the same as CountTables() 158f11508d7f4aae52739b9c4f3bb2da2fd78fa23d9reed@google.com * or 0 if an error occured. If tags == NULL, this only returns the count 159f11508d7f4aae52739b9c4f3bb2da2fd78fa23d9reed@google.com * (the same as calling countTables()). 160f11508d7f4aae52739b9c4f3bb2da2fd78fa23d9reed@google.com */ 161f11508d7f4aae52739b9c4f3bb2da2fd78fa23d9reed@google.com int getTableTags(SkFontTableTag tags[]) const; 162fbfcd5602128ec010c82cb733c9cdc0a3254f9f3rmistry@google.com 163f11508d7f4aae52739b9c4f3bb2da2fd78fa23d9reed@google.com /** Given a table tag, return the size of its contents, or 0 if not present 164f11508d7f4aae52739b9c4f3bb2da2fd78fa23d9reed@google.com */ 165f11508d7f4aae52739b9c4f3bb2da2fd78fa23d9reed@google.com size_t getTableSize(SkFontTableTag) const; 166fbfcd5602128ec010c82cb733c9cdc0a3254f9f3rmistry@google.com 167f11508d7f4aae52739b9c4f3bb2da2fd78fa23d9reed@google.com /** Copy the contents of a table into data (allocated by the caller). Note 168f11508d7f4aae52739b9c4f3bb2da2fd78fa23d9reed@google.com * that the contents of the table will be in their native endian order 169f11508d7f4aae52739b9c4f3bb2da2fd78fa23d9reed@google.com * (which for most truetype tables is big endian). If the table tag is 170f11508d7f4aae52739b9c4f3bb2da2fd78fa23d9reed@google.com * not found, or there is an error copying the data, then 0 is returned. 171f11508d7f4aae52739b9c4f3bb2da2fd78fa23d9reed@google.com * If this happens, it is possible that some or all of the memory pointed 172f11508d7f4aae52739b9c4f3bb2da2fd78fa23d9reed@google.com * to by data may have been written to, even though an error has occured. 173fbfcd5602128ec010c82cb733c9cdc0a3254f9f3rmistry@google.com * 174f11508d7f4aae52739b9c4f3bb2da2fd78fa23d9reed@google.com * @param fontID the font to copy the table from 175f11508d7f4aae52739b9c4f3bb2da2fd78fa23d9reed@google.com * @param tag The table tag whose contents are to be copied 176f11508d7f4aae52739b9c4f3bb2da2fd78fa23d9reed@google.com * @param offset The offset in bytes into the table's contents where the 177f11508d7f4aae52739b9c4f3bb2da2fd78fa23d9reed@google.com * copy should start from. 178f11508d7f4aae52739b9c4f3bb2da2fd78fa23d9reed@google.com * @param length The number of bytes, starting at offset, of table data 179f11508d7f4aae52739b9c4f3bb2da2fd78fa23d9reed@google.com * to copy. 180f11508d7f4aae52739b9c4f3bb2da2fd78fa23d9reed@google.com * @param data storage address where the table contents are copied to 181f11508d7f4aae52739b9c4f3bb2da2fd78fa23d9reed@google.com * @return the number of bytes actually copied into data. If offset+length 182f11508d7f4aae52739b9c4f3bb2da2fd78fa23d9reed@google.com * exceeds the table's size, then only the bytes up to the table's 183f11508d7f4aae52739b9c4f3bb2da2fd78fa23d9reed@google.com * size are actually copied, and this is the value returned. If 184f11508d7f4aae52739b9c4f3bb2da2fd78fa23d9reed@google.com * offset > the table's size, or tag is not a valid table, 185f11508d7f4aae52739b9c4f3bb2da2fd78fa23d9reed@google.com * then 0 is returned. 186f11508d7f4aae52739b9c4f3bb2da2fd78fa23d9reed@google.com */ 187f11508d7f4aae52739b9c4f3bb2da2fd78fa23d9reed@google.com size_t getTableData(SkFontTableTag tag, size_t offset, size_t length, 188f11508d7f4aae52739b9c4f3bb2da2fd78fa23d9reed@google.com void* data) const; 1894b2af9c91d39c2176a32e7ba42a0276dca68034areed@google.com 1904b2af9c91d39c2176a32e7ba42a0276dca68034areed@google.com /** 1914b2af9c91d39c2176a32e7ba42a0276dca68034areed@google.com * Return the units-per-em value for this typeface, or zero if there is an 1924b2af9c91d39c2176a32e7ba42a0276dca68034areed@google.com * error. 1934b2af9c91d39c2176a32e7ba42a0276dca68034areed@google.com */ 1944b2af9c91d39c2176a32e7ba42a0276dca68034areed@google.com int getUnitsPerEm() const; 1954b2af9c91d39c2176a32e7ba42a0276dca68034areed@google.com 196fed86bdb8b9f037439bbfa7cdbd53a581dbc5985reed@google.com SkStream* openStream(int* ttcIndex) const; 197fed86bdb8b9f037439bbfa7cdbd53a581dbc5985reed@google.com 1988a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.comprotected: 199dc09f07671145b21c83de7153c9c9b950c871f1amike@reedtribe.org /** uniqueID must be unique and non-zero 2008a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com */ 2012f3dc9dc4c970bd066be329a842a791d91f524e2reed@google.com SkTypeface(Style style, SkFontID uniqueID, bool isFixedWidth = false); 2022f3dc9dc4c970bd066be329a842a791d91f524e2reed@google.com virtual ~SkTypeface(); 2038a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com 204cb1bbb375aa4fdd099dc60302ca1712f04607782bungeman@google.com friend class SkScalerContext; 205cb1bbb375aa4fdd099dc60302ca1712f04607782bungeman@google.com static SkTypeface* GetDefaultTypeface(); 206cb1bbb375aa4fdd099dc60302ca1712f04607782bungeman@google.com 207dc09f07671145b21c83de7153c9c9b950c871f1amike@reedtribe.org virtual int onGetUPEM() const; 208dc09f07671145b21c83de7153c9c9b950c871f1amike@reedtribe.org virtual int onGetTableTags(SkFontTableTag tags[]) const; 209dc09f07671145b21c83de7153c9c9b950c871f1amike@reedtribe.org virtual size_t onGetTableData(SkFontTableTag, size_t offset, 210dc09f07671145b21c83de7153c9c9b950c871f1amike@reedtribe.org size_t length, void* data) const; 211dc09f07671145b21c83de7153c9c9b950c871f1amike@reedtribe.org virtual SkScalerContext* onCreateScalerContext(const SkDescriptor*) const; 212dc09f07671145b21c83de7153c9c9b950c871f1amike@reedtribe.org virtual void onFilterRec(SkScalerContextRec*) const; 213dc09f07671145b21c83de7153c9c9b950c871f1amike@reedtribe.org virtual void onGetFontDescriptor(SkFontDescriptor*) const; 214dc09f07671145b21c83de7153c9c9b950c871f1amike@reedtribe.org 2158a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.comprivate: 2162f3dc9dc4c970bd066be329a842a791d91f524e2reed@google.com SkFontID fUniqueID; 2178a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com Style fStyle; 2185b31b0f1eaca0cdc3aa5697e8efa1baf68b0774ereed@google.com bool fIsFixedWidth; 2195b31b0f1eaca0cdc3aa5697e8efa1baf68b0774ereed@google.com 220fed86bdb8b9f037439bbfa7cdbd53a581dbc5985reed@google.com friend class SkPaint; 221dc09f07671145b21c83de7153c9c9b950c871f1amike@reedtribe.org // just so deprecated fonthost can call protected methods 222dc09f07671145b21c83de7153c9c9b950c871f1amike@reedtribe.org friend class SkFontHost; 223dc09f07671145b21c83de7153c9c9b950c871f1amike@reedtribe.org 224a02bc1519cf49afa31fb38bed097dd5014880d04bungeman@google.com typedef SkWeakRefCnt INHERITED; 2258a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com}; 2268a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com 2278a1c16ff38322f0210116fa7293eb8817c7e477ereed@android.com#endif 228