[PATCH 2/3] wineps.drv: Add support for GETFACENAME and DOWNLOADFACE escapes.

Huw Davies huw at codeweavers.com
Wed Feb 13 02:46:01 CST 2019


Hi Dmitry,

Thanks for resending these patches.

On Wed, Feb 13, 2019 at 04:07:38PM +0800, Dmitry Timoshkov wrote:
> diff --git a/dlls/wineps.drv/escape.c b/dlls/wineps.drv/escape.c
> index 44d790b298..db73c057ef 100644
> --- a/dlls/wineps.drv/escape.c
> +++ b/dlls/wineps.drv/escape.c
> @@ -138,12 +138,27 @@ INT PSDRV_ExtEscape( PHYSDEV dev, INT nEscape, INT cbInput, LPCVOID in_data,
>          return 1;
>  
>      case GETFACENAME:
> -        FIXME("GETFACENAME: stub\n");
> -        lstrcpynA(out_data, "Courier", cbOutput);
> +        if (physDev->font.fontloc == Download)
> +        {
> +            char *name = PSDRV_get_download_name(dev, physDev->font.set);

physDev->font.set is a tri-state, so this doesn't work as expected.

> +            if (name)
> +            {
> +                TRACE("font name: %s\n", debugstr_a(name));
> +                lstrcpynA(out_data, name, cbOutput);
> +                HeapFree(GetProcessHeap(), 0, name);
> +            }
> +            else
> +                lstrcpynA(out_data, "Courier", cbOutput);
> +        }
> +        else
> +        {
> +            TRACE("font name: %s\n", debugstr_a(physDev->font.fontinfo.Builtin.afm->FontName));
> +            lstrcpynA(out_data, physDev->font.fontinfo.Builtin.afm->FontName, cbOutput);
> +        }
>          return 1;
>  
>      case DOWNLOADFACE:
> -        FIXME("DOWNLOADFACE: stub\n");
> +        PSDRV_SetFont(dev, physDev->font.set);

Same here.

Huw.



More information about the wine-devel mailing list