// 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_arial_bold_8_latin1_*, // and separately install each font. Note that the CREATE function call has a // totally different name; it's just 'stb_font_arial_bold_8_latin1'. // /* // 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_arial_bold_8_latin1_BITMAP_WIDTH 256 #define STB_FONT_arial_bold_8_latin1_BITMAP_HEIGHT 34 #define STB_FONT_arial_bold_8_latin1_BITMAP_HEIGHT_POW2 64 #define STB_FONT_arial_bold_8_latin1_FIRST_CHAR 32 #define STB_FONT_arial_bold_8_latin1_NUM_CHARS 224 #define STB_FONT_arial_bold_8_latin1_LINE_SPACING 5 static unsigned int stb__arial_bold_8_latin1_pixels[]={ 0x06008822,0x06620441,0x20443105,0x22015019,0x18808881,0x04401088, 0x20108844,0x02044409,0x88004054,0x044180c0,0x40440c04,0x00441400, 0x10808804,0x40440010,0x44088100,0x2e155108,0x2a585303,0x171bbf62, 0xc8d70db8,0xc983c880,0x4443a982,0x0dcaa08b,0x5d136f2a,0x711264aa, 0x42e6e211,0x75511ee9,0x2a0f76c1,0x98351320,0x20e22642,0x507ba61a, 0x2128881d,0x89910aa8,0xb0554429,0x065c1ddb,0x81370332,0x32e1c429, 0x2322aaa0,0x645bb749,0x15475498,0x3ba297fd,0x22d0ee2e,0x3ba22eee, 0x8bbba22e,0x4ee2eee8,0x32c4aa4b,0x34779937,0x73b96255,0xeaa5cee9, 0x4aa5cee1,0x443b2233,0x217910bc,0x1bb10bc8,0x1bb10e64,0x9b9076ee, 0x3225b3c8,0x641bb10b,0x5437621c,0x0e641f94,0x43990732,0xaa4aa92a, 0x5e55aa92,0x4d1972bb,0x4c572bbb,0xa5d2faa1,0x2ed0ee68,0x68a5cd14, 0x2973452e,0x725cee68,0x3ab39347,0xd154b548,0x3ba5cee3,0x5cbaf697, 0x2e0f2973,0x259771cb,0x59772cbb,0x45dcf262,0x55cf2626,0x21e72a1e, 0x4b2ee5be,0xd1773c98,0xcac9e4c4,0x4d1771e9,0x22ee68bb,0x5dda2ee6, 0x2ad17768,0x0ee8cabf,0x0ee89e77,0x2f204459,0x3b8f4794,0x647a3cb4, 0x3d1e47a3,0x2771e8f2,0x3268ee4b,0x9929e8ba,0x4ee5b154,0x5d2e774b, 0x52e774ad,0x27327559,0x33237991,0x2e37991b,0xb9a593cc,0x4d1573cc, 0x41f50d2b,0x79971bcc,0x799734b2,0x2c9a2baa,0x4b26964d,0x5dda2ee6, 0x2ad17768,0x5cbb4beb,0x752ec3ee,0x552f2154,0x5a1dcd15,0x8ad4d15a, 0xb53456a6,0x4774a9a2,0x6d5cb13b,0x255342ec,0xa9dd2a68,0xa8fd4774, 0x87764774,0x3bb32ef9,0x6ecc7766,0x3a29bb71,0x5d376e2d,0x0b7625db, 0x23bb31a2,0x5bd14ddb,0xedaa6edc,0x88b7a22d,0x8b7a22de,0xd9d36ce9, 0x55d5b3a6,0x0ee1e9cf,0x2a5887a6,0xdd925e42,0x26a865c5,0x77642eec, 0x32177642,0x3fba22ee,0x90aa5b10,0x8f459335,0x7744b52a,0x21fdd10f, 0xfdd12cca,0x001c2b81,0x00000000,0x00003440,0x00000040,0x6cea0000, 0x4c04c29c,0x33066282,0x2a153003,0x00000002,0x26051440,0x198cc0aa, 0x2a800015,0x00815100,0x00000000,0x00000000,0x00000000,0x00000000, 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000, 0x00000000,0x10220000,0xa8a21981,0x07102260,0x0603102a,0x40444002, 0x54070088,0x01102880,0x04082041,0x20840201,0x02010408,0x20080104, 0x00204440,0x00880400,0x88208810,0xa8000100,0x3b82ee22,0x5911986a, 0x1115dc47,0x20644417,0x40645829,0x81ca82aa,0x1c0901b9,0x2b52ef4c, 0x51456a28,0x75910a2b,0xdd339d85,0x20e2b2e3,0x0ae584cd,0x1641776c, 0x3bba2337,0x6cc37622,0x8aeb220d,0x1dd32de9,0x53b8f6ec,0x5a0fbe29, 0x1dd31ed8,0x706ec4e6,0xb8ee3b87,0x2e3bbd73,0xbbd71dde,0x44777ae3, 0xf99220dd,0xf982f982,0xf982f982,0x6d42f982,0x20e32629,0x2e0e9074, 0x3bf63bb9,0x5d5c3b75,0xc83ce80c,0xa543b970,0x2552c868,0xab9a2974, 0x6457392b,0x22ee3bbb,0x5263b110,0x552a7719,0x55af221d,0x2597709b, 0x23c988ed,0x4771dc3b,0x5c11973b,0x8232e08c,0x326208cb,0x85cc8aa3, 0x85cc85cc,0x85cc85cc,0x0eeb85cc,0x4c315153,0x26661a99,0x31992e18, 0x47b62199,0x221ab9a8,0xb95419fe,0x1e8b268c,0x968bb964,0x3aac8747, 0x65dc9db5,0x987db19a,0x2770771d,0x2e79934a,0x25bb969b,0x2e970ee9, 0x770ee3cc,0x3ae771dc,0x1bbd70dd,0x75c377ae,0x479970dd,0x5a075a0c, 0xb40eb40e,0xb40eb40e,0x216caa0e,0x89338793,0x5dcdc793,0x54d3fb63, 0x92e4644b,0x74885f55,0xfa9d99a7,0x2ee59170,0xb9a2b568,0x457312ba, 0x12a3b8bc,0x55667513,0x44cee953,0x2ad15949,0x2755949b,0x5c9bb73a, 0x5c771dc3,0x70770773,0xbb707707,0x7fdf52c9,0xf51ff7d4,0x7f7d47fd, 0xa8ffbea3,0x3ba23fef,0x9726660e,0x22a2e88a,0x2ef225c9,0xee996321, 0xb32ece21,0x36eb0bbd,0x877f643e,0xd9d30eea,0xbb116f64,0xc8837a61, 0x53bb61bb,0x3bb20de9,0x261ddd10,0x2dbd31de,0x3bd31dd8,0x43b803a6, 0x73b8ee3b,0x3bee5ddf,0x25ddf72e,0x2002eefb,0x88ecd11d,0x3b344766, 0x4d11d9a2,0x0200d11d,0x20411041,0x20440000,0x00000020,0x00000026, 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000, 0x00000000,0x00000000,0x00000000,0x04000000,0x44410010,0x11020c08, 0x44711908,0x20810e60,0x44491370,0x33220880,0x0443b754,0x88111010, 0x44220010,0x1125e440,0x43983722,0x08888838,0x84081111,0x04444088, 0x40082211,0x42040888,0x04104220,0x20411041,0x43eed820,0x443dd35b, 0xa8bbd70f,0x2a4c8531,0x3b257775,0x3366114f,0x5652ab24,0x43b7ae58, 0xd3770aa8,0x0cb9a32e,0x6f5c2f98,0x20ae771e,0x0ee550cc,0x47a6d377, 0x10e219bb,0x3ddfe885,0x8ec1bfd9,0x21dbd73b,0x2771ddeb,0x20ea953b, 0x4f20fedb,0x747ab52d,0x754a8fa8,0xf99fb8fa,0x2552ad52,0xb89ae545, 0x065c3b63,0x1542a954,0x361b6293,0x26688980,0x4b3590ee,0x7154953b, 0x734eed15,0x2e641dbd,0x9dcb232e,0x59752bab,0xc9665caa,0x323db68a, 0x710f218a,0x2089eac8,0x21d4a859,0x232e953b,0x5c65cee0,0x41ec0754, 0x926ec5be,0x2a595b95,0x5dedc3dc,0x2957f52e,0x2c41bb3c,0x436ea1d1, 0xb9dc3eeb,0x6c931dc3,0xe8931d44,0x7653bf21,0x966bb65d,0x5db7a23b, 0x16cee3ee,0xedeb83ad,0xb976e771,0x32e7768c,0x2ad9b168,0xa5cbb624, 0xe8f89260,0x221662dd,0xaccee68f,0x2770ddeb,0x0754edeb,0x207d4132, 0x27b2a0fa,0x87df50ec,0x752cddbb,0x7c56a97d,0xd0f45620,0x5c0eebfd, 0x223b8773,0x20c83d32,0xdd90e228,0x5cee0b29,0x5da20ee4,0x50eefb82, 0xa9dc7fdf,0x43b6e775,0x9dceed3b,0x12ab5736,0x32d65491,0x407f75cb, 0x5c7bb059,0x2e0ee973,0x1d52a773,0x88d1035c,0x757e25ce,0xb83e32a6, 0x5752beea,0x2277649f,0xd89ff958,0x5cee0770,0x26931dc3,0x42cc0682, 0x3ee0263b,0x940ee0de,0x1d84b809,0x9777dcd1,0x2e95573b,0x69dceed3, 0x2a2542ea,0x431054c1,0x4c9ddd0e,0x7dc1f505,0x5ddf70de,0x54a9dcee, 0x3bfa1ddf,0x4f23441e,0x526cfa2d,0xccab96e7,0x0136752b,0x00000000, 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000, 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000, 0x00000000,0x00000000,0x44400000,0x64404440,0x3b9b910b,0x21541cc8, 0x4104c3db,0x44332600,0x21b910dd,0x0444492a,0x4c600c11,0x54b2ea18, 0x1192dadb,0x52795047,0x2e732a9b,0x43bb72aa,0x0408218a,0x04081022, 0x2e049bb7,0x082774dd,0x22088881,0x82298208,0x70cccc48,0x3ae00ee7, 0x5dbd70ed,0xca8965dc,0x9a2ee69d,0xd7752dda,0x4fbb2198,0x15973cda, 0x4ddcf262,0x500d1771,0xd705f547,0x65c37629,0xd1b57768,0x8e64aeee, 0xb7d590cb,0x13744221,0xa86e4cd5,0x90ed4b55,0x2bb8654b,0x46aa63b5, 0xd1115edc,0x7ac96466,0x33726664,0x530cb8e2,0x0555506a,0x25b3b800, 0x5e64973b,0x477d9971,0x8e6d4d2c,0x3ff669dc,0x3ec75574,0x332e7d71, 0x2ee31593,0x2ffe4068,0xb03b2db1,0xabb4ee59,0xc9ba2d49,0x66cc772b, 0xe99ba06d,0x269172a0,0x36259b0c,0x8e54931c,0x899970da,0x2a150900, 0x00000049,0xeb800000,0x1bfd70ee,0xdda8eecc,0x0b7a23de,0x216f5435, 0x54fbb219,0x23bb53bc,0x5db14ddb,0x2a01b3a6,0xea82fae3,0x69dc7534, 0x4c9a9357,0x4fc2b862,0x65e5264d,0x5645dfd3,0x13314c61,0x05d4a666, 0x00000000,0x00000000,0xb84b8000,0x00000f8b,0x1009ffb0,0x00001041, 0x20888800,0x00300208,0x00000000,0x00000000,0x00000000,0x00000000, 0x07700000,0x00016a77,0x00000000,0x00000000,0x00000000,0x00000000, 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000, 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000, }; static signed short stb__arial_bold_8_latin1_x[224]={ 0,0,0,0,0,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,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,0,0,-1,0,0,-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,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,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,-1,0,0,0,0,-1,-1,0,0,0,0,0,0,-1,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,-1,0,0,0,0,0,-1,0,-1,-1,-1,0,0,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,-1,0,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, }; static signed short stb__arial_bold_8_latin1_y[224]={ 6,0,0,0,0,0,0,0,0,0,0,1,5,3, 5,0,0,0,0,0,0,0,0,0,0,0,2,2,1,2,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,0,6,0,2,0,2,0,2,0,2,0,0, 0,0,0,2,2,2,2,2,2,2,0,2,2,2,2,2,2,0,0,0,2,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,6,2,0,0,1,0, 0,0,0,0,0,2,2,3,0,-1,0,1,0,0,0,2,0,3,6,0,0,2,0,0,0,2,-1,-1,-1,-1, -1,-1,0,0,-1,-1,-1,-1,-1,-1,-1,-1,0,-1,-1,-1,-1,-1,-1,1,0,-1,-1,-1,-1,-1,0,0,0,0, 0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,2,0,0,0,0,0,0,0, }; static unsigned short stb__arial_bold_8_latin1_w[224]={ 0,2,4,4,4,7,6,2,3,3,3,4,2,3, 2,3,4,3,4,4,4,4,4,4,4,4,2,2,4,4,4,5,7,6,5,5,5,5,5,6,5,2,4,6, 5,6,5,6,5,6,6,5,5,5,6,7,5,6,5,3,3,2,4,6,2,4,5,4,4,4,3,4,4,2, 3,4,2,6,4,5,5,4,3,4,3,4,4,6,4,4,4,3,2,3,4,5,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,2,4,4,4,4, 2,4,3,7,3,4,4,3,7,6,3,4,3,3,3,4,5,2,3,2,3,4,6,6,6,5,6,6,6,6, 6,6,8,5,5,5,5,5,3,2,4,4,6,5,6,6,6,6,6,4,6,5,5,5,5,6,5,5,4,4, 4,4,4,4,7,4,4,4,4,4,3,3,4,4,5,4,5,5,5,5,5,4,5,4,4,4,4,4,5,4, }; static unsigned short stb__arial_bold_8_latin1_h[224]={ 0,6,3,7,7,7,7,3,8,8,4,5,3,2, 1,7,7,6,6,7,6,7,7,6,7,7,4,6,5,3,5,6,8,6,6,7,6,6,6,7,6,6,7,6, 6,6,6,7,6,7,6,7,6,7,6,6,6,6,6,8,7,8,4,2,2,5,7,5,7,5,6,6,6,6, 8,6,6,4,4,5,6,6,4,5,7,5,4,4,4,6,4,8,8,8,3,5,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,6,8,7,5,6, 8,8,2,7,4,4,3,2,7,2,4,5,4,4,2,6,8,1,2,4,4,4,7,7,7,6,7,7,7,7, 7,7,6,8,7,7,7,7,7,7,7,7,6,7,8,8,8,8,8,5,7,8,8,8,8,7,6,7,7,7, 7,7,7,7,5,6,7,7,7,7,6,6,6,6,7,6,7,7,7,7,7,5,5,7,7,7,7,8,8,8, }; static unsigned short stb__arial_bold_8_latin1_s[224]={ 139,41,204,133,138,143,151,201,17,82,179, 85,198,224,242,52,192,8,12,215,17,232,242,49,247,197,137,54,95,183,90, 57,86,102,109,220,181,187,22,1,196,193,175,235,202,242,249,185,1,168,7, 98,168,226,174,227,221,214,208,37,158,41,166,235,228,64,162,69,237,14,141, 136,131,128,78,118,115,110,105,27,90,85,126,59,252,74,117,130,140,44,145, 94,98,101,188,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79, 79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,79,139,156,134, 210,49,63,21,117,216,125,162,150,193,224,202,209,175,33,171,158,220,68,24, 245,231,155,122,100,118,111,104,150,91,84,77,70,63,56,159,128,41,35,29, 23,19,16,11,6,73,250,30,44,51,58,65,54,210,72,105,122,111,182,96, 170,165,47,154,194,205,1,19,145,144,149,139,189,28,32,36,80,176,123,199, 159,217,223,229,44,38,235,240,245,180,12,6,1, }; static unsigned short stb__arial_bold_8_latin1_t[224]={ 9,18,26,10,10,10,10,26,1,1,26, 26,26,26,26,10,10,18,18,10,18,10,10,18,10,10,26,18,26,26,26, 18,1,18,18,10,18,18,18,18,18,18,10,18,18,18,18,10,26,10,26, 10,18,10,18,18,18,18,18,1,10,1,26,26,26,26,10,26,10,26,18, 18,18,18,1,18,18,26,26,26,18,18,26,26,10,26,26,26,26,18,26, 1,1,1,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26, 26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,9,18,1, 10,26,18,1,1,26,10,26,26,26,26,10,26,26,26,26,26,26,18,1, 26,26,26,26,26,10,10,10,18,10,10,10,10,10,10,18,1,10,10,10, 10,10,10,10,10,18,1,1,1,1,1,1,26,1,1,1,1,1,1,18, 1,1,10,1,1,1,10,26,18,1,1,1,1,18,18,18,18,1,18,1, 1,1,1,1,26,26,1,1,1,10,1,1,1, }; static unsigned short stb__arial_bold_8_latin1_a[224]={ 32,38,54,64,64,102,83,27, 38,38,45,67,32,38,32,32,64,64,64,64,64,64,64,64, 64,64,38,38,67,67,67,70,112,83,83,83,83,76,70,89, 83,32,64,83,70,95,83,89,76,89,83,76,70,83,76,108, 76,76,70,38,32,38,67,64,38,64,70,64,70,64,38,70, 70,32,32,64,32,102,70,70,70,70,45,64,38,70,64,89, 64,64,57,45,32,45,67,86,86,86,86,86,86,86,86,86, 86,86,86,86,86,86,86,86,86,86,86,86,86,86,86,86, 86,86,86,86,86,86,86,86,32,38,64,64,64,64,32,64, 38,84,42,64,67,38,84,63,46,63,38,38,38,66,64,32, 38,38,42,64,96,96,96,70,83,83,83,83,83,83,115,83, 76,76,76,76,32,32,32,32,83,83,89,89,89,89,89,67, 89,83,83,83,83,76,76,70,64,64,64,64,64,64,102,64, 64,64,64,64,32,32,32,32,70,70,70,70,70,70,70,63, 70,70,70,70,70,64,70,64, }; // Call this function with // font: NULL or array length // data: NULL or specified size // height: STB_FONT_arial_bold_8_latin1_BITMAP_HEIGHT or STB_FONT_arial_bold_8_latin1_BITMAP_HEIGHT_POW2 // return value: spacing between lines static void stb_font_arial_bold_8_latin1(stb_fontchar font[STB_FONT_arial_bold_8_latin1_NUM_CHARS], unsigned char data[STB_FONT_arial_bold_8_latin1_BITMAP_HEIGHT][STB_FONT_arial_bold_8_latin1_BITMAP_WIDTH], int height) { int i,j; if (data != 0) { unsigned int *bits = stb__arial_bold_8_latin1_pixels; unsigned int bitpack = *bits++, numbits = 32; for (i=0; i < STB_FONT_arial_bold_8_latin1_BITMAP_WIDTH*height; ++i) data[0][i] = 0; // zero entire bitmap for (j=1; j < STB_FONT_arial_bold_8_latin1_BITMAP_HEIGHT-1; ++j) { for (i=1; i < STB_FONT_arial_bold_8_latin1_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_arial_bold_8_latin1_BITMAP_WIDTH; float recip_height = 1.0f / height; for (i=0; i < STB_FONT_arial_bold_8_latin1_NUM_CHARS; ++i) { // pad characters so they bilerp from empty space around each character font[i].s0 = (stb__arial_bold_8_latin1_s[i]) * recip_width; font[i].t0 = (stb__arial_bold_8_latin1_t[i]) * recip_height; font[i].s1 = (stb__arial_bold_8_latin1_s[i] + stb__arial_bold_8_latin1_w[i]) * recip_width; font[i].t1 = (stb__arial_bold_8_latin1_t[i] + stb__arial_bold_8_latin1_h[i]) * recip_height; font[i].x0 = stb__arial_bold_8_latin1_x[i]; font[i].y0 = stb__arial_bold_8_latin1_y[i]; font[i].x1 = stb__arial_bold_8_latin1_x[i] + stb__arial_bold_8_latin1_w[i]; font[i].y1 = stb__arial_bold_8_latin1_y[i] + stb__arial_bold_8_latin1_h[i]; font[i].advance_int = (stb__arial_bold_8_latin1_a[i]+8)>>4; font[i].s0f = (stb__arial_bold_8_latin1_s[i] - 0.5f) * recip_width; font[i].t0f = (stb__arial_bold_8_latin1_t[i] - 0.5f) * recip_height; font[i].s1f = (stb__arial_bold_8_latin1_s[i] + stb__arial_bold_8_latin1_w[i] + 0.5f) * recip_width; font[i].t1f = (stb__arial_bold_8_latin1_t[i] + stb__arial_bold_8_latin1_h[i] + 0.5f) * recip_height; font[i].x0f = stb__arial_bold_8_latin1_x[i] - 0.5f; font[i].y0f = stb__arial_bold_8_latin1_y[i] - 0.5f; font[i].x1f = stb__arial_bold_8_latin1_x[i] + stb__arial_bold_8_latin1_w[i] + 0.5f; font[i].y1f = stb__arial_bold_8_latin1_y[i] + stb__arial_bold_8_latin1_h[i] + 0.5f; font[i].advance = stb__arial_bold_8_latin1_a[i]/16.0f; } } } #ifndef STB_SOMEFONT_CREATE #define STB_SOMEFONT_CREATE stb_font_arial_bold_8_latin1 #define STB_SOMEFONT_BITMAP_WIDTH STB_FONT_arial_bold_8_latin1_BITMAP_WIDTH #define STB_SOMEFONT_BITMAP_HEIGHT STB_FONT_arial_bold_8_latin1_BITMAP_HEIGHT #define STB_SOMEFONT_BITMAP_HEIGHT_POW2 STB_FONT_arial_bold_8_latin1_BITMAP_HEIGHT_POW2 #define STB_SOMEFONT_FIRST_CHAR STB_FONT_arial_bold_8_latin1_FIRST_CHAR #define STB_SOMEFONT_NUM_CHARS STB_FONT_arial_bold_8_latin1_NUM_CHARS #define STB_SOMEFONT_LINE_SPACING STB_FONT_arial_bold_8_latin1_LINE_SPACING #endif