summaryrefslogtreecommitdiffstats
path: root/include/minikin/FontCollection.h
diff options
context:
space:
mode:
authorRaph Levien <raph@google.com>2014-06-05 22:40:15 -0700
committerRaph Levien <raph@google.com>2014-06-11 12:42:32 -0700
commitb1eae5ea1f0f1303d155ee550f9aa94acd0127c5 (patch)
tree403c99ff42f53d7ad931a1c18fae32ace002a4fc /include/minikin/FontCollection.h
parent3f1ea5da2ee12b0d95c17c56928c3e553d4eeda0 (diff)
downloadandroid_frameworks_minikin-b1eae5ea1f0f1303d155ee550f9aa94acd0127c5.tar.gz
android_frameworks_minikin-b1eae5ea1f0f1303d155ee550f9aa94acd0127c5.tar.bz2
android_frameworks_minikin-b1eae5ea1f0f1303d155ee550f9aa94acd0127c5.zip
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
Diffstat (limited to 'include/minikin/FontCollection.h')
-rw-r--r--include/minikin/FontCollection.h3
1 files changed, 3 insertions, 0 deletions
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<Run>* 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;