return Ok;
}
+GpStatus WINGDIPAPI GdipCreateFontFromDC(HDC hdc, GpFont **font)
+{
+ HFONT hfont;
+ LOGFONTW lfw;
+
+ if(!font)
+ return InvalidParameter;
+
+ hfont = (HFONT)GetCurrentObject(hdc, OBJ_FONT);
+ if(!hfont)
+ return GenericError;
+
+ if(!GetObjectW(hfont, sizeof(LOGFONTW), &lfw))
+ return GenericError;
+
+ return GdipCreateFontFromLogfontW(hdc, &lfw, font);
+}
+
/* FIXME: use graphics */
GpStatus WINGDIPAPI GdipGetLogFontW(GpFont *font, GpGraphics *graphics,
LOGFONTW *lfw)
return Ok;
}
+
+GpStatus WINGDIPAPI GdipCloneFont(GpFont *font, GpFont **cloneFont)
+{
+ if(!font || !cloneFont)
+ return InvalidParameter;
+
+ *cloneFont = GdipAlloc(sizeof(GpFont));
+ if(!*cloneFont) return OutOfMemory;
+
+ **cloneFont = *font;
+
+ return Ok;
+}