[PATCH] Implement GdipGetLogFontA

Adam Petaccia adam at tpetaccia.com
Sun Nov 9 12:11:45 CST 2008


Ignore. Will resend.

On Sun, 2008-11-09 at 13:03 -0500, Adam Petaccia wrote:
> ---
>  dlls/gdiplus/font.c       |   25 +++++++++++++++++++++++++
>  dlls/gdiplus/gdiplus.spec |    2 +-
>  2 files changed, 26 insertions(+), 1 deletions(-)
> 
> diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c
> index 32713c7..2477f7b 100644
> --- a/dlls/gdiplus/font.c
> +++ b/dlls/gdiplus/font.c
> @@ -368,6 +368,31 @@ GpStatus WINGDIPAPI GdipGetFontUnit(GpFont *font, Unit *unit)
>  }
>  
>  /*******************************************************************************
> + * GdipGetLogFontA [GDIPLUS.@]
> + */
> +GpStatus WINGDIPAPI GdipGetLogFontA(GpFont *font, GpGraphics *graphics,
> +    LOGFONTA *lfa)
> +{
> +    INT bytesWritten;
> +    /* FIXME: use graphics */
> +    if(!(font && graphics && lfa))
> +        return InvalidParameter;
> +
> +    memcpy(&font->lfw, lfa, sizeof(LOGFONTA));
> +    bytesWritten = WideCharToMultiByte(CP_ACP, 0, font->lfw.lfFaceName, -1,
> +            lfa->lfFaceName, LF_FACESIZE, NULL, NULL);
> +
> +    if (bytesWritten == 0)
> +    {
> +        ERR("Could not convert from WideChar to Multibyte with error %d\n",
> +                GetLastError());
> +        return GenericError;
> +    }
> +
> +    return Ok;
> +}
> +
> +/*******************************************************************************
>   * GdipGetLogFontW [GDIPLUS.@]
>   */
>  GpStatus WINGDIPAPI GdipGetLogFontW(GpFont *font, GpGraphics *graphics,
> diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
> index a2790a3..0e7ac5c 100644
> --- a/dlls/gdiplus/gdiplus.spec
> +++ b/dlls/gdiplus/gdiplus.spec
> @@ -311,7 +311,7 @@
>  @ stdcall GdipGetLineSpacing(ptr long ptr)
>  @ stub GdipGetLineTransform
>  @ stdcall GdipGetLineWrapMode(ptr ptr)
> -@ stub GdipGetLogFontA
> +@ stdcall GdipGetLogFontA(ptr ptr ptr)
>  @ stdcall GdipGetLogFontW(ptr ptr ptr)
>  @ stdcall GdipGetMatrixElements(ptr ptr)
>  @ stub GdipGetMetafileDownLevelRasterizationLimit




More information about the wine-devel mailing list