mirror of
https://github.com/reactos/reactos.git
synced 2025-04-26 16:40:27 +00:00
handle FW_DONTCARE in GetFontScore. Fixes gray/thin display of dialogbox elements' text.
svn path=/trunk/; revision=26743
This commit is contained in:
parent
8e23820aa6
commit
c21f54bb23
1 changed files with 10 additions and 3 deletions
|
@ -3923,6 +3923,8 @@ GetFontScore(LOGFONTW *LogFont, PUNICODE_STRING FaceName, PFONTGDI FontGDI)
|
||||||
{
|
{
|
||||||
Score += 25;
|
Score += 25;
|
||||||
}
|
}
|
||||||
|
if (LogFont->lfWeight != FW_DONTCARE)
|
||||||
|
{
|
||||||
if (LogFont->lfWeight < Otm->otmTextMetrics.tmWeight)
|
if (LogFont->lfWeight < Otm->otmTextMetrics.tmWeight)
|
||||||
{
|
{
|
||||||
WeightDiff = Otm->otmTextMetrics.tmWeight - LogFont->lfWeight;
|
WeightDiff = Otm->otmTextMetrics.tmWeight - LogFont->lfWeight;
|
||||||
|
@ -3932,6 +3934,11 @@ GetFontScore(LOGFONTW *LogFont, PUNICODE_STRING FaceName, PFONTGDI FontGDI)
|
||||||
WeightDiff = LogFont->lfWeight - Otm->otmTextMetrics.tmWeight;
|
WeightDiff = LogFont->lfWeight - Otm->otmTextMetrics.tmWeight;
|
||||||
}
|
}
|
||||||
Score += (1000 - WeightDiff) / (1000 / 25);
|
Score += (1000 - WeightDiff) / (1000 / 25);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Score += 25;
|
||||||
|
}
|
||||||
|
|
||||||
ExFreePool(Otm);
|
ExFreePool(Otm);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue