summaryrefslogtreecommitdiffstats
path: root/include/minikin/FontCollection.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/minikin/FontCollection.h')
-rw-r--r--include/minikin/FontCollection.h23
1 files changed, 5 insertions, 18 deletions
diff --git a/include/minikin/FontCollection.h b/include/minikin/FontCollection.h
index 508a129..12700c6 100644
--- a/include/minikin/FontCollection.h
+++ b/include/minikin/FontCollection.h
@@ -32,24 +32,8 @@ public:
~FontCollection();
- class Run {
- public:
- // Do copy constructor, assignment, destructor so it can be used in vectors
- Run() : font(NULL) { }
- Run(const Run& other): font(other.font), start(other.start), end(other.end) {
- if (font) font->RefLocked();
- }
- Run& operator=(const Run& other) {
- if (other.font) other.font->RefLocked();
- if (font) font->UnrefLocked();
- font = other.font;
- start = other.start;
- end = other.end;
- return *this;
- }
- ~Run() { if (font) font->UnrefLocked(); }
-
- MinikinFont* font;
+ struct Run {
+ FakedFont fakedFont;
int start;
int end;
};
@@ -60,6 +44,9 @@ public:
// Get the base font for the given style, useful for font-wide metrics.
MinikinFont* baseFont(FontStyle style);
+ // Get base font with fakery information (fake bold could affect metrics)
+ FakedFont baseFontFaked(FontStyle style);
+
uint32_t getId() const;
private:
static const int kLogCharsPerPage = 8;