diff options
Diffstat (limited to 'include/core/SkFontHost.h')
-rw-r--r-- | include/core/SkFontHost.h | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/include/core/SkFontHost.h b/include/core/SkFontHost.h index d0f7c65..e20ea05 100644 --- a/include/core/SkFontHost.h +++ b/include/core/SkFontHost.h @@ -150,14 +150,22 @@ public: */ static SkScalerContext* CreateScalerContext(const SkDescriptor* desc); - /** Given a "current" fontID, return the next logical fontID to use - when searching fonts for a given unicode value. Typically the caller - will query a given font, and if a unicode value is not supported, they - will call this, and if 0 is not returned, will search that font, and so - on. This process must be finite, and when the fonthost sees a - font with no logical successor, it must return 0. - */ - static uint32_t NextLogicalFont(SkFontID fontID); + /** + * Given a "current" fontID, return the next logical fontID to use + * when searching fonts for a given unicode value. Typically the caller + * will query a given font, and if a unicode value is not supported, they + * will call this, and if 0 is not returned, will search that font, and so + * on. This process must be finite, and when the fonthost sees a + * font with no logical successor, it must return 0. + * + * The original fontID is also provided. This is the initial font that was + * stored in the typeface of the caller. It is provided as an aid to choose + * the best next logical font. e.g. If the original font was bold or serif, + * but the 2nd in the logical chain was plain, then a subsequent call to + * get the 3rd can still inspect the original, and try to match its + * stylistic attributes. + */ + static SkFontID NextLogicalFont(SkFontID currFontID, SkFontID origFontID); /////////////////////////////////////////////////////////////////////////// |