From b1eae5ea1f0f1303d155ee550f9aa94acd0127c5 Mon Sep 17 00:00:00 2001 From: Raph Levien Date: Thu, 5 Jun 2014 22:40:15 -0700 Subject: Add baseFont method to FontCollection This patch adds a method to retrieve the base font from a FontCollection, which is useful when querying global font metrics. Part of the fix for bug 15467288 "Inconsistent line heights on Minikin builds" Change-Id: I268ae5128d0852a020d746bc22af81fc1a623228 --- include/minikin/FontCollection.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/minikin/FontCollection.h') diff --git a/include/minikin/FontCollection.h b/include/minikin/FontCollection.h index 78ab2aa..508a129 100644 --- a/include/minikin/FontCollection.h +++ b/include/minikin/FontCollection.h @@ -57,6 +57,9 @@ public: void itemize(const uint16_t *string, size_t string_length, FontStyle style, std::vector* result) const; + // Get the base font for the given style, useful for font-wide metrics. + MinikinFont* baseFont(FontStyle style); + uint32_t getId() const; private: static const int kLogCharsPerPage = 8; -- cgit v1.2.3