private static void SingleColorTinyFontWork() { var bitmap = new Bitmap(@"Font\TinyBWFont.png"); const string chars = " 0123456789ABCDEF+-%*=.:!?/\\'"; SingleColorFont tinyFont = SingleColorFontBuilder.GetSingleColorFont(bitmap, chars); byte[] fontBytes = tinyFont.Serialize().ToArray(); var fontBytesAsCode = ToCSharp(fontBytes); }
private static void SingleColorFontWork() { var bitmap = new Bitmap(@"Font\BWFont.png"); const string chars = " ABCDEFGHIJKLMNOPQRSTUVWXYZÅÄÖÉÜabcdefghijklmnopqrstuvwxyzåäöéü0123456789.,?!\"#$%&-+*:;/\\<>()'`="; SingleColorFont singleColorFont = SingleColorFontBuilder.GetSingleColorFont(bitmap, chars); byte[] fontBytes = singleColorFont.Serialize().ToArray(); var fontBytesAsCode = ToCSharp(fontBytes); Tuple <string, Bitmap> tuple = SingleColorFontBuilder.GetFontBitmap(fontBytes); tuple.Item2.Save(@"Font\BWFont_recreated.png"); }