Example #1
0
        public FontFamily(GenericFontFamilies genericFamily)
        {
            Status status;

            switch (genericFamily)
            {
            case GenericFontFamilies.SansSerif:
                status = GDIPlus.GdipGetGenericFontFamilySansSerif(out nativeFontFamily);
                break;

            case GenericFontFamilies.Serif:
                status = GDIPlus.GdipGetGenericFontFamilySerif(out nativeFontFamily);
                break;

            case GenericFontFamilies.Monospace:
            default:                            // Undocumented default
                status = GDIPlus.GdipGetGenericFontFamilyMonospace(out nativeFontFamily);
                break;
            }
            GDIPlus.CheckStatus(status);
        }