summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRaph Levien <raph@google.com>2014-06-05 22:40:15 -0700
committerRaph Levien <raph@google.com>2014-06-06 17:03:33 +0000
commit89566f0ada1cafe673efa064cde38467990235d4 (patch)
tree403c99ff42f53d7ad931a1c18fae32ace002a4fc /include
parent621d437b92a63fe3cd80274bc25b549a2b0decb8 (diff)
downloadandroid_frameworks_minikin-89566f0ada1cafe673efa064cde38467990235d4.tar.gz
android_frameworks_minikin-89566f0ada1cafe673efa064cde38467990235d4.tar.bz2
android_frameworks_minikin-89566f0ada1cafe673efa064cde38467990235d4.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')
-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;