// 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_10_latin1_*, // and separately install each font. Note that the CREATE function call has a // totally different name; it's just 'stb_font_arial_bold_10_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_10_latin1_BITMAP_WIDTH 256 #define STB_FONT_arial_bold_10_latin1_BITMAP_HEIGHT 46 #define STB_FONT_arial_bold_10_latin1_BITMAP_HEIGHT_POW2 64 #define STB_FONT_arial_bold_10_latin1_FIRST_CHAR 32 #define STB_FONT_arial_bold_10_latin1_NUM_CHARS 224 #define STB_FONT_arial_bold_10_latin1_LINE_SPACING 6 static unsigned int stb__arial_bold_10_latin1_pixels[]={ 0x00000000,0x42464000,0x0540a22a,0x21442c74,0x555504cc,0x288002aa, 0x15730551,0x054c1710,0x38800000,0x00020000,0x44739300,0x06a05443, 0x82a81540,0x01a980a8,0x906980f4,0x4c0bae07,0x1907b606,0x506a8909, 0x5b037709,0xffd81bb8,0x4b85f76f,0x88feab30,0x642ebace,0x81f7f30d, 0x40d300ed,0xdd12cc5a,0x5c480b20,0x89701d34,0xb31a88a8,0xf71fefe4, 0x1221ec81,0x3f7f2064,0x403efe24,0x985440ba,0x70662511,0x1032a037, 0x46e35115,0x54aa372a,0xb07c0cbe,0x23c49fbf,0x7fc4fdfd,0x730ba3cd, 0xd1354e60,0x41d57931,0x540fe22d,0x5107500b,0x45661577,0x5510bbbb, 0x22ed4157,0x09a87338,0x35b9ea53,0x21d43e2b,0xb705541e,0x3e23db87, 0x23aa1f10,0x4fdfd80f,0x4f55b9ea,0x13f7f65b,0x3d49fbfb,0xb9756eb7, 0x32bea5d5,0x10fa96c5,0x0fa96a1f,0x66fdc1f1,0x03fd0ba3,0xbaa9aad5, 0x3a2bbf8c,0xd037b6e1,0x507fa03f,0x5663999f,0xf51cccfa,0x33e63999, 0x2355aa2e,0xf52f88fb,0x0d759adc,0x933542e8,0x3a7265d3,0xd53e8d72, 0x221f50d7,0xaadcf50f,0x887d56e7,0x3e21f50f,0xf8adcf50,0x1f3f10f9, 0x4f63c5aa,0x24b9f46b,0x36a1f46b,0xdf98ba3c,0x64d56a84,0x2373d0e8, 0x26c6e46c,0xbf309bf3,0x2b307a89,0x2e0f507a,0x0d56a84d,0x73d4b99b, 0x2044f50b,0xc89aa0fa,0x5fd912fe,0x5aa7d1ea,0x4fa35c4e,0x73d56e7a, 0x2e7d1aeb,0x2e7a9f46,0xbdb17b65,0x363547d4,0xb52f8f52,0xb30be3d4, 0x39917479,0xc9aad50f,0x268f98f9,0x377a20f9,0x321e7323,0x7ffd479c, 0x3feab30f,0xffff50ff,0xa8af3ae1,0x1ff30d56,0x8e2b93d4,0x26c5d8af, 0x25d5c9aa,0x65fc5d5c,0x3e6d51fd,0x2a5f1ea0,0xb93d5727,0x1ea5f1ea, 0x25c9ea5f,0x517d42fa,0x21e85fdd,0x1a67b8bf,0xb30f717f,0x9bf17479, 0x4d56a85f,0x0bfcebba,0x83f62174,0x6fc2fcdf,0x267ea2fc,0x4cfd5661, 0x88667ea1,0x55aa0efd,0x9f989b06,0x6d4b34d8,0x2a0f40df,0x54fbbea6, 0x3f663eef,0xbf7d52ff,0x4cf717f0,0x3f34d89f,0x5c5fc9b1,0x33dc5fc7, 0x2e29b13f,0x1aa3dc47,0x37f662c4,0xbfb30741,0x2279b303,0xdb99f52e, 0x641d55c8,0x3d87660b,0x7d47e366,0x33ea6dcc,0x4c1ea6dc,0x81ea0f55, 0x0d56a80b,0x3bff2132,0x41d98b30,0x003540f8,0x9800a600,0x7fe41dfd, 0x83bff20e,0x6cc1dfd9,0x77fe41df,0x2eb85d70,0x001a8254,0x32600154, 0x8f63d92b,0x265d31f8,0x5ef6544e,0x9d70f540,0x363f11ec,0x7fd47e23, 0x3ea913ff,0xfff53fff,0x56a8147f,0x8801320d,0x13206644,0x000001aa, 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000, 0x00000000,0x00304c00,0x88cc06e6,0x00000002,0x10aa0000,0x20c4c93b, 0x5415048c,0x205c42bb,0x442a838c,0x300aa80c,0x20eb2605,0x03982cd8, 0x26a20351,0x1510e628,0x0980a20c,0x98a6a606,0x1070d40d,0x2a0e4055, 0x4698530e,0x1c85ecfc,0x310322d5,0x26073011,0x5c5c1c83,0x910f3620, 0x1de41550,0x88fc1232,0x3260bbbb,0x4241c640,0x7efec3bc,0x75105b84, 0x64073101,0xfd86d880,0x50641ffd,0x0d50e279,0x5c14c3aa,0x1fdd32cb, 0x6424db2a,0x85ba83cd,0x27f9090c,0x681710f9,0x2e25e5aa,0x3203704b, 0x22e2dd41,0x3311710b,0x71aa0e54,0xf03db87b,0x87333ea3,0x20e543db, 0x50e541ca,0xfd03e21f,0x7407fa03,0x40bca81f,0x43e22eca,0x4e6732fd, 0x5d5094a8,0xb090c819,0x336abfdf,0x0363aae0,0x32a0f772,0x40d45c0b, 0x2a2d72fb,0x76a9620a,0x40bca87b,0x4ce60bca,0x9cce6733,0x56e7f539, 0x9aa1e9e9,0x3932e9c9,0x1ea3f05d,0xe9974e4c,0x3d3d31e9,0x35c7a7a6, 0x84df98fa,0xdf984df9,0x12ed7cc4,0xdb5cdb7f,0x5aad53da,0x54129aca, 0x545c5caf,0x87cfcc11,0x2f623fe8,0x30df7049,0x2320bb5f,0xbd4f30ed, 0xa8ea2fc9,0xf32e9c9e,0x6d7ccbb5,0x6ab55aa5,0xab55aad5,0xdf95b8ff, 0xd913547f,0x0bfb225f,0x7fffd47e,0x325fd910,0xfdf93fef,0x54ffbf27, 0xf39917c7,0x990f3990,0x4f35c8f3,0x6754f35b,0x355aa5f3,0x4daa69a4, 0xfc9a6907,0x4176c3fc,0x5d51dd8d,0x79ae4bbf,0x3ccb10b8,0x45f317f1, 0x3b23aa1c,0xc9e6b92f,0x6ab54f35,0xab55aad5,0x2b7bbd56,0x9354155b, 0x2eae4bab,0x3ea1f39b,0x97572199,0x556e155b,0xbf82ab70,0x7e6fc7b8, 0x217e6fc2,0x5ae2fcdf,0x135daa6a,0x76a9eebf,0x25c89a8d,0x8b86a8fa, 0x373725c8,0x98599952,0x2d73bd9c,0x355ae3fb,0x886fc522,0x33ffa66f, 0x2b9d51a0,0xb9aad72e,0x6bb54d56,0xbb55aed5,0x2bbf1d56,0x9aa0eec8, 0xdf53eefa,0xa93fa67d,0x27ddf507,0xd910eec8,0x83bb221d,0x3ea1dfd9, 0x33ea6dcc,0x333ea6dc,0x20f7ec6d,0x3b6a1efc,0x37ba21df,0x51ec9a46, 0x34885fdd,0x8b2ee3d9,0x86c0dfe8,0x9ffb11de,0x20f7ec1d,0x00006620, 0x8fbbea01,0x77ec1efd,0x45b7ba21,0xbdd16dee,0x02fddaad,0x40000354, 0x003ffffa,0x7b000000,0x223d8fc4,0x0fc47b1f,0x00002000,0x20200081, 0x81c02220,0x00000040,0x00000000,0x20000000,0x00017a6a,0x00000000, 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000, 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000, 0x00000000,0x43314428,0x05c5c1a9,0x14c0dd44,0x2055541c,0x81501ba8, 0x05440ab9,0x01440544,0x05554451,0x15555510,0x8e21d4ea,0x320cc028, 0x751b8101,0x70351122,0x542aaa61,0x4c1cc530,0x26959502,0x88a20cbb, 0x10c81aaa,0x22517105,0xf1510512,0x2b73d4db,0x22e1fcf8,0x5cd6c40b, 0x1b1f7e63,0x3622eef8,0x7ef43b9a,0x44db9f11,0x37f20fcf,0x41b7e63f, 0x3f77e66a,0x99bfbb01,0x322dd2e3,0x26027e67,0x47805c3f,0x89225b5b, 0xb8e64dcf,0x3ab73fee,0x3fd0af23,0xf56daf98,0x987c4b95,0x8643fdcf, 0x328b886a,0x27aa1aa9,0x5b9ea3d5,0xbca826d5,0x55674e40,0x2b83e311, 0x323207e2,0x22d31aac,0x542a3f50,0x543e23d5,0x950f5323,0x0b734cd7, 0xb701f1f3,0x267ea96e,0xdd30efef,0x7dd41e87,0x40f1f11a,0x424cf328, 0x31efe269,0x5c4df989,0x3c5aad55,0x4c9e61f1,0x9872d52c,0x6d755264, 0x4f6b7d51,0x67ed6e7a,0x9176be61,0xf89177b3,0xfdf524c4,0x4889ce43, 0x7ec1ddd7,0xd72ff43e,0x99fcedc0,0x33f66daf,0xdf4d87a8,0xaedae1dd, 0xe9e679e8,0x90d91ec3,0x26ec7dfd,0x6a8fa206,0x3bfae2d8,0xf3991aa3, 0x3ead96a8,0xdf33c6a8,0x3aa681fd,0x2d53545d,0x7d55cafa,0xb93d4bab, 0x35c82be6,0x89cc9c8f,0x11a17443,0xa8c8c932,0x44f2d738,0x1d52fb88, 0x4089ea5d,0x2ab72ecc,0x23547ae6,0x19afcdf8,0x6e57bfae,0xf53f32fb, 0x21d53d85,0x21fa8780,0x3543d878,0x57f751a6,0x3f37e354,0xeab6fec2, 0x3f3342ee,0x3ea78b93,0x2d53542f,0x27aad56a,0x227e61f6,0x5c23d74d, 0x8abb8d56,0x0ba950cb,0x71ed261d,0x26191955,0x223aa7b7,0xf8b6b72e, 0x22e65d8a,0x99b2d50f,0x6e44d88e,0x2e089fbb,0x34fddc84,0x27b07bdf, 0x2226b9e9,0x90d7108c,0x546a8170,0x5277f644,0x2eddf54d,0x1c0d5698, 0x44d711f3,0x41f3d50f,0xab55aa6a,0x913f2d56,0x3bb61dff,0x207bf64f, 0x3621dccb,0x3f62c85f,0x0ee65c0c,0xffc837f2,0xb517fa25,0x1ff441bf, 0xff99b7f6,0xf87e20df,0x40753fff,0x7b01e678,0xffb066d4,0x020bae9f, 0x3c8d50ba,0x366a8788,0x52603e23,0x7ccf1049,0x43a22eff,0x53549b6a, 0x6ab55aad,0x20000000,0x00088000,0x00000004,0x00000000,0x00000000, 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000, 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x324e5400, 0x3044c417,0x2a21b879,0x42aaaaa0,0x5440aaa8,0x55510aaa,0x44a20a85, 0x98144a62,0x30d42aaa,0x151a8a65,0x4510a8a6,0x2a86a229,0xaa88c451, 0x06aaa20a,0xbc987b71,0x5e541c43,0x1110e540,0x6de6dc11,0xb724d262, 0x2223c987,0x14013088,0x30622510,0xb5f33b57,0x9770fe2d,0x7316d74c, 0x65c3f3e2,0xbbf50cdf,0x6667cc3f,0xc8999f31,0xb73cd365,0x766541e6, 0x3e23ea0f,0x21f33f32,0x47e3fb3d,0x7d45f379,0x4fe6bf55,0x3fb9f35a, 0xb93f73e6,0xd5f10c9d,0x57cc588d,0x43a7a64d,0x3913fffb,0x5aa3d3bd, 0x23d3936a,0x0812dae9,0x81f03bf5,0x95d14fc8,0xa5ee57d4,0x5cc9f96a, 0x260b71da,0x5d0f6534,0x7996e6a8,0xf3d40f30,0xf35b9e63,0xcd82f980, 0x71f75c5c,0x99e6f7eb,0xbf543f8f,0x51ff35ec,0xf33e9e6b,0x19fd12dc, 0x643eaf2e,0x22b73ddd,0x54bb7b27,0x3f7225b5,0x2ad52fde,0x2e5fb916, 0xd7104085,0x5d37f6e9,0x8f6640bf,0x91d5d56a,0xafa87ead,0xa8aed55c, 0x0ba07cc6,0xff33d4d5,0x3bbe61ff,0x266aaf83,0x0f35feef,0xff882744, 0x4fcc6f80,0x3e65bdae,0x56f540fe,0x59bd35ce,0x47f2fe6b,0x262edcf9, 0x57d52e99,0xa8d5d54d,0x0aadcd56,0x56e3d5d5,0x2d50b8ce,0x54bab96b, 0x54102576,0x57f532ed,0xae82fba6,0x65aad50e,0x6a8f16ce,0x5077e4d5, 0x17417ccd,0x3e66a9aa,0x267e6199,0x264cdc80,0x0f35c99f,0x213602ec, 0x667c1ffa,0x2fe63cf8,0x7e5f545d,0xb9f1d35a,0xf986f3e6,0x6f74c4ea, 0x883ddd30,0x221efd87,0xbbb70eec,0x3bb3ba67,0x4db7ba25,0x3bf23ede, 0x05d70810,0x4d76603e,0x755aa1ab,0x8f15b8c9,0x43b8d56a,0x8117f16a, 0x6c47542e,0x98223e64,0x30ffcc07,0x88f9adcf,0x40223f20,0x35df444c, 0x30ff4bf6,0x9ea8fe2f,0x2ed35adf,0x5e60f35f,0x800802f8,0x00000001, 0x11300000,0x80100211,0x3bd90000,0x9aad51e2,0xfcb541ba,0x2a1743ff, 0x3e60dfff,0x00f33fff,0x56e798dd,0xfd0ffff9,0x89903fff,0x0fc93a6c, 0x3ee798f9,0x56afed50,0x83cd7a69,0x0003ee79,0x00000000,0x00000000, 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000, 0x00000000,0x00000000,0x73000000,0x272ae639,0x2322723c,0x546e0249, 0x244b2753,0x44419997,0x29999508,0x3714ccca,0x205c0544,0x88544222, 0x006a0a0a,0xb8cca6a6,0x8a4c6a38,0x66649f90,0x1c88a64c,0x00000000, 0x00000000,0x00000000,0x4fd42fea,0x5791f9ee,0x27a6975f,0x44b6b73d, 0xa99226df,0x98756c6e,0x75532bbb,0x6ac9ae6d,0x21d51fcc,0x2ea9556a, 0x2ae19b73,0x5d2f7aa5,0x22eb95be,0x2d528923,0x26666099,0x74197241, 0x00006eee,0x00000000,0x00000000,0x56a35400,0x33a65d4c,0x97ee1ecd, 0x17dc79f8,0xcda83ee0,0x213776e3,0x46cf7b69,0x1907dec6,0xa88ec522, 0x2e547d14,0x32659535,0x0000754a,0x00000000,0x00000000,0x00000000, 0x8d500000,0xf8ba795a,0x776c7e8f,0xbdd13b60,0x8827ea18,0x2aaa65ae, 0x49951882,0x1eda62c9,0x53dc8217,0x01062259,0x00000000,0x00000000, 0x00000000,0x00000000,0xa8b50000,0x6c8ba795,0x22ba4c9d,0x9f5721f9, 0x87fffa78,0x00000ba9,0x00000000,0x00000000,0x00000000,0x00000000, 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000, 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000, 0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000, }; static signed short stb__arial_bold_10_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,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,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_10_latin1_y[224]={ 8,1,1,1,1,1,1,1,1,1,1,2,6,5, 6,1,1,1,1,1,1,1,1,1,1,1,3,3,2,3,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,8,1,3,1,3,1,3,1,3,1,1, 1,1,1,3,3,3,3,3,3,3,1,3,3,3,3,3,3,1,1,1,3,2,2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,8,3,1,1,2,1, 1,1,1,1,1,3,3,5,1,0,1,1,1,1,1,3,1,4,8,1,1,3,1,1,1,3,-1,-1,-1,0, 0,0,1,1,-1,-1,-1,0,-1,-1,-1,0,1,0,-1,-1,-1,0,0,2,1,-1,-1,-1,0,-1,1,1,1,1, 1,1,1,1,3,3,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,3,1,1,1,1,1,1,1, }; static unsigned short stb__arial_bold_10_latin1_w[224]={ 0,3,4,5,5,8,7,2,3,3,4,5,2,3, 2,4,5,4,5,5,5,5,5,5,5,5,3,3,5,5,5,6,9,7,7,7,7,6,6,7,6,2,5,7, 6,7,6,7,6,7,7,6,6,6,7,9,6,7,6,3,4,3,5,7,3,5,6,5,5,5,4,5,5,2, 3,5,2,8,5,6,6,5,4,5,3,5,5,7,5,5,5,4,2,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,5,0,3,5,5,5,5, 2,5,3,8,4,5,5,3,8,7,4,5,3,3,3,5,6,2,3,3,4,5,8,8,8,6,7,7,7,7, 7,7,10,7,6,6,6,6,3,3,4,4,8,6,7,7,7,7,7,5,7,6,6,6,6,7,6,6,5,5, 5,5,5,5,8,5,5,5,5,5,3,3,4,4,6,5,6,6,6,6,6,5,6,5,5,5,5,5,6,5, }; static unsigned short stb__arial_bold_10_latin1_h[224]={ 0,7,3,8,8,8,8,3,9,9,4,6,4,2, 2,8,8,7,7,8,7,8,8,7,8,8,5,7,6,4,6,7,9,7,7,8,7,7,7,8,7,7,8,7, 7,7,7,8,7,8,7,8,7,8,7,7,7,7,7,9,8,9,4,2,2,6,8,6,8,6,7,7,7,7, 9,7,7,5,5,6,7,7,5,6,8,6,5,5,5,7,5,9,9,9,3,6,6,6,6,6,6,6,6,6, 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,0,7,9,8,6,7, 9,9,2,8,4,5,4,2,8,2,4,7,4,4,2,7,9,2,2,4,4,5,8,8,8,7,9,9,9,8, 8,8,7,9,9,9,9,8,9,9,9,8,7,8,10,10,10,9,9,5,8,10,10,10,9,9,7,8,8,8, 8,8,8,8,6,7,8,8,8,8,7,7,7,7,8,7,8,8,8,8,8,6,6,8,8,8,8,9,9,9, }; static unsigned short stb__arial_bold_10_latin1_s[224]={ 254,217,116,191,197,203,212,121,77,65,100, 232,89,138,135,248,1,140,28,36,127,47,62,179,75,89,41,164,238,57,226, 168,116,196,221,81,41,49,56,240,71,253,69,117,78,125,133,106,140,239,147, 68,34,7,63,107,100,92,85,112,42,96,79,158,150,208,175,214,95,181,7, 1,247,244,108,233,253,6,250,174,210,204,1,155,236,202,29,15,35,158,45, 126,160,217,110,220,220,220,220,220,220,220,220,220,220,220,220,220,220,220,220, 220,220,220,220,220,220,220,220,220,220,220,220,220,220,220,220,220,254,229,177, 14,187,185,206,131,124,53,69,51,63,138,27,142,105,152,92,96,128,121,89, 132,154,85,74,244,182,227,166,145,100,145,137,130,122,114,110,209,170,153,163, 75,183,187,222,52,101,39,31,1,23,81,69,23,152,16,9,39,199,191,133, 247,227,233,1,57,63,82,193,18,46,94,100,88,24,175,191,239,145,12,138, 14,220,7,20,168,161,160,21,27,33,52,58,46, }; static unsigned short stb__arial_bold_10_latin1_t[224]={ 1,21,38,11,11,11,11,38,1,1,38, 30,38,38,38,10,21,21,30,21,21,21,21,21,21,21,38,21,30,38,30, 21,1,21,21,21,30,30,30,10,30,21,11,30,30,30,30,11,30,1,30, 21,30,21,30,30,30,30,30,1,21,1,38,38,38,30,11,30,21,30,30, 30,21,21,1,21,10,38,30,30,21,21,38,30,10,30,38,38,38,21,38, 1,1,1,38,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30, 30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,1,21,1, 21,30,21,1,1,38,21,38,38,38,38,21,38,38,21,38,38,38,21,1, 38,38,38,38,30,11,10,11,21,1,1,1,11,11,11,21,1,1,1,1, 11,1,1,1,11,21,12,1,1,1,1,1,38,11,1,1,1,1,1,21, 1,1,1,12,11,11,11,30,30,11,11,11,11,30,21,21,21,11,30,11, 12,11,12,21,30,30,11,12,12,12,1,1,1, }; static unsigned short stb__arial_bold_10_latin1_a[224]={ 40,48,68,80,80,127,103,34, 48,48,56,84,40,48,40,40,80,80,80,80,80,80,80,80, 80,80,48,48,84,84,84,87,140,103,103,103,103,96,87,111, 103,40,80,103,87,119,103,111,96,111,103,96,87,103,96,135, 96,96,87,48,40,48,84,80,48,80,87,80,87,80,48,87, 87,40,40,80,40,127,87,87,87,87,56,80,48,87,80,111, 80,80,72,56,40,56,84,107,107,107,107,107,107,107,107,107, 107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107, 107,107,107,107,107,107,107,107,40,48,80,80,80,80,40,80, 48,106,53,80,84,48,106,79,57,79,48,48,48,83,80,40, 48,48,52,80,119,119,119,87,103,103,103,103,103,103,143,103, 96,96,96,96,40,40,40,40,103,103,111,111,111,111,111,84, 111,103,103,103,103,96,96,87,80,80,80,80,80,80,127,80, 80,80,80,80,40,40,40,40,87,87,87,87,87,87,87,79, 87,87,87,87,87,80,87,80, }; // Call this function with // font: NULL or array length // data: NULL or specified size // height: STB_FONT_arial_bold_10_latin1_BITMAP_HEIGHT or STB_FONT_arial_bold_10_latin1_BITMAP_HEIGHT_POW2 // return value: spacing between lines static void stb_font_arial_bold_10_latin1(stb_fontchar font[STB_FONT_arial_bold_10_latin1_NUM_CHARS], unsigned char data[STB_FONT_arial_bold_10_latin1_BITMAP_HEIGHT][STB_FONT_arial_bold_10_latin1_BITMAP_WIDTH], int height) { int i,j; if (data != 0) { unsigned int *bits = stb__arial_bold_10_latin1_pixels; unsigned int bitpack = *bits++, numbits = 32; for (i=0; i < STB_FONT_arial_bold_10_latin1_BITMAP_WIDTH*height; ++i) data[0][i] = 0; // zero entire bitmap for (j=1; j < STB_FONT_arial_bold_10_latin1_BITMAP_HEIGHT-1; ++j) { for (i=1; i < STB_FONT_arial_bold_10_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_10_latin1_BITMAP_WIDTH; float recip_height = 1.0f / height; for (i=0; i < STB_FONT_arial_bold_10_latin1_NUM_CHARS; ++i) { // pad characters so they bilerp from empty space around each character font[i].s0 = (stb__arial_bold_10_latin1_s[i]) * recip_width; font[i].t0 = (stb__arial_bold_10_latin1_t[i]) * recip_height; font[i].s1 = (stb__arial_bold_10_latin1_s[i] + stb__arial_bold_10_latin1_w[i]) * recip_width; font[i].t1 = (stb__arial_bold_10_latin1_t[i] + stb__arial_bold_10_latin1_h[i]) * recip_height; font[i].x0 = stb__arial_bold_10_latin1_x[i]; font[i].y0 = stb__arial_bold_10_latin1_y[i]; font[i].x1 = stb__arial_bold_10_latin1_x[i] + stb__arial_bold_10_latin1_w[i]; font[i].y1 = stb__arial_bold_10_latin1_y[i] + stb__arial_bold_10_latin1_h[i]; font[i].advance_int = (stb__arial_bold_10_latin1_a[i]+8)>>4; font[i].s0f = (stb__arial_bold_10_latin1_s[i] - 0.5f) * recip_width; font[i].t0f = (stb__arial_bold_10_latin1_t[i] - 0.5f) * recip_height; font[i].s1f = (stb__arial_bold_10_latin1_s[i] + stb__arial_bold_10_latin1_w[i] + 0.5f) * recip_width; font[i].t1f = (stb__arial_bold_10_latin1_t[i] + stb__arial_bold_10_latin1_h[i] + 0.5f) * recip_height; font[i].x0f = stb__arial_bold_10_latin1_x[i] - 0.5f; font[i].y0f = stb__arial_bold_10_latin1_y[i] - 0.5f; font[i].x1f = stb__arial_bold_10_latin1_x[i] + stb__arial_bold_10_latin1_w[i] + 0.5f; font[i].y1f = stb__arial_bold_10_latin1_y[i] + stb__arial_bold_10_latin1_h[i] + 0.5f; font[i].advance = stb__arial_bold_10_latin1_a[i]/16.0f; } } } #ifndef STB_SOMEFONT_CREATE #define STB_SOMEFONT_CREATE stb_font_arial_bold_10_latin1 #define STB_SOMEFONT_BITMAP_WIDTH STB_FONT_arial_bold_10_latin1_BITMAP_WIDTH #define STB_SOMEFONT_BITMAP_HEIGHT STB_FONT_arial_bold_10_latin1_BITMAP_HEIGHT #define STB_SOMEFONT_BITMAP_HEIGHT_POW2 STB_FONT_arial_bold_10_latin1_BITMAP_HEIGHT_POW2 #define STB_SOMEFONT_FIRST_CHAR STB_FONT_arial_bold_10_latin1_FIRST_CHAR #define STB_SOMEFONT_NUM_CHARS STB_FONT_arial_bold_10_latin1_NUM_CHARS #define STB_SOMEFONT_LINE_SPACING STB_FONT_arial_bold_10_latin1_LINE_SPACING #endif