diff options
Diffstat (limited to 'include/minikin/FontCollection.h')
-rw-r--r-- | include/minikin/FontCollection.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/minikin/FontCollection.h b/include/minikin/FontCollection.h index 03d06e6..63f79d6 100644 --- a/include/minikin/FontCollection.h +++ b/include/minikin/FontCollection.h @@ -35,6 +35,8 @@ namespace minikin { // The maximum number of font families. constexpr uint32_t MAX_FAMILY_COUNT = 254; +class LocaleList; + class FontCollection { public: static std::shared_ptr<FontCollection> create( @@ -148,6 +150,8 @@ public: return itemize(text, style, localeListId, familyVariant, text.size()); } + MinikinExtent getReferenceExtentForLocale(const MinikinPaint& paint) const; + // Returns true if there is a glyph for the code point and variation selector pair. // Returns false if no fonts have a glyph for the code point and variation // selector pair, or invalid variation selector is passed. @@ -224,6 +228,9 @@ private: bool isPrimaryFamily(const std::shared_ptr<FontFamily>& fontFamily) const; + void filterFamilyByLocale(const LocaleList& localeList, + const std::function<void(const FontFamily& family)>& callback) const; + static uint32_t calcLocaleMatchingScore(uint32_t userLocaleListId, const FontFamily& fontFamily); |