Exemple #1
0
 public static BitFont GetStandard8x16()
 {
     if (standard8x16 == null)
     {
         standard8x16                = BitFont.FromResource("Pablo.Formats.Character.Fonts.DOS.CP437.F16", 256, 437, 8, 16);
         standard8x16.ID             = "CP 437 8x16";
         standard8x16.SauceID        = "IBM VGA";
         standard8x16.LegacyRatio    = 1.2f;
         standard8x16.Name           = "IBM PC - " + standard8x16.ID;
         standard8x16.IsSystemFont   = true;
         standard8x16.IsStandardFont = true;
     }
     return(standard8x16);
 }
Exemple #2
0
 public static BitFont GetStandard8x8()
 {
     if (standard8x8 == null)
     {
         standard8x8                = BitFont.FromResource("Pablo.Formats.Character.Fonts.DOS.CP437.F08", 256, 437, 8, 8);
         standard8x8.ID             = "CP 437 8x8";
         standard8x8.LegacyRatio    = 1.2f;
         standard8x8.SauceID        = "IBM VGA50";
         standard8x8.Name           = "IBM PC - " + standard8x8.ID;
         standard8x8.IsSystemFont   = true;
         standard8x8.IsStandardFont = true;
     }
     return(standard8x8);
 }
Exemple #3
0
        public static BitFontSet AmigaFont()
        {
            var fontSet = new BitFontSet {
                Name = "Amiga"
            };
            const int codePage = 1252;
            const int numChars = 256;

            fontSet.Fonts.Add(BitFont.FromResource("Pablo.Formats.Character.Fonts.Amiga.MicroKnight.F16", numChars, codePage, 8, 16, "amiga-microknight", "MicroKnight", fontSet, true, "Amiga MicroKnight", 1.2f));
            fontSet.Fonts.Add(BitFont.FromResource("Pablo.Formats.Character.Fonts.Amiga.MicroKnightPlus.F16", numChars, codePage, 8, 16, "amiga-microknight+", "MicroKnight+", fontSet, true, "Amiga MicroKnight+", 1.2f));
            fontSet.Fonts.Add(BitFont.FromResource("Pablo.Formats.Character.Fonts.Amiga.mO'sOul.F16", numChars, codePage, 8, 16, "amiga-mOsOul", "mO'sOul", fontSet, true, "Amiga mOsOul", 1.2f));
            fontSet.Fonts.Add(BitFont.FromResource("Pablo.Formats.Character.Fonts.Amiga.P0T-NOoDLE.F16", numChars, codePage, 8, 16, "amiga-pot-noodle", "P0T-NOoDLE", fontSet, true, "Amiga P0T-NOoDLE", 1.2f));
            fontSet.Fonts.Add(BitFont.FromResource("Pablo.Formats.Character.Fonts.Amiga.Topaz_a1200.F16", numChars, codePage, 8, 16, "amiga-topaz-1200", "Topaz 1200", fontSet, true, "Amiga Topaz 2", 1.2f));
            fontSet.Fonts.Add(BitFont.FromResource("Pablo.Formats.Character.Fonts.Amiga.Topaz_a500.F16", numChars, codePage, 8, 16, BitFont.StandardAmigaFontID, "Topaz 500", fontSet, true, "Amiga Topaz 1", 1.2f));
            fontSet.Fonts.Add(BitFont.FromResource("Pablo.Formats.Character.Fonts.Amiga.TopazPlus_a1200.F16", numChars, codePage, 8, 16, "amiga-topaz-plus-1200", "Topaz+ 1200", fontSet, true, "Amiga Topaz 2+", 1.2f));
            fontSet.Fonts.Add(BitFont.FromResource("Pablo.Formats.Character.Fonts.Amiga.TopazPlus_a500.F16", numChars, codePage, 8, 16, "amiga-topaz-plus-500", "Topaz+ 500", fontSet, true, "Amiga Topaz 1+", 1.2f));
            return(fontSet);
        }
Exemple #4
0
        public static BitFontSet FromFontResources(string resource, string name, int codePage, int[] heights, bool isSystemFont = true, int[] fallbackCodePages = null, int numChars = 256, Assembly asm = null)
        {
            asm = asm ?? Assembly.GetExecutingAssembly();
            var fontSet = new BitFontSet {
                Name = name
            };

            foreach (var height in heights)
            {
                const int width        = 8;
                var       resourceName = string.Format("{0}.F{1:00}", resource, height);
                var       id           = string.Format("CP {0} {1}x{2}", codePage, width, height);
                var       bitFont      = BitFont.FromResource(resourceName, numChars, codePage, width, height, id, id, fontSet, isSystemFont);
                bitFont.FallbackCodePages = fallbackCodePages;
                bitFont.SauceID           = GetSauceID(height, codePage);
                fontSet.Fonts.Add(bitFont);
            }

            return(fontSet);
        }