mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-14 02:31:59 +00:00
bug 353185 The line-height of the location bar is wrong with Japanese font r=vlad
This commit is contained in:
parent
3bb10eba3c
commit
a079adfd35
@ -138,7 +138,7 @@ public:
|
||||
NS_IMETHOD GetHeight(nscoord &aHeight) = 0;
|
||||
|
||||
|
||||
#if defined(XP_WIN) || defined(XP_OS2)
|
||||
#if defined(XP_WIN) || defined(XP_OS2) || defined(MOZ_CAIRO_GFX)
|
||||
#define FONT_LEADING_APIS_V2 1
|
||||
#endif
|
||||
|
||||
|
@ -123,10 +123,14 @@ gfxAtsuiFont::gfxAtsuiFont(ATSUFontID fontID,
|
||||
mMetrics.maxAscent = atsMetrics.ascent * size;
|
||||
mMetrics.maxDescent = - (atsMetrics.descent * size);
|
||||
|
||||
mMetrics.maxHeight = mMetrics.maxAscent + mMetrics.maxDescent;
|
||||
|
||||
mMetrics.internalLeading = atsMetrics.leading * size;
|
||||
mMetrics.externalLeading = 0.0;
|
||||
|
||||
mMetrics.maxHeight = mMetrics.maxAscent + mMetrics.maxDescent;
|
||||
if (mMetrics.maxHeight - mMetrics.emHeight > mMetrics.internalLeading)
|
||||
mMetrics.emHeight = mMetrics.maxHeight - mMetrics.internalLeading;
|
||||
|
||||
mMetrics.emAscent = mMetrics.maxAscent * mMetrics.emHeight / mMetrics.maxHeight;
|
||||
mMetrics.emDescent = mMetrics.emHeight - mMetrics.emAscent;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user