mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
wineps: Copy GetTextMetrics implementation to unixlib.
This commit is contained in:
parent
b1f7b0da98
commit
df0417831a
2 changed files with 16 additions and 1 deletions
|
@ -694,7 +694,6 @@ static struct gdi_dc_funcs psdrv_funcs =
|
|||
.pCreateDC = PSDRV_CreateDC,
|
||||
.pDeleteDC = PSDRV_DeleteDC,
|
||||
.pGetTextExtentExPoint = PSDRV_GetTextExtentExPoint,
|
||||
.pGetTextMetrics = PSDRV_GetTextMetrics,
|
||||
.priority = GDI_PRIORITY_GRAPHICS_DRV
|
||||
};
|
||||
|
||||
|
|
|
@ -1191,6 +1191,21 @@ static BOOL CDECL get_char_width(PHYSDEV dev, UINT first, UINT count, const WCHA
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static BOOL CDECL get_text_metrics(PHYSDEV dev, TEXTMETRICW *metrics)
|
||||
{
|
||||
PSDRV_PDEVICE *pdev = get_psdrv_dev(dev);
|
||||
|
||||
if (pdev->font.fontloc == Download)
|
||||
{
|
||||
dev = GET_NEXT_PHYSDEV(dev, pGetTextMetrics);
|
||||
return dev->funcs->pGetTextMetrics(dev, metrics);
|
||||
}
|
||||
|
||||
memcpy(metrics, &(pdev->font.fontinfo.Builtin.tm),
|
||||
sizeof(pdev->font.fontinfo.Builtin.tm));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static NTSTATUS init_dc(void *arg)
|
||||
{
|
||||
struct init_dc_params *params = arg;
|
||||
|
@ -1201,6 +1216,7 @@ static NTSTATUS init_dc(void *arg)
|
|||
params->funcs->pSelectFont = select_font;
|
||||
params->funcs->pEnumFonts = enum_fonts;
|
||||
params->funcs->pGetCharWidth = get_char_width;
|
||||
params->funcs->pGetTextMetrics = get_text_metrics;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue