#32339 "font-weight: bolder and font-weight: lighter not working correctly on Mac".

This commit is contained in:
pierre%netscape.com 2000-03-23 22:21:15 +00:00
Родитель 974924c12b
Коммит 9a85d3ea88
1 изменённых файлов: 10 добавлений и 2 удалений

Просмотреть файл

@ -365,8 +365,16 @@ NS_EXPORT void nsFontMetricsMac::GetNativeTextStyle(nsIFontMetrics& inMetrics,
case NS_FONT_VARIANT_SMALL_CAPS: break;
}
#endif
if (aFont->weight > NS_FONT_WEIGHT_NORMAL) // don't test NS_FONT_WEIGHT_BOLD
textFace |= bold;
PRInt32 offset = aFont->weight % 100;
PRInt32 baseWeight = aFont->weight / 100;
NS_ASSERTION((offset < 10) || (offset > 90), "Invalid bolder or lighter value");
if (offset == 0) {
if (aFont->weight >= NS_FONT_WEIGHT_BOLD)
textFace |= bold;
} else {
if (offset < 10)
textFace |= bold;
}
if ( aFont->decorations & NS_FONT_DECORATION_UNDERLINE )
textFace |= underline;