Bug 1090329 - gfxHarfBuzzShaper::GetGlyphVAdvance should never use the backend-specific GetGlyphWidth method, which is for horizontal width only. r=smontagu
--- a/gfx/thebes/gfxHarfBuzzShaper.cpp
+++ b/gfx/thebes/gfxHarfBuzzShaper.cpp
@@ -248,20 +248,20 @@ gfxHarfBuzzShaper::HBGetGlyphHAdvance(hb
/* static */
hb_position_t
gfxHarfBuzzShaper::HBGetGlyphVAdvance(hb_font_t *font, void *font_data,
hb_codepoint_t glyph, void *user_data)
{
const gfxHarfBuzzShaper::FontCallbackData *fcd =
static_cast<const gfxHarfBuzzShaper::FontCallbackData*>(font_data);
- gfxFont *gfxfont = fcd->mShaper->GetFont();
- if (gfxfont->ProvidesGlyphWidths()) {
- return gfxfont->GetGlyphWidth(*fcd->mContext->GetDrawTarget(), glyph);
- }
+ // Currently, we don't offer gfxFont subclasses a method to override this
+ // and provide hinted platform-specific vertical advances (analogous to the
+ // GetGlyphWidth method for horizontal advances). If that proves necessary,
+ // we'll add a new gfxFont method and call it from here.
return fcd->mShaper->GetGlyphVAdvance(glyph);
}
/* static */
hb_bool_t
gfxHarfBuzzShaper::HBGetGlyphHOrigin(hb_font_t *font, void *font_data,
hb_codepoint_t glyph,
hb_position_t *x, hb_position_t *y,