push 18e7434c914c4b496a7d961dbc3fc7a912612215
[wine/hacks.git] / dlls / gdiplus / font.c
blob3a9d36ddd50cb0aeafaa7560dec311f33606da42
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 if (logfont->lfFaceName[0] == 0)
173 return NotTrueTypeFont;
175 *font = GdipAlloc(sizeof(GpFont));
176 if(!*font) return OutOfMemory;
178 memcpy((*font)->lfw.lfFaceName, logfont->lfFaceName, LF_FACESIZE *
179 sizeof(WCHAR));
180 (*font)->lfw.lfHeight = logfont->lfHeight;
181 (*font)->lfw.lfItalic = logfont->lfItalic;
182 (*font)->lfw.lfUnderline = logfont->lfUnderline;
183 (*font)->lfw.lfStrikeOut = logfont->lfStrikeOut;
185 (*font)->emSize = logfont->lfHeight;
186 (*font)->unit = UnitPixel;
188 hfont = CreateFontIndirectW(&(*font)->lfw);
189 oldfont = SelectObject(hdc, hfont);
190 GetTextMetricsW(hdc, &textmet);
192 (*font)->lfw.lfHeight = -textmet.tmHeight;
193 (*font)->lfw.lfWeight = textmet.tmWeight;
195 SelectObject(hdc, oldfont);
196 DeleteObject(hfont);
198 return Ok;
201 /*******************************************************************************
202 * GdipCreateFontFromLogfontA [GDIPLUS.@]
204 GpStatus WINGDIPAPI GdipCreateFontFromLogfontA(HDC hdc,
205 GDIPCONST LOGFONTA *lfa, GpFont **font)
207 LOGFONTW lfw;
209 if(!lfa || !font)
210 return InvalidParameter;
212 memcpy(&lfw, lfa, FIELD_OFFSET(LOGFONTA,lfFaceName) );
214 if(!MultiByteToWideChar(CP_ACP, 0, lfa->lfFaceName, -1, lfw.lfFaceName, LF_FACESIZE))
215 return GenericError;
217 GdipCreateFontFromLogfontW(hdc, &lfw, font);
219 return Ok;
222 /*******************************************************************************
223 * GdipDeleteFont [GDIPLUS.@]
225 GpStatus WINGDIPAPI GdipDeleteFont(GpFont* font)
227 if(!font)
228 return InvalidParameter;
230 GdipFree(font);
232 return Ok;
235 /*******************************************************************************
236 * GdipCreateFontFromDC [GDIPLUS.@]
238 GpStatus WINGDIPAPI GdipCreateFontFromDC(HDC hdc, GpFont **font)
240 HFONT hfont;
241 LOGFONTW lfw;
243 if(!font)
244 return InvalidParameter;
246 hfont = (HFONT)GetCurrentObject(hdc, OBJ_FONT);
247 if(!hfont)
248 return GenericError;
250 if(!GetObjectW(hfont, sizeof(LOGFONTW), &lfw))
251 return GenericError;
253 return GdipCreateFontFromLogfontW(hdc, &lfw, font);
256 /*******************************************************************************
257 * GdipGetFamily [GDIPLUS.@]
259 * Returns the FontFamily for the specified Font
261 * PARAMS
262 * font [I] Font to request from
263 * family [O] Resulting FontFamily object
265 * RETURNS
266 * SUCCESS: Ok
267 * FAILURE: An element of GpStatus
269 GpStatus WINGDIPAPI GdipGetFamily(GpFont *font, GpFontFamily **family)
271 TRACE("%p %p\n", font, family);
273 if (!(font && family))
274 return InvalidParameter;
276 return GdipCreateFontFamilyFromName(font->lfw.lfFaceName, NULL, family);
279 /******************************************************************************
280 * GdipGetFontSize [GDIPLUS.@]
282 * Returns the size of the font in Units
284 * PARAMS
285 * *font [I] The font to retrieve size from
286 * *size [O] Pointer to hold retrieved value
288 * RETURNS
289 * SUCCESS: Ok
290 * FAILURE: InvalidParamter (font or size was NULL)
292 * NOTES
293 * Size returned is actually emSize -- not internal size used for drawing.
295 GpStatus WINGDIPAPI GdipGetFontSize(GpFont *font, REAL *size)
297 if (!(font && size)) return InvalidParameter;
299 *size = font->emSize;
301 return Ok;
304 /*******************************************************************************
305 * GdipGetFontStyle [GDIPLUS.@]
307 * Gets the font's style, returned in bitwise OR of FontStyle enumeration
309 * PARAMS
310 * font [I] font to request from
311 * style [O] resulting pointer to a FontStyle enumeration
313 * RETURNS
314 * SUCCESS: Ok
315 * FAILURE: InvalidParameter
317 GpStatus WINGDIPAPI GdipGetFontStyle(GpFont *font, INT *style)
319 TRACE("%p %p\n", font, style);
321 if (!(font && style))
322 return InvalidParameter;
324 if (font->lfw.lfWeight > 400)
325 *style = FontStyleBold;
326 else
327 *style = 0;
328 if (font->lfw.lfItalic)
329 *style |= FontStyleItalic;
330 if (font->lfw.lfUnderline)
331 *style |= FontStyleUnderline;
332 if (font->lfw.lfStrikeOut)
333 *style |= FontStyleStrikeout;
335 return Ok;
338 /*******************************************************************************
339 * GdipGetFontUnit [GDIPLUS.@]
341 * PARAMS
342 * font [I] Font to retrieve from
343 * unit [O] Return value
345 * RETURNS
346 * FAILURE: font or unit was NULL
347 * OK: otherwise
349 GpStatus WINGDIPAPI GdipGetFontUnit(GpFont *font, Unit *unit)
351 if (!(font && unit)) return InvalidParameter;
353 *unit = font->unit;
355 return Ok;
358 /*******************************************************************************
359 * GdipGetLogFontW [GDIPLUS.@]
361 GpStatus WINGDIPAPI GdipGetLogFontW(GpFont *font, GpGraphics *graphics,
362 LOGFONTW *lfw)
364 /* FIXME: use graphics */
365 if(!font || !graphics || !lfw)
366 return InvalidParameter;
368 *lfw = font->lfw;
370 return Ok;
373 /*******************************************************************************
374 * GdipCloneFont [GDIPLUS.@]
376 GpStatus WINGDIPAPI GdipCloneFont(GpFont *font, GpFont **cloneFont)
378 if(!font || !cloneFont)
379 return InvalidParameter;
381 *cloneFont = GdipAlloc(sizeof(GpFont));
382 if(!*cloneFont) return OutOfMemory;
384 **cloneFont = *font;
386 return Ok;
389 /*******************************************************************************
390 * GdipGetFontHeight [GDIPLUS.@]
391 * PARAMS
392 * font [I] Font to retrieve height from
393 * graphics [I] The current graphics context
394 * height [O] Resulting height
395 * RETURNS
396 * SUCCESS: Ok
397 * FAILURE: Another element of GpStatus
399 * NOTES
400 * Forwards to GdipGetFontHeightGivenDPI
402 GpStatus WINGDIPAPI GdipGetFontHeight(GDIPCONST GpFont *font,
403 GDIPCONST GpGraphics *graphics, REAL *height)
405 REAL dpi;
407 TRACE("%p %p %p\n", font, graphics, height);
409 dpi = GetDeviceCaps(graphics->hdc, LOGPIXELSY);
411 return GdipGetFontHeightGivenDPI(font, dpi, height);
414 /*******************************************************************************
415 * GdipGetFontHeightGivenDPI [GDIPLUS.@]
416 * PARAMS
417 * font [I] Font to retrieve DPI from
418 * dpi [I] DPI to assume
419 * height [O] Return value
421 * RETURNS
422 * SUCCESS: Ok
423 * FAILURE: InvalidParameter if font or height is NULL
425 * NOTES
426 * According to MSDN, the result is (lineSpacing)*(fontSize / emHeight)*dpi
427 * (for anything other than unit Pixel)
429 GpStatus WINGDIPAPI GdipGetFontHeightGivenDPI(GDIPCONST GpFont *font, REAL dpi, REAL *height)
431 TRACE("%p (%s), %f, %p\n", font,
432 debugstr_w(font->lfw.lfFaceName), dpi, height);
434 if (!(font && height)) return InvalidParameter;
436 switch (font->unit)
438 case UnitPixel:
439 *height = font->emSize;
440 break;
441 default:
442 FIXME("Unhandled unit type: %d\n", font->unit);
443 return NotImplemented;
446 return Ok;
449 /***********************************************************************
450 * Borrowed from GDI32:
452 * Elf is really an ENUMLOGFONTEXW, and ntm is a NEWTEXTMETRICEXW.
453 * We have to use other types because of the FONTENUMPROCW definition.
455 static INT CALLBACK is_font_installed_proc(const LOGFONTW *elf,
456 const TEXTMETRICW *ntm, DWORD type, LPARAM lParam)
458 if (!ntm)
460 return 1;
463 *(NEWTEXTMETRICW*)lParam = *(const NEWTEXTMETRICW*)ntm;
465 return 0;
468 static BOOL find_installed_font(const WCHAR *name, NEWTEXTMETRICW *ntm)
470 HDC hdc = GetDC(0);
471 BOOL ret = FALSE;
473 if(!EnumFontFamiliesW(hdc, name, is_font_installed_proc, (LPARAM)ntm))
474 ret = TRUE;
476 ReleaseDC(0, hdc);
477 return ret;
480 /*******************************************************************************
481 * GdipCreateFontFamilyFromName [GDIPLUS.@]
483 * Creates a font family object based on a supplied name
485 * PARAMS
486 * name [I] Name of the font
487 * fontCollection [I] What font collection (if any) the font belongs to (may be NULL)
488 * FontFamily [O] Pointer to the resulting FontFamily object
490 * RETURNS
491 * SUCCESS: Ok
492 * FAILURE: FamilyNotFound if the requested FontFamily does not exist on the system
493 * FAILURE: Invalid parameter if FontFamily or name is NULL
495 * NOTES
496 * If fontCollection is NULL then the object is not part of any collection
500 GpStatus WINGDIPAPI GdipCreateFontFamilyFromName(GDIPCONST WCHAR *name,
501 GpFontCollection *fontCollection,
502 GpFontFamily **FontFamily)
504 GpFontFamily* ffamily;
505 NEWTEXTMETRICW ntm;
507 TRACE("%s, %p %p\n", debugstr_w(name), fontCollection, FontFamily);
509 if (!(name && FontFamily))
510 return InvalidParameter;
511 if (fontCollection)
512 FIXME("No support for FontCollections yet!\n");
514 if (!find_installed_font(name, &ntm))
515 return FontFamilyNotFound;
517 ffamily = GdipAlloc(sizeof (GpFontFamily));
518 if (!ffamily) return OutOfMemory;
520 ffamily->tmw = ntm;
521 lstrcpynW(ffamily->FamilyName, name, LF_FACESIZE);
523 *FontFamily = ffamily;
525 return Ok;
528 /*******************************************************************************
529 * GdipCloneFontFamily [GDIPLUS.@]
531 * Creates a deep copy of a Font Family object
533 * PARAMS
534 * FontFamily [I] Font to clone
535 * clonedFontFamily [O] The resulting cloned font
537 * RETURNS
538 * SUCCESS: Ok
540 GpStatus WINGDIPAPI GdipCloneFontFamily(GpFontFamily* FontFamily, GpFontFamily** clonedFontFamily)
542 if (!(FontFamily && clonedFontFamily)) return InvalidParameter;
544 TRACE("stub: %p (%s), %p\n", FontFamily,
545 debugstr_w(FontFamily->FamilyName), clonedFontFamily);
547 *clonedFontFamily = GdipAlloc(sizeof(GpFontFamily));
548 if (!*clonedFontFamily) return OutOfMemory;
550 (*clonedFontFamily)->tmw = FontFamily->tmw;
551 lstrcpyW((*clonedFontFamily)->FamilyName, FontFamily->FamilyName);
553 return Ok;
556 /*******************************************************************************
557 * GdipGetFamilyName [GDIPLUS.@]
559 * Returns the family name into name
561 * PARAMS
562 * *family [I] Family to retrieve from
563 * *name [O] WCHARS of the family name
564 * LANGID [I] charset
566 * RETURNS
567 * SUCCESS: Ok
568 * FAILURE: InvalidParameter if family is NULL
570 * NOTES
571 * If name is a NULL ptr, then both XP and Vista will crash (so we do as well)
573 GpStatus WINGDIPAPI GdipGetFamilyName (GDIPCONST GpFontFamily *family,
574 WCHAR *name, LANGID language)
576 if (family == NULL)
577 return InvalidParameter;
579 TRACE("%p, %p, %d\n", family, name, language);
581 if (language != LANG_NEUTRAL)
582 FIXME("No support for handling of multiple languages!\n");
584 lstrcpynW (name, family->FamilyName, LF_FACESIZE);
586 return Ok;
590 /*****************************************************************************
591 * GdipDeleteFontFamily [GDIPLUS.@]
593 * Removes the specified FontFamily
595 * PARAMS
596 * *FontFamily [I] The family to delete
598 * RETURNS
599 * SUCCESS: Ok
600 * FAILURE: InvalidParameter if FontFamily is NULL.
603 GpStatus WINGDIPAPI GdipDeleteFontFamily(GpFontFamily *FontFamily)
605 if (!FontFamily)
606 return InvalidParameter;
607 TRACE("Deleting %p (%s)\n", FontFamily, debugstr_w(FontFamily->FamilyName));
609 GdipFree (FontFamily);
611 return Ok;
614 GpStatus WINGDIPAPI GdipGetCellAscent(GDIPCONST GpFontFamily *family,
615 INT style, UINT16* CellAscent)
617 if (!(family && CellAscent)) return InvalidParameter;
619 *CellAscent = family->tmw.tmAscent;
621 return Ok;
624 GpStatus WINGDIPAPI GdipGetCellDescent(GDIPCONST GpFontFamily *family,
625 INT style, UINT16* CellDescent)
627 if (!(family && CellDescent)) return InvalidParameter;
629 *CellDescent = family->tmw.tmDescent;
631 return Ok;
634 /*******************************************************************************
635 * GdipGetEmHeight [GDIPLUS.@]
637 * Gets the height of the specified family in EmHeights
639 * PARAMS
640 * family [I] Family to retrieve from
641 * style [I] (optional) style
642 * EmHeight [O] return value
644 * RETURNS
645 * SUCCESS: Ok
646 * FAILURE: InvalidParameter
648 GpStatus WINGDIPAPI GdipGetEmHeight(GDIPCONST GpFontFamily *family, INT style, UINT16* EmHeight)
650 if (!(family && EmHeight)) return InvalidParameter;
652 TRACE("%p (%s), %d, %p, stub!\n", family,
653 debugstr_w(family->FamilyName), style, EmHeight);
655 *EmHeight = family->tmw.ntmSizeEM;
657 return Ok;
661 /*******************************************************************************
662 * GdipGetLineSpacing [GDIPLUS.@]
664 * Returns the line spacing in design units
666 * PARAMS
667 * family [I] Family to retrieve from
668 * style [I] (Optional) font style
669 * LineSpacing [O] Return value
671 * RETURNS
672 * SUCCESS: Ok
673 * FAILURE: InvalidParameter (family or LineSpacing was NULL)
675 GpStatus WINGDIPAPI GdipGetLineSpacing(GDIPCONST GpFontFamily *family,
676 INT style, UINT16* LineSpacing)
678 if (!(family && LineSpacing)) return InvalidParameter;
680 FIXME("stub!\n");
682 return NotImplemented;
685 GpStatus WINGDIPAPI GdipIsStyleAvailable(GDIPCONST GpFontFamily* family,
686 INT style, BOOL* IsStyleAvailable)
688 FIXME("%p %d %p stub!\n", family, style, IsStyleAvailable);
690 if (!(family && IsStyleAvailable))
691 return InvalidParameter;
693 return NotImplemented;
696 /*****************************************************************************
697 * GdipGetGenericFontFamilyMonospace [GDIPLUS.@]
699 * Obtains a serif family (Courier New on Windows)
701 * PARAMS
702 * **nativeFamily [I] Where the font will be stored
704 * RETURNS
705 * InvalidParameter if nativeFamily is NULL.
706 * Ok otherwise.
708 GpStatus WINGDIPAPI GdipGetGenericFontFamilyMonospace(GpFontFamily **nativeFamily)
710 static const WCHAR CourierNew[] = {'C','o','u','r','i','e','r',' ','N','e','w','\0'};
712 if (nativeFamily == NULL) return InvalidParameter;
714 return GdipCreateFontFamilyFromName(CourierNew, NULL, nativeFamily);
717 /*****************************************************************************
718 * GdipGetGenericFontFamilySerif [GDIPLUS.@]
720 * Obtains a serif family (Times New Roman on Windows)
722 * PARAMS
723 * **nativeFamily [I] Where the font will be stored
725 * RETURNS
726 * InvalidParameter if nativeFamily is NULL.
727 * Ok otherwise.
729 GpStatus WINGDIPAPI GdipGetGenericFontFamilySerif(GpFontFamily **nativeFamily)
731 static const WCHAR TimesNewRoman[] = {'T','i','m','e','s',' ','N','e','w',' ','R','o','m','a','n','\0'};
733 if (nativeFamily == NULL) return InvalidParameter;
735 return GdipCreateFontFamilyFromName(TimesNewRoman, NULL, nativeFamily);
738 /*****************************************************************************
739 * GdipGetGenericFontFamilySansSerif [GDIPLUS.@]
741 * Obtains a serif family (Microsoft Sans Serif on Windows)
743 * PARAMS
744 * **nativeFamily [I] Where the font will be stored
746 * RETURNS
747 * InvalidParameter if nativeFamily is NULL.
748 * Ok otherwise.
750 GpStatus WINGDIPAPI GdipGetGenericFontFamilySansSerif(GpFontFamily **nativeFamily)
752 /* FIXME: On Windows this is called Microsoft Sans Serif, this shouldn't
753 * affect anything */
754 static const WCHAR MSSansSerif[] = {'M','S',' ','S','a','n','s',' ','S','e','r','i','f','\0'};
756 if (nativeFamily == NULL) return InvalidParameter;
758 return GdipCreateFontFamilyFromName(MSSansSerif, NULL, nativeFamily);
761 /*****************************************************************************
762 * GdipGetGenericFontFamilySansSerif [GDIPLUS.@]
764 GpStatus WINGDIPAPI GdipNewPrivateFontCollection(GpFontCollection** fontCollection)
766 FIXME("stub %p\n", fontCollection);
768 if (!fontCollection)
769 return InvalidParameter;
771 return NotImplemented;
774 /*****************************************************************************
775 * GdipDeletePrivateFontCollection [GDIPLUS.@]
777 GpStatus WINGDIPAPI GdipDeletePrivateFontCollection(GpFontCollection **fontCollection)
779 FIXME("stub %p\n", fontCollection);
781 if (!fontCollection)
782 return InvalidParameter;
784 return NotImplemented;
787 /*****************************************************************************
788 * GdipPrivateAddFontFile [GDIPLUS.@]
790 GpStatus WINGDIPAPI GdipPrivateAddFontFile(GpFontCollection* fontCollection,
791 GDIPCONST WCHAR* filename)
793 FIXME("stub: %p, %s\n", fontCollection, debugstr_w(filename));
795 if (!(fontCollection && filename))
796 return InvalidParameter;
798 return NotImplemented;
801 /*****************************************************************************
802 * GdipGetFontCollectionFamilyCount [GDIPLUS.@]
804 GpStatus WINGDIPAPI GdipGetFontCollectionFamilyCount(
805 GpFontCollection* fontCollection, INT* numFound)
807 FIXME("stub: %p, %p\n", fontCollection, numFound);
809 if (!(fontCollection && numFound))
810 return InvalidParameter;
812 return NotImplemented;
815 /*****************************************************************************
816 * GdipGetFontCollectionFamilyList [GDIPLUS.@]
818 GpStatus WINGDIPAPI GdipGetFontCollectionFamilyList(
819 GpFontCollection* fontCollection, INT numSought,
820 GpFontFamily* gpfamilies[], INT* numFound)
822 FIXME("stub: %p, %d, %p, %p\n", fontCollection, numSought, gpfamilies,
823 numFound);
825 if (!(fontCollection && gpfamilies && numFound))
826 return InvalidParameter;
828 return NotImplemented;