mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 568438 - Fontsize handling in nsSystemFontsQt.cpp breaks for fonts with pixel size set. r=dougt
This commit is contained in:
parent
f4f1ba94f7
commit
c388a096f0
@ -80,7 +80,14 @@ nsSystemFontsQt::GetSystemFontInfo(const char *aClassName, nsString *aFontName,
|
||||
aFontStyle->weight = qFont.weight();
|
||||
// FIXME: Set aFontStyle->stretch correctly!
|
||||
aFontStyle->stretch = NS_FONT_STRETCH_NORMAL;
|
||||
aFontStyle->size = qFont.pointSizeF() * float(gfxPlatform::GetDPI()) / 72.0f;
|
||||
// use pixel size directly if it is set, otherwise compute from point size
|
||||
if (qFont.pixelSize() != -1) {
|
||||
aFontStyle->size = qFont.pixelSize();
|
||||
} else {
|
||||
aFontStyle->size = qFont.pointSizeF()
|
||||
* float(gfxPlatform::GetDPI())
|
||||
/ 72.0f;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user