mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-16 14:55:47 +00:00
bug 424165. clamp font weights from the OS to be within 100 and 900. r/a=vlad
This commit is contained in:
parent
ea42d1a370
commit
2804ee6193
@ -114,6 +114,9 @@ gfxWindowsPlatform::FontEnumProc(const ENUMLOGFONTEXW *lpelfe,
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Some fonts claim to support things > 900, but we don't so clamp the sizes
|
||||
logFont.lfWeight = PR_MAX(PR_MIN(logFont.lfWeight, 900), 100);
|
||||
|
||||
#ifdef DEBUG_pavlov
|
||||
printf("%s %d %d %d\n", NS_ConvertUTF16toUTF8(nsDependentString(logFont.lfFaceName)).get(),
|
||||
logFont.lfCharSet, logFont.lfItalic, logFont.lfWeight);
|
||||
|
Loading…
Reference in New Issue
Block a user