mirror of
https://github.com/reactos/reactos.git
synced 2025-05-29 22:18:13 +00:00
[NTGDI][FONT] Delete FillTMEx function and simplify codes
This commit is contained in:
parent
6f2662688b
commit
ebfb62b420
1 changed files with 16 additions and 51 deletions
|
@ -2234,9 +2234,9 @@ static BOOL face_has_symbol_charmap(FT_Face ft_face)
|
|||
}
|
||||
|
||||
static void FASTCALL
|
||||
FillTMEx(TEXTMETRICW *TM, PFONTGDI FontGDI,
|
||||
TT_OS2 *pOS2, TT_HoriHeader *pHori,
|
||||
FT_WinFNT_HeaderRec *pFNT, BOOL RealFont)
|
||||
FillTM(TEXTMETRICW *TM, PFONTGDI FontGDI,
|
||||
TT_OS2 *pOS2, TT_HoriHeader *pHori,
|
||||
FT_WinFNT_HeaderRec *pFNT)
|
||||
{
|
||||
FT_Fixed XScale, YScale;
|
||||
int Ascent, Descent;
|
||||
|
@ -2264,22 +2264,11 @@ FillTMEx(TEXTMETRICW *TM, PFONTGDI FontGDI,
|
|||
TM->tmDefaultChar = pFNT->default_char + pFNT->first_char;
|
||||
TM->tmBreakChar = pFNT->break_char + pFNT->first_char;
|
||||
TM->tmPitchAndFamily = pFNT->pitch_and_family;
|
||||
if (RealFont)
|
||||
{
|
||||
TM->tmWeight = FontGDI->OriginalWeight;
|
||||
TM->tmItalic = FontGDI->OriginalItalic;
|
||||
TM->tmUnderlined = pFNT->underline;
|
||||
TM->tmStruckOut = pFNT->strike_out;
|
||||
TM->tmCharSet = pFNT->charset;
|
||||
}
|
||||
else
|
||||
{
|
||||
TM->tmWeight = FontGDI->RequestWeight;
|
||||
TM->tmItalic = FontGDI->RequestItalic;
|
||||
TM->tmUnderlined = FontGDI->RequestUnderline;
|
||||
TM->tmStruckOut = FontGDI->RequestStrikeOut;
|
||||
TM->tmCharSet = FontGDI->CharSet;
|
||||
}
|
||||
TM->tmWeight = FontGDI->RequestWeight;
|
||||
TM->tmItalic = FontGDI->RequestItalic;
|
||||
TM->tmUnderlined = FontGDI->RequestUnderline;
|
||||
TM->tmStruckOut = FontGDI->RequestStrikeOut;
|
||||
TM->tmCharSet = FontGDI->CharSet;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2316,21 +2305,14 @@ FillTMEx(TEXTMETRICW *TM, PFONTGDI FontGDI,
|
|||
/* Correct forumla to get the maxcharwidth from unicode and ansi font */
|
||||
TM->tmMaxCharWidth = (FT_MulFix(Face->max_advance_width, XScale) + 32) >> 6;
|
||||
|
||||
if (RealFont)
|
||||
if (FontGDI->OriginalWeight != FW_DONTCARE &&
|
||||
FontGDI->OriginalWeight != FW_NORMAL)
|
||||
{
|
||||
TM->tmWeight = FontGDI->OriginalWeight;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (FontGDI->OriginalWeight != FW_DONTCARE &&
|
||||
FontGDI->OriginalWeight != FW_NORMAL)
|
||||
{
|
||||
TM->tmWeight = FontGDI->OriginalWeight;
|
||||
}
|
||||
else
|
||||
{
|
||||
TM->tmWeight = FontGDI->RequestWeight;
|
||||
}
|
||||
TM->tmWeight = FontGDI->RequestWeight;
|
||||
}
|
||||
|
||||
TM->tmOverhang = 0;
|
||||
|
@ -2368,25 +2350,16 @@ FillTMEx(TEXTMETRICW *TM, PFONTGDI FontGDI,
|
|||
TM->tmDefaultChar = TM->tmBreakChar - 1;
|
||||
}
|
||||
|
||||
if (RealFont)
|
||||
if (FontGDI->OriginalItalic || FontGDI->RequestItalic)
|
||||
{
|
||||
TM->tmItalic = FontGDI->OriginalItalic;
|
||||
TM->tmUnderlined = FALSE;
|
||||
TM->tmStruckOut = FALSE;
|
||||
TM->tmItalic = 0xFF;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (FontGDI->OriginalItalic || FontGDI->RequestItalic)
|
||||
{
|
||||
TM->tmItalic = 0xFF;
|
||||
}
|
||||
else
|
||||
{
|
||||
TM->tmItalic = 0;
|
||||
}
|
||||
TM->tmUnderlined = (FontGDI->RequestUnderline ? 0xFF : 0);
|
||||
TM->tmStruckOut = (FontGDI->RequestStrikeOut ? 0xFF : 0);
|
||||
TM->tmItalic = 0;
|
||||
}
|
||||
TM->tmUnderlined = (FontGDI->RequestUnderline ? 0xFF : 0);
|
||||
TM->tmStruckOut = (FontGDI->RequestStrikeOut ? 0xFF : 0);
|
||||
|
||||
if (!FT_IS_FIXED_WIDTH(Face))
|
||||
{
|
||||
|
@ -2471,14 +2444,6 @@ FillTMEx(TEXTMETRICW *TM, PFONTGDI FontGDI,
|
|||
TM->tmCharSet = FontGDI->CharSet;
|
||||
}
|
||||
|
||||
static void FASTCALL
|
||||
FillTM(TEXTMETRICW *TM, PFONTGDI FontGDI,
|
||||
TT_OS2 *pOS2, TT_HoriHeader *pHori,
|
||||
FT_WinFNT_HeaderRec *pFNT)
|
||||
{
|
||||
FillTMEx(TM, FontGDI, pOS2, pHori, pFNT, FALSE);
|
||||
}
|
||||
|
||||
static NTSTATUS
|
||||
IntGetFontLocalizedName(PUNICODE_STRING pNameW, PSHARED_FACE SharedFace,
|
||||
FT_UShort NameID, FT_UShort LangID);
|
||||
|
|
Loading…
Reference in a new issue