bug 353185 The line-height of the location bar is wrong with Japanese font r=vlad

This commit is contained in:
masayuki%d-toybox.com 2006-10-09 08:46:50 +00:00
parent 3bb10eba3c
commit a079adfd35
2 changed files with 6 additions and 2 deletions

View File

@ -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

View File

@ -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;