fonts: linking #5

Huw D M Davies h.davies1 at physics.ox.ac.uk
Wed Sep 7 05:20:59 CDT 2005


This is an undoc'ed gdi32 api.  I've put its prototype in
gdi_private.h (ExtTextOut will require it) - I hope that makes sense.

        Huw Davies <huw at codeweavers.com>
        Implement FontIsLinked
-- 
Huw Davies
huw at codeweavers.com
--- dlls/gdi/freetype.c	2005-09-07 11:09:18.439020615 +0100
+++ dlls/gdi/freetype.c	2005-09-07 11:13:47.825524623 +0100
@@ -3531,6 +3531,23 @@ BOOL WineEngGetLinkedHFont(DC *dc, WCHAR
 
     return ret;
 }
+    
+
+/*************************************************************
+ *     FontIsLinked
+ */
+BOOL WINAPI FontIsLinked(HDC hdc)
+{
+    DC *dc = DC_GetDCPtr(hdc);
+    BOOL ret = FALSE;
+
+    if(!dc) return FALSE;
+    if(dc->gdiFont && !list_empty(&dc->gdiFont->child_fonts))
+        ret = TRUE;
+    GDI_ReleaseObj(hdc);
+    TRACE("returning %d\n", ret);
+    return ret;
+}
 
 #else /* HAVE_FREETYPE */
 
@@ -3642,4 +3659,9 @@ BOOL WineEngGetLinkedHFont(DC *dc, WCHAR
 {
     return FALSE;
 }
+
+BOOL WINAPI FontIsLinked(HDC hdc)
+{
+    return FALSE;
+}
 #endif /* HAVE_FREETYPE */
Index: gdi_private.h
===================================================================
RCS file: /home/wine/wine/dlls/gdi/gdi_private.h,v
retrieving revision 1.27
diff -u -p -r1.27 gdi_private.h
--- dlls/gdi/gdi_private.h	7 Sep 2005 09:21:50 -0000	1.27
+++ dlls/gdi/gdi_private.h	7 Sep 2005 10:14:45 -0000
@@ -432,3 +432,5 @@ extern BOOL REGION_FrameRgn( HRGN dest, 
 /* Undocumented value for DIB's iUsage: Indicates a mono DIB w/o pal enties */
 #define DIB_PAL_MONO 2
 #endif /* __WINE_GDI_PRIVATE_H */
+
+BOOL WINAPI FontIsLinked(HDC);
Index: gdi32.spec
===================================================================
RCS file: /home/wine/wine/dlls/gdi/gdi32.spec,v
retrieving revision 1.51
diff -u -p -r1.51 gdi32.spec
--- dlls/gdi/gdi32.spec	15 Aug 2005 09:45:40 -0000	1.51
+++ dlls/gdi/gdi32.spec	7 Sep 2005 10:14:51 -0000
@@ -125,7 +125,7 @@
 @ stdcall FixBrushOrgEx(long long long ptr)
 @ stdcall FlattenPath(long)
 @ stdcall FloodFill(long long long long)
-# @ stub FontIsLinked
+@ stdcall FontIsLinked(long)
 @ stdcall FrameRgn(long long long long long)
 @ stub FreeImageColorMatcher
 # @ stub GdiAddFontResourceW



More information about the wine-patches mailing list