mirror of
https://github.com/reactos/reactos.git
synced 2024-12-01 07:23:33 +08:00
[WIN32SS][NTGDI] Fix condition of bold emulation (#1787)
- Define EMUBOLD_NEEDED macro to determine the condition of bold emuration necessity. - Use this macro. - Loose the condition.
This commit is contained in:
parent
04a361d091
commit
9cd11eb103
@ -41,6 +41,10 @@
|
||||
#define _TMPF_VARIABLE_PITCH TMPF_FIXED_PITCH
|
||||
#endif
|
||||
|
||||
/* Is bold emulation necessary? */
|
||||
#define EMUBOLD_NEEDED(original, request) \
|
||||
((request) != FW_DONTCARE) && ((request) - (original) >= FW_BOLD - FW_MEDIUM)
|
||||
|
||||
extern const MATRIX gmxWorldToDeviceDefault;
|
||||
extern const MATRIX gmxWorldToPageDefault;
|
||||
static const FT_Matrix identityMat = {(1 << 16), 0, 0, (1 << 16)};
|
||||
@ -4100,7 +4104,7 @@ TextIntGetTextExtentPoint(PDC dc,
|
||||
TextIntUpdateSize(dc, TextObj, FontGDI, FALSE);
|
||||
|
||||
plf = &TextObj->logfont.elfEnumLogfontEx.elfLogFont;
|
||||
EmuBold = (plf->lfWeight >= FW_BOLD && FontGDI->OriginalWeight <= FW_NORMAL);
|
||||
EmuBold = EMUBOLD_NEEDED(FontGDI->OriginalWeight, plf->lfWeight);
|
||||
EmuItalic = (plf->lfItalic && !FontGDI->OriginalItalic);
|
||||
|
||||
Render = IntIsFontRenderingEnabled();
|
||||
@ -5885,7 +5889,7 @@ IntExtTextOutW(
|
||||
face = FontGDI->SharedFace->Face;
|
||||
|
||||
plf = &TextObj->logfont.elfEnumLogfontEx.elfLogFont;
|
||||
EmuBold = (plf->lfWeight >= FW_BOLD && FontGDI->OriginalWeight <= FW_NORMAL);
|
||||
EmuBold = EMUBOLD_NEEDED(FontGDI->OriginalWeight, plf->lfWeight);
|
||||
EmuItalic = (plf->lfItalic && !FontGDI->OriginalItalic);
|
||||
|
||||
if (Render)
|
||||
|
Loading…
Reference in New Issue
Block a user