gdi32: Get rid of redundant ntmCellHeight member.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
837c4f4b87
commit
629ba19200
|
@ -2714,10 +2714,12 @@ static BOOL get_face_enum_data( struct gdi_font_face *face, ENUMLOGFONTEXW *elf,
|
|||
if (font_funcs->set_outline_text_metrics( font ))
|
||||
{
|
||||
static const DWORD ntm_ppem = 32;
|
||||
UINT cell_height;
|
||||
|
||||
#define TM font->otm.otmTextMetrics
|
||||
#define SCALE_NTM(value) (MulDiv( ntm->ntmTm.tmHeight, (value), TM.tmHeight ))
|
||||
ntm->ntmTm.tmHeight = MulDiv( ntm_ppem, font->ntmCellHeight, font->otm.otmEMSquare );
|
||||
cell_height = TM.tmHeight / ( -lf.lfHeight / font->otm.otmEMSquare );
|
||||
ntm->ntmTm.tmHeight = MulDiv( ntm_ppem, cell_height, font->otm.otmEMSquare );
|
||||
ntm->ntmTm.tmAscent = SCALE_NTM( TM.tmAscent );
|
||||
ntm->ntmTm.tmDescent = ntm->ntmTm.tmHeight - ntm->ntmTm.tmAscent;
|
||||
ntm->ntmTm.tmInternalLeading = SCALE_NTM( TM.tmInternalLeading );
|
||||
|
@ -2729,7 +2731,7 @@ static BOOL get_face_enum_data( struct gdi_font_face *face, ENUMLOGFONTEXW *elf,
|
|||
(const char *)&TM + offsetof( TEXTMETRICW, tmWeight ),
|
||||
sizeof(TEXTMETRICW) - offsetof( TEXTMETRICW, tmWeight ));
|
||||
ntm->ntmTm.ntmSizeEM = font->otm.otmEMSquare;
|
||||
ntm->ntmTm.ntmCellHeight = font->ntmCellHeight;
|
||||
ntm->ntmTm.ntmCellHeight = cell_height;
|
||||
ntm->ntmTm.ntmAvgWidth = font->ntmAvgWidth;
|
||||
#undef SCALE_NTM
|
||||
#undef TM
|
||||
|
|
|
@ -3775,7 +3775,6 @@ static BOOL CDECL freetype_set_outline_text_metrics( struct gdi_font *font )
|
|||
descent = windescent;
|
||||
}
|
||||
|
||||
font->ntmCellHeight = ascent + descent;
|
||||
font->ntmAvgWidth = pOS2->xAvgCharWidth;
|
||||
|
||||
#define SCALE_X(x) (pFT_MulFix(x, em_scale))
|
||||
|
|
|
@ -344,7 +344,6 @@ struct gdi_font
|
|||
SHORT yMax;
|
||||
SHORT yMin;
|
||||
UINT ntmFlags;
|
||||
UINT ntmCellHeight;
|
||||
UINT ntmAvgWidth;
|
||||
UINT aa_flags;
|
||||
ULONG ttc_item_offset; /* 0 if font is not a part of TrueType collection */
|
||||
|
|
Loading…
Reference in New Issue