Commit 1e33bdcf authored by Evan Stade's avatar Evan Stade Committed by Alexandre Julliard

gdiplus: Added GdipCreateFontFromLogfontA.

parent d060aecc
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include "windef.h" #include "windef.h"
#include "winbase.h" #include "winbase.h"
#include "wingdi.h" #include "wingdi.h"
#include "winnls.h"
#include "objbase.h" #include "objbase.h"
...@@ -40,3 +41,21 @@ GpStatus WINGDIPAPI GdipCreateFontFromLogfontW(HDC hdc, ...@@ -40,3 +41,21 @@ GpStatus WINGDIPAPI GdipCreateFontFromLogfontW(HDC hdc,
return Ok; return Ok;
} }
GpStatus WINGDIPAPI GdipCreateFontFromLogfontA(HDC hdc,
GDIPCONST LOGFONTA *lfa, GpFont **font)
{
LOGFONTW lfw;
if(!lfa || !font)
return InvalidParameter;
memcpy(&lfw, lfa, sizeof(LOGFONTA));
if(!MultiByteToWideChar(CP_ACP, 0, lfa->lfFaceName, -1, lfw.lfFaceName, LF_FACESIZE))
return GenericError;
GdipCreateFontFromLogfontW(hdc, &lfw, font);
return Ok;
}
...@@ -87,7 +87,7 @@ ...@@ -87,7 +87,7 @@
@ stub GdipCreateFont @ stub GdipCreateFont
@ stub GdipCreateFontFamilyFromName @ stub GdipCreateFontFamilyFromName
@ stub GdipCreateFontFromDC @ stub GdipCreateFontFromDC
@ stub GdipCreateFontFromLogfontA @ stdcall GdipCreateFontFromLogfontA(ptr ptr ptr)
@ stdcall GdipCreateFontFromLogfontW(ptr ptr ptr) @ stdcall GdipCreateFontFromLogfontW(ptr ptr ptr)
@ stub GdipCreateFromHDC2 @ stub GdipCreateFromHDC2
@ stdcall GdipCreateFromHDC(long ptr) @ stdcall GdipCreateFromHDC(long ptr)
......
...@@ -236,6 +236,7 @@ GpStatus WINGDIPAPI GdipSetImageAttributesColorMatrix(GpImageAttributes*, ...@@ -236,6 +236,7 @@ GpStatus WINGDIPAPI GdipSetImageAttributesColorMatrix(GpImageAttributes*,
GpStatus WINGDIPAPI GdipSetImageAttributesWrapMode(GpImageAttributes*,WrapMode, GpStatus WINGDIPAPI GdipSetImageAttributesWrapMode(GpImageAttributes*,WrapMode,
ARGB,BOOL); ARGB,BOOL);
GpStatus WINGDIPAPI GdipCreateFontFromLogfontA(HDC,GDIPCONST LOGFONTA*,GpFont**);
GpStatus WINGDIPAPI GdipCreateFontFromLogfontW(HDC,GDIPCONST LOGFONTW*,GpFont**); GpStatus WINGDIPAPI GdipCreateFontFromLogfontW(HDC,GDIPCONST LOGFONTW*,GpFont**);
#ifdef __cplusplus #ifdef __cplusplus
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment