InstalledFontCollection.cs 777 B

123456789101112131415161718192021222324252627282930
  1. //
  2. // System.Drawing.Text.InstalledFontCollection.cs
  3. //
  4. // (C) 2002 Ximian, Inc. http://www.ximian.com
  5. // Author: Everaldo Canuto [email protected]
  6. // Alexandre Pigolkine ( [email protected])
  7. // Sanjay Gupta ([email protected])
  8. //
  9. using System;
  10. using System.Drawing;
  11. namespace System.Drawing.Text {
  12. public sealed class InstalledFontCollection : FontCollection {
  13. internal InstalledFontCollection ( IntPtr ptr ): base ( ptr )
  14. {}
  15. public InstalledFontCollection ()
  16. {
  17. Status status = GDIPlus.GdipNewInstalledFontCollection( out nativeFontCollection );
  18. if ( status != Status.Ok ) {
  19. nativeFontCollection = IntPtr.Zero;
  20. throw new Exception ( "Error calling GDIPlus.GdipNewInstalledFontCollection: " + status );
  21. }
  22. }
  23. }
  24. }