[Gdiplus 8/9] Implement GdipGetFontHeight
Nikolay Sivov
bunglehead at gmail.com
Mon Aug 18 05:10:52 CDT 2008
Adam Petaccia wrote:
> ---
> dlls/gdiplus/font.c | 18 ++++++++++++++++++
> dlls/gdiplus/gdiplus.spec | 2 +-
> include/gdiplusflat.h | 2 ++
> 3 files changed, 21 insertions(+), 1 deletions(-)
>
> diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c
> index 0c78bd5..5e1a14e 100644
> --- a/dlls/gdiplus/font.c
> +++ b/dlls/gdiplus/font.c
> @@ -387,6 +387,24 @@ GpStatus WINGDIPAPI GdipCloneFont(GpFont *font, GpFont **cloneFont)
> }
>
> /*******************************************************************************
> + * GdipGetFontHeight [GDIPLUS.@]
> + */
> +GpStatus WINGDIPAPI GdipGetFontHeight(GDIPCONST GpFont *font,
> + GDIPCONST GpGraphics *graphics, REAL *height)
> +{
> + REAL dpi;
> + GpStatus stat;
> +
> + TRACE("%p %p %p\n", font, graphics, height);
> +
> + stat = GdipGetDpiX(graphics, &dpi);
>
Is it normal that you use GdipGetDpiX and not GdipGetDpiY? I'm not much
familiar with fonts so treat it like a
question. It seems to me that height is measured using another axis.
> + if (stat != Ok)
> + return stat;
> +
> + return GdipGetFontHeightGivenDPI(font, dpi, height);
> +}
> +
> +/*******************************************************************************
> * GdipGetFontHeightGivenDPI [GDIPLUS.@]
> * PARAMS
> * font [I] Font to retrieve DPI from
> diff --git a/dlls/gdiplus/gdiplus.spec b/dlls/gdiplus/gdiplus.spec
> index f1ad0d4..e37eeec 100644
> --- a/dlls/gdiplus/gdiplus.spec
> +++ b/dlls/gdiplus/gdiplus.spec
> @@ -267,7 +267,7 @@
> @ stdcall GdipGetFamilyName(ptr ptr long)
> @ stdcall GdipGetFontCollectionFamilyCount(ptr ptr)
> @ stdcall GdipGetFontCollectionFamilyList(ptr long ptr ptr)
> -@ stub GdipGetFontHeight
> +@ stdcall GdipGetFontHeight(ptr ptr ptr)
> @ stdcall GdipGetFontHeightGivenDPI(ptr long ptr)
> @ stdcall GdipGetFontSize(ptr ptr)
> @ stdcall GdipGetFontStyle(ptr ptr)
> diff --git a/include/gdiplusflat.h b/include/gdiplusflat.h
> index 17fae9c..f650e24 100644
> --- a/include/gdiplusflat.h
> +++ b/include/gdiplusflat.h
> @@ -425,6 +425,8 @@ GpStatus WINGDIPAPI GdipGetFamily(GpFont*, GpFontFamily**);
> GpStatus WINGDIPAPI GdipGetFontUnit(GpFont*, Unit*);
> GpStatus WINGDIPAPI GdipGetFontSize(GpFont*, REAL*);
> GpStatus WINGDIPAPI GdipGetFontStyle(GpFont*, INT*);
> +GpStatus WINGDIPAPI GdipGetFontHeight(GDIPCONST GpFont*, GDIPCONST GpGraphics*,
> + REAL*);
> GpStatus WINGDIPAPI GdipGetFontHeightGivenDPI(GDIPCONST GpFont*, REAL, REAL*);
>
> GpStatus WINGDIPAPI GdipCreateFontFamilyFromName(GDIPCONST WCHAR*,
>
More information about the wine-devel
mailing list