Merge "Implement batch horizontal advances callback"
This commit is contained in:
committed by
Android (Google) Code Review
commit
04c971ecf9
@@ -65,6 +65,15 @@ float MinikinFontSkia::GetHorizontalAdvance(uint32_t glyph_id, const minikin::Mi
|
||||
return skWidth;
|
||||
}
|
||||
|
||||
void MinikinFontSkia::GetHorizontalAdvances(uint16_t* glyph_ids, uint32_t count,
|
||||
const minikin::MinikinPaint& paint,
|
||||
const minikin::FontFakery& fakery,
|
||||
float* outAdvances) const {
|
||||
SkFont skFont;
|
||||
MinikinFontSkia_SetSkiaFont(this, &skFont, paint, fakery);
|
||||
skFont.getWidths(glyph_ids, count, outAdvances);
|
||||
}
|
||||
|
||||
void MinikinFontSkia::GetBounds(minikin::MinikinRect* bounds, uint32_t glyph_id,
|
||||
const minikin::MinikinPaint& paint,
|
||||
const minikin::FontFakery& fakery) const {
|
||||
|
||||
@@ -35,6 +35,11 @@ public:
|
||||
float GetHorizontalAdvance(uint32_t glyph_id, const minikin::MinikinPaint& paint,
|
||||
const minikin::FontFakery& fakery) const override;
|
||||
|
||||
void GetHorizontalAdvances(uint16_t* glyph_ids, uint32_t count,
|
||||
const minikin::MinikinPaint& paint,
|
||||
const minikin::FontFakery& fakery,
|
||||
float* outAdvances) const override;
|
||||
|
||||
void GetBounds(minikin::MinikinRect* bounds, uint32_t glyph_id,
|
||||
const minikin::MinikinPaint& paint,
|
||||
const minikin::FontFakery& fakery) const override;
|
||||
|
||||
Reference in New Issue
Block a user