diff --git a/gfx/src/windows/nsFontMetricsWin.cpp b/gfx/src/windows/nsFontMetricsWin.cpp index 2cac7a1cd635..6c9e9c81db2a 100644 --- a/gfx/src/windows/nsFontMetricsWin.cpp +++ b/gfx/src/windows/nsFontMetricsWin.cpp @@ -1920,7 +1920,9 @@ nsFontMetricsWin::LoadGlobalFont(HDC aDC, nsGlobalFont* aGlobalFontItem) LOGFONT logFont; HFONT hfont; - FillLogFont(&logFont, aGlobalFontItem->logFont.lfWeight); + PRUint16 weightTable = LookForFontWeightTable(aDC, aGlobalFontItem->name); + PRInt32 weight = GetFontWeight(mFont->weight, weightTable); + FillLogFont(&logFont, weight); logFont.lfCharSet = aGlobalFontItem->logFont.lfCharSet; logFont.lfPitchAndFamily = aGlobalFontItem->logFont.lfPitchAndFamily; strcpy(logFont.lfFaceName, aGlobalFontItem->logFont.lfFaceName);; @@ -4171,7 +4173,9 @@ nsFontMetricsWinA::LoadGlobalFont(HDC aDC, nsGlobalFont* aGlobalFontItem) LOGFONT logFont; HFONT hfont; - FillLogFont(&logFont, aGlobalFontItem->logFont.lfWeight); + PRUint16 weightTable = LookForFontWeightTable(aDC, aGlobalFontItem->name); + PRInt32 weight = GetFontWeight(mFont->weight, weightTable); + FillLogFont(&logFont, weight); logFont.lfCharSet = aGlobalFontItem->logFont.lfCharSet; logFont.lfPitchAndFamily = aGlobalFontItem->logFont.lfPitchAndFamily; strcpy(logFont.lfFaceName, aGlobalFontItem->logFont.lfFaceName);;