gdiplus: Implement GdipGetFontStyle.
[wine.git] / dlls / gdiplus / font.c
blob9839a45a28a7559c4f0504f4558dee79aa86f966
1 /*
2 * Copyright (C) 2007 Google (Evan Stade)
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #include <stdarg.h>
21 #include "windef.h"
22 #include "winbase.h"
23 #include "wingdi.h"
24 #include "winnls.h"
25 #include "winreg.h"
26 #include "wine/debug.h"
27 #include "wine/unicode.h"
29 WINE_DEFAULT_DEBUG_CHANNEL (gdiplus);
31 #include "objbase.h"
33 #include "gdiplus.h"
34 #include "gdiplus_private.h"
36 static const REAL mm_per_inch = 25.4;
37 static const REAL inch_per_point = 1.0/72.0;
39 static inline REAL get_dpi (void)
41 REAL dpi;
42 GpGraphics *graphics;
43 HDC hdc = GetDC(0);
44 GdipCreateFromHDC (hdc, &graphics);
45 GdipGetDpiX(graphics, &dpi);
46 GdipDeleteGraphics(graphics);
47 ReleaseDC (0, hdc);
49 return dpi;
52 static inline REAL point_to_pixel (REAL point)
54 return point * get_dpi() * inch_per_point;
57 static inline REAL inch_to_pixel (REAL inch)
59 return inch * get_dpi();
62 static inline REAL document_to_pixel (REAL doc)
64 return doc * (get_dpi() / 300.0); /* Per MSDN */
67 static inline REAL mm_to_pixel (REAL mm)
69 return mm * (get_dpi() / mm_per_inch);
72 /*******************************************************************************
73 * GdipCreateFont [GDIPLUS.@]
75 * Create a new font based off of a FontFamily
77 * PARAMS
78 * *fontFamily [I] Family to base the font off of
79 * emSize [I] Size of the font
80 * style [I] Bitwise OR of FontStyle enumeration
81 * unit [I] Unit emSize is measured in
82 * **font [I] the resulting Font object
84 * RETURNS
85 * SUCCESS: Ok
86 * FAILURE: InvalidParameter if fontfamily or font is NULL.
87 * FAILURE: FontFamilyNotFound if an invalid FontFamily is given
89 * NOTES
90 * UnitDisplay is unsupported.
91 * emSize is stored separately from lfHeight, to hold the fraction.
93 GpStatus WINGDIPAPI GdipCreateFont(GDIPCONST GpFontFamily *fontFamily,
94 REAL emSize, INT style, Unit unit, GpFont **font)
96 WCHAR facename[LF_FACESIZE];
97 LOGFONTW* lfw;
98 const NEWTEXTMETRICW* tmw;
99 GpStatus stat;
101 if (!fontFamily || !font)
102 return InvalidParameter;
104 TRACE("%p (%s), %f, %d, %d, %p\n", fontFamily,
105 debugstr_w(fontFamily->FamilyName), emSize, style, unit, font);
107 stat = GdipGetFamilyName (fontFamily, facename, 0);
108 if (stat != Ok) return stat;
109 *font = GdipAlloc(sizeof(GpFont));
111 tmw = &fontFamily->tmw;
112 lfw = &((*font)->lfw);
113 ZeroMemory(&(*lfw), sizeof(*lfw));
115 lfw->lfWeight = tmw->tmWeight;
116 lfw->lfItalic = tmw->tmItalic;
117 lfw->lfUnderline = tmw->tmUnderlined;
118 lfw->lfStrikeOut = tmw->tmStruckOut;
119 lfw->lfCharSet = tmw->tmCharSet;
120 lfw->lfPitchAndFamily = tmw->tmPitchAndFamily;
121 lstrcpynW(lfw->lfFaceName, facename, LF_FACESIZE);
123 switch (unit)
125 case UnitWorld:
126 /* FIXME: Figure out when World != Pixel */
127 lfw->lfHeight = emSize; break;
128 case UnitDisplay:
129 FIXME("Unknown behavior for UnitDisplay! Please report!\n");
130 /* FIXME: Figure out how this works...
131 * MSDN says that if "DISPLAY" is a monitor, then pixel should be
132 * used. That's not what I got. Tests on Windows revealed no output,
133 * and the tests in tests/font crash windows */
134 lfw->lfHeight = 0; break;
135 case UnitPixel:
136 lfw->lfHeight = emSize; break;
137 case UnitPoint:
138 lfw->lfHeight = point_to_pixel(emSize); break;
139 case UnitInch:
140 lfw->lfHeight = inch_to_pixel(emSize); break;
141 case UnitDocument:
142 lfw->lfHeight = document_to_pixel(emSize); break;
143 case UnitMillimeter:
144 lfw->lfHeight = mm_to_pixel(emSize); break;
147 lfw->lfHeight *= -1;
149 lfw->lfWeight = style & FontStyleBold ? 700 : 400;
150 lfw->lfItalic = style & FontStyleItalic;
151 lfw->lfUnderline = style & FontStyleUnderline;
152 lfw->lfStrikeOut = style & FontStyleStrikeout;
154 (*font)->unit = unit;
155 (*font)->emSize = emSize;
157 return Ok;
160 /*******************************************************************************
161 * GdipCreateFontFromLogfontW [GDIPLUS.@]
163 GpStatus WINGDIPAPI GdipCreateFontFromLogfontW(HDC hdc,
164 GDIPCONST LOGFONTW *logfont, GpFont **font)
166 HFONT hfont, oldfont;
167 TEXTMETRICW textmet;
169 if(!logfont || !font)
170 return InvalidParameter;
172 *font = GdipAlloc(sizeof(GpFont));
173 if(!*font) return OutOfMemory;
175 memcpy((*font)->lfw.lfFaceName, logfont->lfFaceName, LF_FACESIZE *
176 sizeof(WCHAR));
177 (*font)->lfw.lfHeight = logfont->lfHeight;
178 (*font)->lfw.lfItalic = logfont->lfItalic;
179 (*font)->lfw.lfUnderline = logfont->lfUnderline;
180 (*font)->lfw.lfStrikeOut = logfont->lfStrikeOut;
182 (*font)->emSize = logfont->lfHeight;
183 (*font)->unit = UnitPixel;
185 hfont = CreateFontIndirectW(&(*font)->lfw);
186 oldfont = SelectObject(hdc, hfont);
187 GetTextMetricsW(hdc, &textmet);
189 (*font)->lfw.lfHeight = -textmet.tmHeight;
190 (*font)->lfw.lfWeight = textmet.tmWeight;
192 SelectObject(hdc, oldfont);
193 DeleteObject(hfont);
195 return Ok;
198 /*******************************************************************************
199 * GdipCreateFontFromLogfontA [GDIPLUS.@]
201 GpStatus WINGDIPAPI GdipCreateFontFromLogfontA(HDC hdc,
202 GDIPCONST LOGFONTA *lfa, GpFont **font)
204 LOGFONTW lfw;
206 if(!lfa || !font)
207 return InvalidParameter;
209 memcpy(&lfw, lfa, FIELD_OFFSET(LOGFONTA,lfFaceName) );
211 if(!MultiByteToWideChar(CP_ACP, 0, lfa->lfFaceName, -1, lfw.lfFaceName, LF_FACESIZE))
212 return GenericError;
214 GdipCreateFontFromLogfontW(hdc, &lfw, font);
216 return Ok;
219 /*******************************************************************************
220 * GdipDeleteFont [GDIPLUS.@]
222 GpStatus WINGDIPAPI GdipDeleteFont(GpFont* font)
224 if(!font)
225 return InvalidParameter;
227 GdipFree(font);
229 return Ok;
232 /*******************************************************************************
233 * GdipCreateFontFromDC [GDIPLUS.@]
235 GpStatus WINGDIPAPI GdipCreateFontFromDC(HDC hdc, GpFont **font)
237 HFONT hfont;
238 LOGFONTW lfw;
240 if(!font)
241 return InvalidParameter;
243 hfont = (HFONT)GetCurrentObject(hdc, OBJ_FONT);
244 if(!hfont)
245 return GenericError;
247 if(!GetObjectW(hfont, sizeof(LOGFONTW), &lfw))
248 return GenericError;
250 return GdipCreateFontFromLogfontW(hdc, &lfw, font);
253 /*******************************************************************************
254 * GdipGetFamily [GDIPLUS.@]
256 * Returns the FontFamily for the specified Font
258 * PARAMS
259 * font [I] Font to request from
260 * family [O] Resulting FontFamily object
262 * RETURNS
263 * SUCCESS: Ok
264 * FAILURE: An element of GpStatus
266 GpStatus WINGDIPAPI GdipGetFamily(GpFont *font, GpFontFamily **family)
268 TRACE("%p %p\n", font, family);
270 if (!(font && family))
271 return InvalidParameter;
273 return GdipCreateFontFamilyFromName(font->lfw.lfFaceName, NULL, family);
276 /******************************************************************************
277 * GdipGetFontSize [GDIPLUS.@]
279 * Returns the size of the font in Units
281 * PARAMS
282 * *font [I] The font to retrieve size from
283 * *size [O] Pointer to hold retrieved value
285 * RETURNS
286 * SUCCESS: Ok
287 * FAILURE: InvalidParamter (font or size was NULL)
289 * NOTES
290 * Size returned is actually emSize -- not internal size used for drawing.
292 GpStatus WINGDIPAPI GdipGetFontSize(GpFont *font, REAL *size)
294 if (!(font && size)) return InvalidParameter;
296 *size = font->emSize;
298 return Ok;
301 /*******************************************************************************
302 * GdipGetFontStyle [GDIPLUS.@]
304 * Gets the font's style, returned in bitwise OR of FontStyle enumeration
306 * PARAMS
307 * font [I] font to request from
308 * style [O] resulting pointer to a FontStyle enumeration
310 * RETURNS
311 * SUCCESS: Ok
312 * FAILURE: InvalidParameter
314 GpStatus WINGDIPAPI GdipGetFontStyle(GpFont *font, INT *style)
316 TRACE("%p %p\n", font, style);
318 if (!(font && style))
319 return InvalidParameter;
321 if (font->lfw.lfWeight > 400)
322 *style = FontStyleBold;
323 else
324 *style = 0;
325 if (font->lfw.lfItalic)
326 *style |= FontStyleItalic;
327 if (font->lfw.lfUnderline)
328 *style |= FontStyleUnderline;
329 if (font->lfw.lfStrikeOut)
330 *style |= FontStyleStrikeout;
332 return Ok;
335 /*******************************************************************************
336 * GdipGetFontUnit [GDIPLUS.@]
338 * PARAMS
339 * font [I] Font to retrieve from
340 * unit [O] Return value
342 * RETURNS
343 * FAILURE: font or unit was NULL
344 * OK: otherwise
346 GpStatus WINGDIPAPI GdipGetFontUnit(GpFont *font, Unit *unit)
348 if (!(font && unit)) return InvalidParameter;
350 *unit = font->unit;
352 return Ok;
355 /*******************************************************************************
356 * GdipGetLogFontW [GDIPLUS.@]
358 GpStatus WINGDIPAPI GdipGetLogFontW(GpFont *font, GpGraphics *graphics,
359 LOGFONTW *lfw)
361 /* FIXME: use graphics */
362 if(!font || !graphics || !lfw)
363 return InvalidParameter;
365 *lfw = font->lfw;
367 return Ok;
370 /*******************************************************************************
371 * GdipCloneFont [GDIPLUS.@]
373 GpStatus WINGDIPAPI GdipCloneFont(GpFont *font, GpFont **cloneFont)
375 if(!font || !cloneFont)
376 return InvalidParameter;
378 *cloneFont = GdipAlloc(sizeof(GpFont));
379 if(!*cloneFont) return OutOfMemory;
381 **cloneFont = *font;
383 return Ok;
386 /*******************************************************************************
387 * GdipGetFontHeightGivenDPI [GDIPLUS.@]
388 * PARAMS
389 * font [I] Font to retrieve DPI from
390 * dpi [I] DPI to assume
391 * height [O] Return value
393 * RETURNS
394 * SUCCESS: Ok
395 * FAILURE: InvalidParameter if font or height is NULL
397 * NOTES
398 * According to MSDN, the result is (lineSpacing)*(fontSize / emHeight)*dpi
399 * (for anything other than unit Pixel)
401 GpStatus WINGDIPAPI GdipGetFontHeightGivenDPI(GDIPCONST GpFont *font, REAL dpi, REAL *height)
403 if (!(font && height)) return InvalidParameter;
405 FIXME("%p (%s), %f, %p\n", font,
406 debugstr_w(font->lfw.lfFaceName), dpi, height);
408 return NotImplemented;
411 /***********************************************************************
412 * Borrowed from GDI32:
414 * Elf is really an ENUMLOGFONTEXW, and ntm is a NEWTEXTMETRICEXW.
415 * We have to use other types because of the FONTENUMPROCW definition.
417 static INT CALLBACK is_font_installed_proc(const LOGFONTW *elf,
418 const TEXTMETRICW *ntm, DWORD type, LPARAM lParam)
420 if (!ntm)
422 return 1;
425 *(NEWTEXTMETRICW*)lParam = *(const NEWTEXTMETRICW*)ntm;
427 return 0;
430 static BOOL find_installed_font(const WCHAR *name, NEWTEXTMETRICW *ntm)
432 HDC hdc = GetDC(0);
433 BOOL ret = FALSE;
435 if(!EnumFontFamiliesW(hdc, name, is_font_installed_proc, (LPARAM)ntm))
436 ret = TRUE;
438 ReleaseDC(0, hdc);
439 return ret;
442 /*******************************************************************************
443 * GdipCreateFontFamilyFromName [GDIPLUS.@]
445 * Creates a font family object based on a supplied name
447 * PARAMS
448 * name [I] Name of the font
449 * fontCollection [I] What font collection (if any) the font belongs to (may be NULL)
450 * FontFamily [O] Pointer to the resulting FontFamily object
452 * RETURNS
453 * SUCCESS: Ok
454 * FAILURE: FamilyNotFound if the requested FontFamily does not exist on the system
455 * FAILURE: Invalid parameter if FontFamily or name is NULL
457 * NOTES
458 * If fontCollection is NULL then the object is not part of any collection
462 GpStatus WINGDIPAPI GdipCreateFontFamilyFromName(GDIPCONST WCHAR *name,
463 GpFontCollection *fontCollection,
464 GpFontFamily **FontFamily)
466 GpFontFamily* ffamily;
467 NEWTEXTMETRICW ntm;
469 TRACE("%s, %p %p\n", debugstr_w(name), fontCollection, FontFamily);
471 if (!(name && FontFamily))
472 return InvalidParameter;
473 if (fontCollection)
474 FIXME("No support for FontCollections yet!\n");
476 if (!find_installed_font(name, &ntm))
477 return FontFamilyNotFound;
479 ffamily = GdipAlloc(sizeof (GpFontFamily));
480 if (!ffamily) return OutOfMemory;
482 ffamily->tmw = ntm;
483 lstrcpynW(ffamily->FamilyName, name, LF_FACESIZE);
485 *FontFamily = ffamily;
487 return Ok;
490 /*******************************************************************************
491 * GdipCloneFontFamily [GDIPLUS.@]
493 * Creates a deep copy of a Font Family object
495 * PARAMS
496 * FontFamily [I] Font to clone
497 * clonedFontFamily [O] The resulting cloned font
499 * RETURNS
500 * SUCCESS: Ok
502 GpStatus WINGDIPAPI GdipCloneFontFamily(GpFontFamily* FontFamily, GpFontFamily** clonedFontFamily)
504 if (!(FontFamily && clonedFontFamily)) return InvalidParameter;
506 TRACE("stub: %p (%s), %p\n", FontFamily,
507 debugstr_w(FontFamily->FamilyName), clonedFontFamily);
509 *clonedFontFamily = GdipAlloc(sizeof(GpFontFamily));
510 if (!*clonedFontFamily) return OutOfMemory;
512 (*clonedFontFamily)->tmw = FontFamily->tmw;
513 lstrcpyW((*clonedFontFamily)->FamilyName, FontFamily->FamilyName);
515 return Ok;
518 /*******************************************************************************
519 * GdipGetFamilyName [GDIPLUS.@]
521 * Returns the family name into name
523 * PARAMS
524 * *family [I] Family to retrieve from
525 * *name [O] WCHARS of the family name
526 * LANGID [I] charset
528 * RETURNS
529 * SUCCESS: Ok
530 * FAILURE: InvalidParameter if family is NULL
532 * NOTES
533 * If name is a NULL ptr, then both XP and Vista will crash (so we do as well)
535 GpStatus WINGDIPAPI GdipGetFamilyName (GDIPCONST GpFontFamily *family,
536 WCHAR *name, LANGID language)
538 if (family == NULL)
539 return InvalidParameter;
541 TRACE("%p, %p, %d\n", family, name, language);
543 if (language != LANG_NEUTRAL)
544 FIXME("No support for handling of multiple languages!\n");
546 lstrcpynW (name, family->FamilyName, LF_FACESIZE);
548 return Ok;
552 /*****************************************************************************
553 * GdipDeleteFontFamily [GDIPLUS.@]
555 * Removes the specified FontFamily
557 * PARAMS
558 * *FontFamily [I] The family to delete
560 * RETURNS
561 * SUCCESS: Ok
562 * FAILURE: InvalidParameter if FontFamily is NULL.
565 GpStatus WINGDIPAPI GdipDeleteFontFamily(GpFontFamily *FontFamily)
567 if (!FontFamily)
568 return InvalidParameter;
569 TRACE("Deleting %p (%s)\n", FontFamily, debugstr_w(FontFamily->FamilyName));
571 GdipFree (FontFamily);
573 return Ok;
576 GpStatus WINGDIPAPI GdipGetCellAscent(GDIPCONST GpFontFamily *family,
577 INT style, UINT16* CellAscent)
579 if (!(family && CellAscent)) return InvalidParameter;
581 *CellAscent = family->tmw.tmAscent;
583 return Ok;
586 GpStatus WINGDIPAPI GdipGetCellDescent(GDIPCONST GpFontFamily *family,
587 INT style, UINT16* CellDescent)
589 if (!(family && CellDescent)) return InvalidParameter;
591 *CellDescent = family->tmw.tmDescent;
593 return Ok;
596 /*******************************************************************************
597 * GdipGetEmHeight [GDIPLUS.@]
599 * Gets the height of the specified family in EmHeights
601 * PARAMS
602 * family [I] Family to retrieve from
603 * style [I] (optional) style
604 * EmHeight [O] return value
606 * RETURNS
607 * SUCCESS: Ok
608 * FAILURE: InvalidParameter
610 GpStatus WINGDIPAPI GdipGetEmHeight(GDIPCONST GpFontFamily *family, INT style, UINT16* EmHeight)
612 if (!(family && EmHeight)) return InvalidParameter;
614 TRACE("%p (%s), %d, %p, stub!\n", family,
615 debugstr_w(family->FamilyName), style, EmHeight);
617 *EmHeight = family->tmw.ntmSizeEM;
619 return Ok;
623 /*******************************************************************************
624 * GdipGetLineSpacing [GDIPLUS.@]
626 * Returns the line spacing in design units
628 * PARAMS
629 * family [I] Family to retrieve from
630 * style [I] (Optional) font style
631 * LineSpacing [O] Return value
633 * RETURNS
634 * SUCCESS: Ok
635 * FAILURE: InvalidParameter (family or LineSpacing was NULL)
637 GpStatus WINGDIPAPI GdipGetLineSpacing(GDIPCONST GpFontFamily *family,
638 INT style, UINT16* LineSpacing)
640 if (!(family && LineSpacing)) return InvalidParameter;
642 FIXME("stub!\n");
644 return NotImplemented;
647 GpStatus WINGDIPAPI GdipIsStyleAvailable(GDIPCONST GpFontFamily* family,
648 INT style, BOOL* IsStyleAvailable)
650 FIXME("%p %d %p stub!\n", family, style, IsStyleAvailable);
652 if (!(family && IsStyleAvailable))
653 return InvalidParameter;
655 return NotImplemented;
658 /*****************************************************************************
659 * GdipGetGenericFontFamilyMonospace [GDIPLUS.@]
661 * Obtains a serif family (Courier New on Windows)
663 * PARAMS
664 * **nativeFamily [I] Where the font will be stored
666 * RETURNS
667 * InvalidParameter if nativeFamily is NULL.
668 * Ok otherwise.
670 GpStatus WINGDIPAPI GdipGetGenericFontFamilyMonospace(GpFontFamily **nativeFamily)
672 static const WCHAR CourierNew[] = {'C','o','u','r','i','e','r',' ','N','e','w','\0'};
674 if (nativeFamily == NULL) return InvalidParameter;
676 return GdipCreateFontFamilyFromName(CourierNew, NULL, nativeFamily);
679 /*****************************************************************************
680 * GdipGetGenericFontFamilySerif [GDIPLUS.@]
682 * Obtains a serif family (Times New Roman on Windows)
684 * PARAMS
685 * **nativeFamily [I] Where the font will be stored
687 * RETURNS
688 * InvalidParameter if nativeFamily is NULL.
689 * Ok otherwise.
691 GpStatus WINGDIPAPI GdipGetGenericFontFamilySerif(GpFontFamily **nativeFamily)
693 static const WCHAR TimesNewRoman[] = {'T','i','m','e','s',' ','N','e','w',' ','R','o','m','a','n','\0'};
695 if (nativeFamily == NULL) return InvalidParameter;
697 return GdipCreateFontFamilyFromName(TimesNewRoman, NULL, nativeFamily);
700 /*****************************************************************************
701 * GdipGetGenericFontFamilySansSerif [GDIPLUS.@]
703 * Obtains a serif family (Microsoft Sans Serif on Windows)
705 * PARAMS
706 * **nativeFamily [I] Where the font will be stored
708 * RETURNS
709 * InvalidParameter if nativeFamily is NULL.
710 * Ok otherwise.
712 GpStatus WINGDIPAPI GdipGetGenericFontFamilySansSerif(GpFontFamily **nativeFamily)
714 /* FIXME: On Windows this is called Microsoft Sans Serif, this shouldn't
715 * affect anything */
716 static const WCHAR MSSansSerif[] = {'M','S',' ','S','a','n','s',' ','S','e','r','i','f','\0'};
718 if (nativeFamily == NULL) return InvalidParameter;
720 return GdipCreateFontFamilyFromName(MSSansSerif, NULL, nativeFamily);
723 /*****************************************************************************
724 * GdipGetGenericFontFamilySansSerif [GDIPLUS.@]
726 GpStatus WINGDIPAPI GdipNewPrivateFontCollection(GpFontCollection** fontCollection)
728 FIXME("stub %p\n", fontCollection);
730 if (!fontCollection)
731 return InvalidParameter;
733 return NotImplemented;
736 /*****************************************************************************
737 * GdipDeletePrivateFontCollection [GDIPLUS.@]
739 GpStatus WINGDIPAPI GdipDeletePrivateFontCollection(GpFontCollection **fontCollection)
741 FIXME("stub %p\n", fontCollection);
743 if (!fontCollection)
744 return InvalidParameter;
746 return NotImplemented;
749 /*****************************************************************************
750 * GdipPrivateAddFontFile [GDIPLUS.@]
752 GpStatus WINGDIPAPI GdipPrivateAddFontFile(GpFontCollection* fontCollection,
753 GDIPCONST WCHAR* filename)
755 FIXME("stub: %p, %s\n", fontCollection, debugstr_w(filename));
757 if (!(fontCollection && filename))
758 return InvalidParameter;
760 return NotImplemented;
763 /*****************************************************************************
764 * GdipGetFontCollectionFamilyCount [GDIPLUS.@]
766 GpStatus WINGDIPAPI GdipGetFontCollectionFamilyCount(
767 GpFontCollection* fontCollection, INT* numFound)
769 FIXME("stub: %p, %p\n", fontCollection, numFound);
771 if (!(fontCollection && numFound))
772 return InvalidParameter;
774 return NotImplemented;
777 /*****************************************************************************
778 * GdipGetFontCollectionFamilyList [GDIPLUS.@]
780 GpStatus WINGDIPAPI GdipGetFontCollectionFamilyList(
781 GpFontCollection* fontCollection, INT numSought,
782 GpFontFamily* gpfamilies[], INT* numFound)
784 FIXME("stub: %p, %d, %p, %p\n", fontCollection, numSought, gpfamilies,
785 numFound);
787 if (!(fontCollection && gpfamilies && numFound))
788 return InvalidParameter;
790 return NotImplemented;