// Font generated by stb_font_inl_generator.c (4/1 bpp) // // Following instructions show how to use the only included font, whatever it is, in // a generic way so you can replace it with any other font by changing the include. // To use multiple fonts, replace STB_SOMEFONT_* below with STB_FONT_times_bold_18_usascii_*, // and separately install each font. Note that the CREATE function call has a // totally different name; it's just 'stb_font_times_bold_18_usascii'. // /* // Example usage: static stb_fontchar fontdata[STB_SOMEFONT_NUM_CHARS]; static void init(void) { // optionally replace both STB_SOMEFONT_BITMAP_HEIGHT with STB_SOMEFONT_BITMAP_HEIGHT_POW2 static unsigned char fontpixels[STB_SOMEFONT_BITMAP_HEIGHT][STB_SOMEFONT_BITMAP_WIDTH]; STB_SOMEFONT_CREATE(fontdata, fontpixels, STB_SOMEFONT_BITMAP_HEIGHT); ... create texture ... // for best results rendering 1:1 pixels texels, use nearest-neighbor sampling // if allowed to scale up, use bilerp } // This function positions characters on integer coordinates, and assumes 1:1 texels to pixels // Appropriate if nearest-neighbor sampling is used static void draw_string_integer(int x, int y, char *str) // draw with top-left point x,y { ... use texture ... ... turn on alpha blending and gamma-correct alpha blending ... glBegin(GL_QUADS); while (*str) { int char_codepoint = *str++; stb_fontchar *cd = &fontdata[char_codepoint - STB_SOMEFONT_FIRST_CHAR]; glTexCoord2f(cd->s0, cd->t0); glVertex2i(x + cd->x0, y + cd->y0); glTexCoord2f(cd->s1, cd->t0); glVertex2i(x + cd->x1, y + cd->y0); glTexCoord2f(cd->s1, cd->t1); glVertex2i(x + cd->x1, y + cd->y1); glTexCoord2f(cd->s0, cd->t1); glVertex2i(x + cd->x0, y + cd->y1); // if bilerping, in D3D9 you'll need a half-pixel offset here for 1:1 to behave correct x += cd->advance_int; } glEnd(); } // This function positions characters on float coordinates, and doesn't require 1:1 texels to pixels // Appropriate if bilinear filtering is used static void draw_string_float(float x, float y, char *str) // draw with top-left point x,y { ... use texture ... ... turn on alpha blending and gamma-correct alpha blending ... glBegin(GL_QUADS); while (*str) { int char_codepoint = *str++; stb_fontchar *cd = &fontdata[char_codepoint - STB_SOMEFONT_FIRST_CHAR]; glTexCoord2f(cd->s0f, cd->t0f); glVertex2f(x + cd->x0f, y + cd->y0f); glTexCoord2f(cd->s1f, cd->t0f); glVertex2f(x + cd->x1f, y + cd->y0f); glTexCoord2f(cd->s1f, cd->t1f); glVertex2f(x + cd->x1f, y + cd->y1f); glTexCoord2f(cd->s0f, cd->t1f); glVertex2f(x + cd->x0f, y + cd->y1f); // if bilerping, in D3D9 you'll need a half-pixel offset here for 1:1 to behave correct x += cd->advance; } glEnd(); } */ #ifndef STB_FONTCHAR__TYPEDEF #define STB_FONTCHAR__TYPEDEF typedef struct { // coordinates if using integer positioning float s0,t0,s1,t1; signed short x0,y0,x1,y1; int advance_int; // coordinates if using floating positioning float s0f,t0f,s1f,t1f; float x0f,y0f,x1f,y1f; float advance; } stb_fontchar; #endif #define STB_FONT_times_bold_18_usascii_BITMAP_WIDTH 128 #define STB_FONT_times_bold_18_usascii_BITMAP_HEIGHT 96 #define STB_FONT_times_bold_18_usascii_BITMAP_HEIGHT_POW2 128 #define STB_FONT_times_bold_18_usascii_FIRST_CHAR 32 #define STB_FONT_times_bold_18_usascii_NUM_CHARS 95 #define STB_FONT_times_bold_18_usascii_LINE_SPACING 12 static unsigned int stb__times_bold_18_usascii_pixels[]={ 0x00000000,0x00000000,0x12de9800,0x000009d7,0x0d400000,0x20ec2644, 0x40b882d9,0x5dcc04e8,0x6cc01aac,0x2200cdcd,0x0fe60adc,0x2f32617e, 0x84e980bd,0x3a3addca,0x07916400,0x7cc3b13a,0xf980e881,0x2a03b106, 0xfe89f701,0xfab9dc81,0x8bf07f30,0x20ff44fb,0xb135c7fb,0x83a01dc9, 0x6c7e81f8,0x0fa07ee1,0x00d88098,0x03fea0d4,0x5fc41ff3,0x0fe63739, 0x987fa97e,0xd1bea0ff,0x8166488b,0x6f86d859,0xb85f50ec,0x8855500f, 0x854d5c0e,0xff837fc2,0x44effe64,0x4bf07f30,0x4ff886ff,0x19ff13e6, 0x1dc03a0c,0x8bf10fe4,0xfd0fe61d,0x8ae3fd40,0x8a7eabe8,0xdfd05ff8, 0xf985ffe8,0xbff15f83,0x85f1bfe0,0x5903fffd,0x0fee03a0,0x3e61d89d, 0xf981fe21,0x2add06c7,0x3ff98a5f,0xfd88ffd0,0x20fe61ef,0x207ff35f, 0x2206c7fe,0x4c0dfffd,0x9f706885,0x4c762d88,0x3037cc2d,0x4fee68ff, 0xff88a3fc,0x2e0bfd04,0x20fe67ff,0x209ff15f,0xd50245fe,0x770d0dff, 0x92e17ea0,0xf981951d,0x499fe606,0x507fc7fa,0x5ff04fd8,0x4cbff660, 0x3f65f83f,0x4085ff04,0x20ffdc18,0xfb80ec2c,0xa8762e44,0x981be20f, 0x77f9627f,0x3ea0ccdf,0x220ff986,0x267f5731,0x3ea5f83f,0x4c0ff986, 0x03f21a20,0xf9034495,0x30ec4f85,0x2607f87f,0x79ff2c7f,0x320ca69f, 0x2217ec2f,0x261f5735,0x7ec5f83f,0x3ea1fec2,0x0b90be26,0x1f604a9e, 0x7d43b17e,0xf9807dc3,0xb2fc8647,0x2602a55d,0x880cebde,0x261cdcde, 0xeb85f83f,0xf981edbd,0x2ef77a25,0x0763b00c,0x6c7e83f8,0x7f107ee1, 0x0911be60,0xffb00a20,0x983a8801,0x102fc43f,0x0c401003,0x2e008440, 0x21d8bd04,0x446981fa,0x03986f8c,0xdfe801c4,0x5bf30000,0x00017ee2, 0xa8000000,0x1d81d703,0x324c0ee4,0x32205f3f,0x0057710a,0x00ef6dc4, 0x00000000,0x80000000,0x01101701,0x22006a60,0x000001a9,0x00000000, 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000, 0x20000000,0x88007668,0x554c51ca,0x55541ca8,0x36605512,0x7644004e, 0x5c1bbddd,0x001d01cb,0x1005bb71,0x4959bdb7,0xa80beba8,0x107303e5, 0xfd17f69f,0x7c45fd9d,0xfb80763f,0x7d40f5c5,0xa87f620e,0x03c87c9f, 0x301fa7d0,0x936cc3ff,0x4ee17ee9,0x741f4468,0xfd8bf70f,0x5fc8ff53, 0xd8bf7012,0x80ffcc2f,0x3f23f61e,0x7cc01662,0x7fcc0d93,0x4dba6881, 0x9bd950ff,0x37fa27db,0x7dcff10a,0xff897ec5,0x0a63fe21,0x117eeee6, 0x4c0dfd05,0x87f23f20,0x1df5000e,0x037ec03b,0x26f98cc5,0x2cdabfa9, 0x2a15bfd3,0xfb17ee7f,0x3f60ffc5,0xfbcfa83c,0x882aa65f,0x3e6005ff, 0x800f26c9,0x2aa65ff8,0x20017fe1,0x3b3441ec,0x7fc43fd8,0x2fd8bf70, 0xff981ff1,0xbf70ff83,0x3fe63fe8,0x855cc004,0xb9300c69,0xf31fc1ff, 0x0e88007f,0x4fccedc4,0x3fa0ff60,0x4fd8bf92,0x07fa0df5,0x22fdcff1, 0x13fe23fd,0x80399993,0x83d3d50e,0x36ff88fa,0x004ff88b,0x777dc054, 0x0ff64efe,0x17f77f62,0x01dfbbfb,0xb9fe61aa,0x3e1fec5f,0x01ffb85f, 0x17edd1e4,0x33fea1fd,0x005fe80d,0x16a5b004,0xf7080ff6,0x8012fd8b, 0x70ff8828,0x5c3fd8bf,0x0ffd40ff,0xeb7c4d30,0xfc8ffe67,0x01ff905f, 0x87c02602,0x01bfc83c,0x0bf62fdc,0x3a038d98,0x6c6fd8af,0x544fd83f, 0xd03a01ff,0x5ffd17ed,0x0ef7ffe6,0xa8770bf9,0x0766886f,0xf700ffa6, 0x2a03fe8d,0x3fe603cf,0x3fa1efce,0xb57bd503,0x20f2017d,0x6cc2f8fa, 0xffc8cfff,0xb9bfd705,0x820bf303,0x55440000,0x0155531a,0x011800d4, 0x9801bff3,0x14405001,0x00220220,0x0000400c,0x00000000,0x00000000, 0x00000000,0x00000000,0x00000000,0x76cc0000,0x03cca802,0x3ae07db7, 0x57101eee,0xabb98001,0x2f2ea22a,0x77777640,0x259dd933,0x64c0ceb8, 0x3b6a2dee,0x033b221e,0x5fd07b99,0x2f89f980,0x417ff75c,0xd907ffff, 0x87b32601,0x23efa9fc,0xfff1b67c,0x7fcc5fff,0x3fe20682,0x40fff984, 0x87f57d86,0xf3f402fd,0x89fb144f,0xc80999ba,0x3e77a00f,0x9fe2ff12, 0x23f70ff8,0x47caabe9,0x40582ff9,0xffd883ff,0x45be2246,0x26bf60ff, 0x3fa7f81c,0xcc83f900,0x409f701a,0x26f985f9,0x657fe27f,0x44c8130f, 0x40482ff9,0xfca883ff,0x4df5124f,0x2fbf62ff,0xe9fe63fd,0xf84f882f, 0x7f40dfff,0x3f260bed,0xf98fd82e,0x0f77fe44,0x5ff30ba0,0x83ff8090, 0x125ffb28,0xb1ff4ff3,0xfa9fe65f,0xff50ffa7,0x7ffec47f,0x7d47fc4f, 0x40bbf267,0xff902cdd,0x4c3cc03f,0x7c0482ff,0xfd12883f,0x23fd093f, 0x44bf61fe,0x74ff31ff,0x07fe982f,0x3e61ff73,0x5fa87fa7,0xbe980790, 0x0b700fff,0x80905ff3,0x262883ff,0xfd984eff,0xf17ec7fd,0xff9fe23f, 0x401ff101,0x6cff32fa,0x7c17ea3f,0x3e24deef,0x3a05ff35,0x482ff882, 0x220ffe08,0x203ffd42,0x897ec5fa,0x1ff3fc7f,0x07c026c0,0xa8bf61ff, 0xffff505f,0xfd93ea7f,0x3fe07982,0x457e4583,0xc82882ff,0x2076c07f, 0xb89f33fd,0x36e4f88f,0x23e987a0,0xee97e448,0x3a217ea0,0x3e5d998a, 0x02dc1b65,0x5c1b8bfb,0x980ff89f,0x7640fb03,0x4dbdcd80,0xfa8b9b90, 0x7f442cdf,0xd7d903be,0xf886fa83,0x2a1d988b,0x5d01cbbd,0x2ccefd80, 0x82fdbd88,0x86882eea,0x0c100bba,0x01100440,0x10100088,0x55105ffb, 0x20020135,0x40026001,0x02040000,0x00000000,0x00000000,0x00000000, 0x00000000,0xb8aeeeb8,0x93663eee,0x2a0beeeb,0x7ddb51dd,0xd88eecc1, 0x3bb6603e,0x417db31d,0xeedccdeb,0x500fb663,0xd9bdb9dd,0x17bb263d, 0xb316f754,0xd8ffd05d,0x7ec0c87f,0x7e42c80f,0x7ec1d83f,0x22ffd404, 0x7f43d83c,0x2027ec0f,0x22bfd0da,0x07ffa61d,0x3fa13ff6,0x2a2ffa83, 0x7cc242ff,0xdfd0583f,0x04fc8488,0x0912ffc8,0x907ff712,0x3a1a809f, 0xfb88665f,0x1ffd4c5f,0x5ff81fec,0x20352ffc,0xa81546fd,0x320323ff, 0xd102c9cf,0x104091ff,0x53f20dff,0xfd021aa9,0x7fe5c40b,0x20ffe320, 0x1ff903fd,0x0243ffaa,0x20245ff5,0x902a8ffe,0x207fd7df,0xb000fffa, 0x93f203ff,0x02ff401f,0x227ff171,0x7fb07ff3,0x464ffe20,0x74038bff, 0xf980535f,0x53f204cf,0x3ff204fb,0x04ff9802,0x400dd3f2,0x6ce205fe, 0x0ffe177f,0xefd80ff6,0x017dfb38,0x0049ffb8,0x7e403ffb,0x7d40bf74, 0x7ff400ff,0x1733f200,0x7102ff40,0xff92bfe6,0x2a03fd83,0xbff50eff, 0x07bff100,0xc803fee0,0x260bf74f,0x2e05ff9b,0x3f2282ff,0xfe803ffe, 0xffe8e205,0x3f60ffe1,0x3e27fc03,0x1ff9002f,0x803fee00,0x10bf74fc, 0x4417fe49,0x322a85ff,0x400ffacf,0xb8e205fe,0x6c1ffc6f,0x20fe403f, 0x9f3000fc,0x007fdc00,0x11bee9f9,0x40ffe81d,0x0fd41ffd,0x01bf29fb, 0x21cc0bfd,0x213fe23f,0x42c403fd,0x006c0049,0x81cffda8,0xffd9efe8, 0x2617fd51,0xff51effe,0x1ffd999d,0x3ea3bfa2,0x7fdc40df,0x22ed982f, 0x5dff910b,0x2006ffcc,0x00800100,0x00000000,0x00000000,0x00000000, 0x00000000,0x00000000,0x00000000,0x80000000,0x202deec9,0x2a1deec9, 0xdd930bed,0x930399b9,0xdd715bdd,0x3bb2617d,0x764c2cdd,0x32eedcde, 0xddd9bdd9,0x6ef76543,0xbdd9302b,0x3b7bb265,0x83b300bc,0xf8803ff9, 0x4c17443f,0x07ff32ff,0x6fe87ff3,0xfd8aff88,0xb11ffc44,0xd317fcc7, 0xf52ffa85,0x87ff301d,0x3ff72ff9,0x220ffed4,0xff8802ff,0x7cc07623, 0x221ff22f,0x437ec3ff,0x1ff52ff8,0x8e21ffc4,0x0aa12ff8,0x77dc5ff3, 0x2217fc40,0x113fe2ff,0x2ff883ff,0x933ff880,0x717fcc01,0x3ff881ff, 0x7fc437ec,0x7c43ff32,0xff104a3f,0x7fcc08e5,0xf10ffe62,0x22ff885f, 0x41ff83ff,0xf8802ff8,0x4c00fabf,0x213f62ff,0x37ec3ff8,0x7fc97fc4, 0x82b9ffc4,0x2068aff8,0x2ffc2ff9,0xff10bfe2,0xf01bf915,0x02ff883f, 0x4ffeff88,0x6e67fcc0,0xdff880cf,0x886feccc,0x40cfdcff,0x82feeff8, 0x207feff8,0x3ff42ff9,0xff10bfe2,0x3e03bfdd,0x017fc41f,0x7fe5ffc4, 0x36bfe603,0x7ff101ff,0xff886fd8,0x45ffc403,0x8aff882d,0xd0bfe606, 0x42ff88df,0x7ff32ff8,0xff883ff0,0x3fe20882,0x2603ffd3,0x06fe8aff, 0x6fd87ff1,0x4402ff88,0xf10533ff,0x7cc08e5f,0x222ffc2f,0x17fc42ff, 0x83ff0ffb,0x20c82ff8,0xfff13ff8,0x265ff301,0x3ff884ff,0x7fc437ec, 0x11ffc402,0x5825ff10,0xff317fcc,0x442ff883,0x03ff22ff,0x3ff983ff, 0x8ffe23cc,0x7cc0effa,0x10bff22f,0x86fd87ff,0x7c402ff8,0x1ffc403f, 0x25ff31ae,0xff883fe8,0xe897fcc3,0x262ff84f,0xfdcceffc,0x4bbff227, 0x932efffa,0x7ff45bff,0x25dff912,0x930bfffa,0x32205bff,0xf9302eff, 0x4bffb9df,0xcfdeffd9,0x1dffc981,0xbd9dff93,0x1dffc985,0x00000000, 0x00000000,0x00000000,0x00000000,0x06e201a8,0x3a00bbae,0x84000023, 0x2aaaa1b8,0x1a98aaa8,0x4aa25555,0x1aa89aa9,0x6c02cb98,0x01577100, 0x204e8055,0x7ffdc6fb,0xc8ff202f,0xf930002d,0x2ff89bee,0xff12cbfb, 0x27fd0ec7,0xfcae45fc,0x57403a03,0x2a3e61e8,0x201ff306,0x263623e9, 0x7ff505ff,0x800bfda8,0x7d30beda,0x1ff74fc8,0x125fc851,0xf17ee7fb, 0x0e817eaf,0x2198ef98,0xf905f36d,0x7e40007f,0x03fdc884,0xb883bf93, 0x3e6002df,0x1075fd77,0xfd8331ff,0x8a98bf73,0x403a06fd,0x3be21fff, 0x6dc44fcc,0x3f20007f,0x03fd8c82,0x1bf76fc8,0x273fa000,0x9fb03dfb, 0x3ee7fb07,0x26fbdc85,0xfffffffc,0x4c7ffea7,0x7cc6406f,0x5e80502f, 0x407fb1b8,0xd710cfda,0x5c05405d,0x205ff16f,0x3fc82ff9,0xa8fd8bf7, 0x3a66626f,0xd111199a,0x407fe29f,0x321bfa48,0x981d306f,0xd710ff63, 0xcfd9805d,0x3e21bee1,0x0fd01f63,0x12fed3f2,0x40dfb5ff,0x9f14980e, 0x714c6ff4,0x83ffd99b,0x07440ffb,0x7fffffe4,0x80039f73,0x0bf55eb8, 0x5c04a83a,0xf9bff104,0x7c5ff43f,0xd101d02f,0x7f441d79,0x2ffc244f, 0x3711c858,0x37fb332a,0x50000131,0x00101004,0x00000801,0x08020074, 0x1ffc82b8,0x3ffee14c,0x00ff607f,0x00000000,0x00000000,0x3ee00000, 0x3bff661d,0xfffa8331,0x0ff606ff,0x00000000,0x00000000,0x00000000, 0x00000000,0x00000000,0x00000000,0x54000000,0x4377301b,0x1aa8aaa9, 0x2aaaa200,0x2e35512a,0x59335512,0xbb89aa88,0x00003970,0x220ba013, 0x19999999,0x401110cc,0x4c2f8ae9,0x3f61fc9f,0x216e0596,0x23ff88c9, 0x366fdcfc,0x6c3fedef,0xbcdfdcef,0x4c3ae0ff,0x3e63d52e,0x6437540f, 0x6eeeeeee,0x37c43fe2,0xb07f4fd0,0xff88fe6d,0x82b9083b,0xfc8df909, 0x57f2198f,0x9afe45fb,0xfe87fe7f,0x4ff69f72,0x74f42ff9,0x07fc0003, 0x4ff103f3,0x04df12fe,0x77c07fdc,0x7cc0fdaa,0xc82fe42f,0xfc8bf74f, 0x0ff4ff34,0x5cfea1f9,0x29705c1f,0x3332a0f9,0x3004cccc,0x7f4ff503, 0xff00ff33,0x35995307,0x9f90bfd0,0x2fdd3f20,0xd3fcd3f2,0x3f13d45f, 0x7c4911e6,0xbbb98f20,0x0003bbbb,0xf83fa7f8,0x3ff6201f,0xa84bcc80, 0x27e430ff,0x8bf74fc8,0x74ff34fc,0x58b1622f,0x0b10ee14,0x7d800000, 0x13dfb1be,0x889fd485,0x3e21f9af,0x27e4b13f,0x8bf74fc8,0x7cff34fc, 0x0102042f,0x00000000,0x03b33a20,0x6cc9ff91,0x002ffd8d,0x53f73ff2, 0x7441efe8,0x11ffd8ef,0x5ff91dfd,0x0000bff5,0x00000000,0x00400880, 0x00000000,0x00000000,0x00000000,0x20000000,0x775182c9,0x5dddc477, 0x0000bbbb,0x00000000,0x00000000,0x6cc00000,0x93a9cfec,0x5dc4ffff, 0x00bbbbbb,0x00000000,0x00000000,0x40000000,0x106764c2,0x00000111, 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000, 0x00000000, }; static signed short stb__times_bold_18_usascii_x[95]={ 0,1,1,0,0,1,0,1,0,0,0,0,0,0, 0,0,0,1,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,-1,0,0,0,0,0,0,0,0,0,0, -1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0, }; static signed short stb__times_bold_18_usascii_y[95]={ 14,2,2,3,2,2,2,2,2,2,2,4,11,9, 11,2,3,3,3,3,3,3,3,3,3,3,6,6,4,6,4,2,2,3,3,2,3,3,3,2,3,3,3,3, 3,3,3,2,3,2,3,2,3,3,3,3,3,3,3,3,2,3,3,16,2,6,3,6,3,6,2,6,3,2, 2,3,3,6,6,6,6,6,6,6,3,6,6,6,6,6,6,2,2,2,8, }; static unsigned short stb__times_bold_18_usascii_w[95]={ 0,4,7,8,8,15,13,3,6,5,8,9,4,6, 4,5,8,6,8,8,8,8,8,8,8,8,4,4,9,10,9,8,15,12,11,11,12,11,10,13,13,6,9,13, 11,16,12,13,10,13,12,9,11,12,12,17,12,12,11,4,5,4,8,10,4,8,9,7,9,7,7,8,9,5, 6,10,5,14,9,8,9,9,7,6,6,9,8,12,8,8,7,5,2,6,9, }; static unsigned short stb__times_bold_18_usascii_h[95]={ 0,13,7,12,14,13,13,7,16,16,8,9,6,3, 4,13,12,11,11,12,11,12,12,12,12,12,9,11,9,5,9,13,16,11,11,13,11,11,11,13,11,11,12,11, 11,11,12,13,11,15,11,13,11,12,12,12,11,11,11,14,13,14,6,2,4,9,12,9,12,9,12,12,11,12, 16,11,11,8,8,9,12,12,8,9,12,9,9,9,8,12,8,16,16,16,3, }; static unsigned short stb__times_bold_18_usascii_s[95]={ 127,100,81,66,67,15,31,77,23,1,27, 103,89,28,114,121,11,120,19,20,28,29,38,73,64,118,57,14,47,103,37, 57,37,1,108,45,88,76,65,1,40,101,95,13,1,103,105,86,54,53,27, 105,91,82,19,1,55,32,68,76,115,81,94,35,119,94,1,10,111,120,47, 55,45,121,30,80,120,62,52,1,92,82,44,113,75,84,75,62,18,102,36, 17,14,7,18, }; static unsigned short stb__times_bold_18_usascii_t[95]={ 1,1,82,18,1,18,18,82,1,1,82, 70,82,91,82,1,32,58,70,32,70,32,32,32,32,32,70,70,70,82,70, 18,1,70,58,18,58,58,58,18,58,58,32,58,58,45,32,1,58,1,58, 1,45,32,45,45,45,45,45,1,1,1,82,91,82,70,32,82,18,70,32, 32,45,18,1,45,45,82,82,82,18,18,82,70,18,70,70,70,82,18,82, 1,1,1,91, }; static unsigned short stb__times_bold_18_usascii_a[95]={ 65,87,144,130,130,260,217,72, 87,87,130,148,65,87,65,72,130,130,130,130,130,130,130,130, 130,130,87,87,148,148,148,130,242,188,173,188,188,173,159,202, 202,101,130,202,173,245,188,202,159,202,188,145,173,188,188,260, 188,188,173,87,72,87,151,130,87,130,145,115,145,115,87,130, 145,72,87,145,72,217,145,130,145,145,115,101,87,145,130,188, 130,130,115,102,57,102,135, }; // Call this function with // font: NULL or array length // data: NULL or specified size // height: STB_FONT_times_bold_18_usascii_BITMAP_HEIGHT or STB_FONT_times_bold_18_usascii_BITMAP_HEIGHT_POW2 // return value: spacing between lines static void stb_font_times_bold_18_usascii(stb_fontchar font[STB_FONT_times_bold_18_usascii_NUM_CHARS], unsigned char data[STB_FONT_times_bold_18_usascii_BITMAP_HEIGHT][STB_FONT_times_bold_18_usascii_BITMAP_WIDTH], int height) { int i,j; if (data != 0) { unsigned int *bits = stb__times_bold_18_usascii_pixels; unsigned int bitpack = *bits++, numbits = 32; for (i=0; i < STB_FONT_times_bold_18_usascii_BITMAP_WIDTH*height; ++i) data[0][i] = 0; // zero entire bitmap for (j=1; j < STB_FONT_times_bold_18_usascii_BITMAP_HEIGHT-1; ++j) { for (i=1; i < STB_FONT_times_bold_18_usascii_BITMAP_WIDTH-1; ++i) { unsigned int value; if (numbits==0) bitpack = *bits++, numbits=32; value = bitpack & 1; bitpack >>= 1, --numbits; if (value) { if (numbits < 3) bitpack = *bits++, numbits = 32; data[j][i] = (bitpack & 7) * 0x20 + 0x1f; bitpack >>= 3, numbits -= 3; } else { data[j][i] = 0; } } } } // build font description if (font != 0) { float recip_width = 1.0f / STB_FONT_times_bold_18_usascii_BITMAP_WIDTH; float recip_height = 1.0f / height; for (i=0; i < STB_FONT_times_bold_18_usascii_NUM_CHARS; ++i) { // pad characters so they bilerp from empty space around each character font[i].s0 = (stb__times_bold_18_usascii_s[i]) * recip_width; font[i].t0 = (stb__times_bold_18_usascii_t[i]) * recip_height; font[i].s1 = (stb__times_bold_18_usascii_s[i] + stb__times_bold_18_usascii_w[i]) * recip_width; font[i].t1 = (stb__times_bold_18_usascii_t[i] + stb__times_bold_18_usascii_h[i]) * recip_height; font[i].x0 = stb__times_bold_18_usascii_x[i]; font[i].y0 = stb__times_bold_18_usascii_y[i]; font[i].x1 = stb__times_bold_18_usascii_x[i] + stb__times_bold_18_usascii_w[i]; font[i].y1 = stb__times_bold_18_usascii_y[i] + stb__times_bold_18_usascii_h[i]; font[i].advance_int = (stb__times_bold_18_usascii_a[i]+8)>>4; font[i].s0f = (stb__times_bold_18_usascii_s[i] - 0.5f) * recip_width; font[i].t0f = (stb__times_bold_18_usascii_t[i] - 0.5f) * recip_height; font[i].s1f = (stb__times_bold_18_usascii_s[i] + stb__times_bold_18_usascii_w[i] + 0.5f) * recip_width; font[i].t1f = (stb__times_bold_18_usascii_t[i] + stb__times_bold_18_usascii_h[i] + 0.5f) * recip_height; font[i].x0f = stb__times_bold_18_usascii_x[i] - 0.5f; font[i].y0f = stb__times_bold_18_usascii_y[i] - 0.5f; font[i].x1f = stb__times_bold_18_usascii_x[i] + stb__times_bold_18_usascii_w[i] + 0.5f; font[i].y1f = stb__times_bold_18_usascii_y[i] + stb__times_bold_18_usascii_h[i] + 0.5f; font[i].advance = stb__times_bold_18_usascii_a[i]/16.0f; } } } #ifndef STB_SOMEFONT_CREATE #define STB_SOMEFONT_CREATE stb_font_times_bold_18_usascii #define STB_SOMEFONT_BITMAP_WIDTH STB_FONT_times_bold_18_usascii_BITMAP_WIDTH #define STB_SOMEFONT_BITMAP_HEIGHT STB_FONT_times_bold_18_usascii_BITMAP_HEIGHT #define STB_SOMEFONT_BITMAP_HEIGHT_POW2 STB_FONT_times_bold_18_usascii_BITMAP_HEIGHT_POW2 #define STB_SOMEFONT_FIRST_CHAR STB_FONT_times_bold_18_usascii_FIRST_CHAR #define STB_SOMEFONT_NUM_CHARS STB_FONT_times_bold_18_usascii_NUM_CHARS #define STB_SOMEFONT_LINE_SPACING STB_FONT_times_bold_18_usascii_LINE_SPACING #endif