Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
436 lines (421 sloc) 25.4 KB
// 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_stbfont_*,
// and separately install each font. Note that the CREATE function call has a
// totally different name; it's just 'stb_font_stbfont'.
//
/* // 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_stbfont_BITMAP_WIDTH 256
#define STB_FONT_stbfont_BITMAP_HEIGHT 86
#define STB_FONT_stbfont_BITMAP_HEIGHT_POW2 128
#define STB_FONT_stbfont_FIRST_CHAR 32
#define STB_FONT_stbfont_NUM_CHARS 95
#define STB_FONT_stbfont_LINE_SPACING 16
static unsigned int stb__stbfont_pixels[]={
0x40262011,0x44066009,0x44000000,0x10000019,0x004c0003,0x00013100,
0x00018831,0x400c0000,0x00440018,0x00000c40,0x00000000,0x7fdc0fcc,
0xfe885f83,0xfb81f987,0x80bfff92,0xdfffffda,0x3ffee01b,0x003db106,
0x3bfff6e2,0xffd9001b,0x320039df,0xc9807e47,0x2fb82dff,0x0fbfea00,
0xfb5005e8,0x3e4003bf,0x0bdfec88,0x0b3ffaa0,0x07dffb50,0x1723fc80,
0xbf03fb26,0x9b07bfb0,0x6e54bee0,0xdffd305f,0xbffd9559,0x879bf701,
0x2effffe9,0x337ffe20,0x2602fffd,0xffdcdffe,0x6c5e802f,0xfbbff706,
0x002fb87f,0x20fee77e,0xef9800fa,0x3a007fcb,0xfcefe985,0xbdff906f,
0x3fea05ff,0x2004ffdd,0x407e23fc,0x7c2fc3fb,0x2201f307,0x542fcc09,
0x32200bff,0x41fdc0ff,0xfbdbcff8,0x109fd107,0xff103ff7,0x05ff501b,
0x213e27c4,0x3fe20ff8,0x4c00bee0,0x13a1fa2f,0x5f90fe40,0xfb07f100,
0x7d43fc87,0x207f622f,0x03fa21fd,0x1b61fe40,0x117e1fcc,0x0017a0bf,
0x1df317e6,0x2e37e400,0xb54fc83f,0x0ffa0fee,0xfd81ff70,0x80ffd404,
0x20fe22f9,0x23fc83fb,0x1f9002fb,0x01f707e4,0x3fb83fe0,0x7cc0fa80,
0x7ec6f885,0x7cc6f984,0x9003fb85,0x982fa87f,0x3e22fc3f,0x2a02fa85,
0x3a2fcc1c,0x99ee540e,0x7dc5f72c,0x2b51fd83,0x037cc2c8,0x3fe63fd8,
0x2e4fc800,0xdccdfdcc,0x02a20cdf,0x9afb8ff2,0x0fc82dec,0x4009f1f6,
0x01fd14fd,0x03fb0db0,0xff80ffc0,0x3ea17ea0,0x887f9005,0x7c4f986f,
0x7f42fc45,0xf30bee00,0xfd10fdcb,0x47f79fdf,0x360fee4f,0xfb80b52f,
0x5cbf5003,0x4df3004f,0xfffffffd,0x8800ffff,0x3f7ee1ff,0x2e0dffef,
0x0fb93a2f,0x3affe200,0xd09f004f,0xf806a21f,0xff0bfa07,0x9002fe81,
0xf30fd07f,0x27cc5f89,0x0bee02fc,0x36374bf3,0x87ffea3f,0x2e0fee6d,
0x6c05a8df,0x4ff3002f,0xff1003fc,0x00dd17a0,0xf70ffb2a,0x93fa63bf,
0x12fcaef8,0xff70009f,0x0be6005f,0x3fff63fe,0x882fe82f,0x6ff4c2ff,
0x32003ffc,0x440fd83f,0x3e62fc5f,0x2e02fc43,0x9f2fcc2f,0x3fec27e4,
0x41fdc3ee,0x405dffe8,0x3fe001fe,0x74005fb0,0x3e27c41f,0x1bfff004,
0xff887fb8,0xb8bbf260,0x7f4c000f,0x0f7000ef,0x3af7fbfe,0x42fe41ff,
0xffb83ffb,0x7e4005ff,0xfd82fc83,0x81fb17e1,0x17dc04fa,0xf17cd7e6,
0xa8df501f,0x2207f71f,0x80dffffc,0x3fe001ff,0x74005fd1,0xf317cc1f,
0x3f6aa007,0x6c17ee2f,0x27c4081f,0x3ee039b7,0x26a5feaf,0xff885e80,
0x2237dc0f,0xefdabeff,0x2bbf622f,0x9001efd9,0x207f707f,0x3e6bf5fd,
0x403fb82f,0xbafcc2fb,0x2a0bf30f,0xfb87e44f,0xffffc803,0x88017ec1,
0x800ff27f,0x507dc0ff,0xdf50003f,0x3fc81fdc,0xbf70fc80,0x1ef989fb,
0x1ff19ff1,0x9ff03f88,0xe983ff10,0x2fcaffff,0x1bea13ee,0x7d41fe40,
0x57edf504,0x05f905fa,0xafcc2fb8,0x5c0fee6d,0x7f73f42f,0xdfb1b500,
0xf3003fb8,0x88027d4d,0x3ffff66f,0x0fffffff,0x7dc3fe00,0x8807f702,
0x1fc97a3f,0xbff30bf2,0x203f509f,0x05fb01ff,0x3f615751,0x7f407fa1,
0xc83fc800,0xf1cfb82f,0x503bea2b,0x42fb809f,0x7dcf95f9,0x7cc3fd03,
0x2a00fee4,0x6f987fe5,0x224fd830,0x4fc800ff,0x3333bf2e,0x260cccef,
0x7dcbf602,0xc805f903,0x7d49f10f,0x3ee03fe2,0x207c81ff,0x03fb01fe,
0x81fe3f40,0xb07932fc,0xd01fb05f,0x17dc5f8d,0x5f7017e2,0x23f75f98,
0x27fa85fa,0x0fee0ff8,0x3f65a972,0x3e21ff42,0x6c0ffa9d,0x0ffcc04f,
0x409f0fe2,0x0ff882fe,0x03fa0bf7,0x8be63f88,0x40ff63f9,0x04e80ffe,
0x1fe20ff2,0x8bf303d7,0x23ff01fe,0x81fe86f9,0x7c5f887e,0x37c27cc5,
0xbf30bee0,0x0ffc4fe6,0x3fa6dff5,0x7f41fdc2,0x20ffcb51,0x7f5c4fe8,
0x1bfb02ff,0xf305ff50,0xf7017cc5,0x7dcdf90d,0x202fdc1f,0xb93e20fc,
0x907be60f,0x7cc1dfff,0x707fe202,0x445f88bf,0x42fe40fe,0x87fe26fa,
0x30bf07f9,0x7c45f89f,0x7dc07e85,0x4bf2fcc2,0xfcfedffa,0xfb82ffef,
0x2b55fc83,0xffd106fa,0x5fffdb9b,0x337ffa20,0xf702ffed,0x3a00fd41,
0x0fffbbef,0x3af3fbee,0x0fe200ff,0x7436c3ba,0xaefecdff,0x01f70ffe,
0xfebcffb8,0xbbdfd80e,0x7dfd02fe,0xfc83ffd7,0x983ffddf,0x7c4f984f,
0x7e42fc45,0xf30bee01,0xfb50fecb,0x833bf23b,0xd107f709,0x3ffbdbdf,
0x7ffedc40,0x81efeabd,0xcefffda8,0x0f91f601,0xbffff910,0xffc9fb81,
0x83ec00df,0x902fffe9,0x221bffff,0x4c01b65d,0x100dfffe,0x805bffd7,
0x01effffc,0x207dfff9,0x43f980fc,0xf885f85f,0xf30bee04,0x0007744b,
0x3fb97f44,0xdffffb10,0xf5018003,0x20011003,0x20004408,0x000c0019,
0x002a8059,0x01104011,0x04001880,0x3000c400,0xa827c401,0x2fc2fc3f,
0x5f900fc8,0x77cc5f98,0x8ffe6002,0x0ec803fb,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x101f9000,0xe85f85fb,0x444f881f,
0xf5311fe8,0x59dfd30b,0x7fee5443,0x004e7dc2,0x000000b5,0x00000000,
0x00000000,0x00000000,0x00000000,0x3e200000,0xf86ffb83,0xb87ffb85,
0xc9bffa0f,0x3aa05fff,0xffffffff,0xfffb80cf,0x00006206,0x00000000,
0x00000000,0x00000000,0x00000000,0x40000000,0x0179505a,0x4172a09b,
0x982f322d,0xa9801aaa,0x401abccb,0x0002aaa9,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x4c018800,
0x00310000,0x00000000,0x00198000,0x98ca8cc4,0x5cc02cec,0x050973dd,
0x6dcc0000,0x0000792d,0x00000000,0x00000000,0xffd88000,0x06d84eff,
0x3fffb2e0,0x00df304e,0xfd7305fb,0xdf10005b,0xffffb710,0x7ff44019,
0xfdff9f76,0x3ffea0bf,0x3a27edff,0xb803fb85,0x7f7fd43f,0x3ff26fcf,
0xffffffff,0x1003bf26,0x02fec5ff,0x27e43bea,0x7d40ffd0,0x32009fb5,
0x3fa5f93f,0xd9bfff31,0x07dc1bff,0x6677fec0,0x7cc1effd,0x442fd806,
0x03ffdeff,0x3a237c40,0xfffdceff,0x279dfb01,0xfb30dffb,0x712ef987,
0x42fc4fff,0x3fb803fb,0x7dc4bbe6,0x3bbbae6f,0x46ffeeee,0x2fec04fe,
0x7c40bfe2,0x4417ea1f,0x7f901fff,0x7fc01bea,0x47fa5f90,0x4fe883fe,
0xbfb00be6,0x98dfb101,0x42fd806f,0x07faa2fe,0x3a26f880,0x7fe440cf,
0x7dc0ff80,0x7ec7f886,0x3e27fb83,0x8803fb85,0x320bf609,0x3fe6006f,
0xa80ffcc2,0x0ffa80ff,0x3fc43fe8,0xd04fdfa8,0x200ff41f,0x74bf25fa,
0x2a06f89f,0xf9027c7f,0x4c5fd00b,0x22fd806f,0x04fa84fa,0x5fe9be20,
0x37c27f40,0x1fc81fdc,0x5fe203fe,0x2e3cffca,0x0fd0003f,0x7c401be2,
0x10df903f,0x37ec05ff,0x0ff417f2,0x4437cfe4,0x2027dc6f,0x74bf22fd,
0x6406f99f,0xff81b20c,0x262ea800,0x22fd806f,0x20ff02fc,0x6f8addb9,
0xd9801ff1,0x333ff2e3,0x3ee05f70,0xbfc0df12,0x2e5ffffc,0x0bddc8bf,
0x037c472a,0xbfd100df,0x7ec4fe80,0xa9ff4404,0x07f700ef,0xf503f6df,
0x2207f889,0xfe97e47f,0xa8007ff1,0x006f981f,0x3601be60,0x7403f62f,
0x7fffd40f,0x0bf56fdf,0x3ffff600,0x2e03f70f,0x7c0bf33f,0x3ee17e27,
0x0effeffd,0x81be27f7,0x0efd806f,0xfa8ffcc0,0xf5ff3006,0x22fcc03f,
0xc85f74f9,0x702fd82f,0xfd2fc89f,0x2f7ffea3,0x5c1fc401,0x3e60004f,
0x3a2fd806,0x4c3fb00f,0xdff912ef,0xf0000ff2,0x3205f70d,0x7c0df11f,
0x3ee17e27,0x29fb30cf,0xf81fe3fb,0x007fdc06,0x03fd6fc8,0x01fffdc0,
0x4cbee3fc,0x5407f45f,0xc83fd05f,0x74c3fd2f,0x00cfffff,0x207f90bd,
0x21999998,0x2fd806f9,0x21fd81fe,0xb6fc82fd,0x6f80005f,0x1fd04fb8,
0x3fd40ff4,0x0df70bf1,0xe8feebf5,0x206f981f,0x74002ffa,0xe8004fef,
0x41fb006f,0xdf13fc7d,0x3e607fc0,0x3fd2fc86,0xffffb710,0x7fb0f703,
0x3fffff60,0x3601be67,0xfc81fe2f,0xb7c41fa2,0x7c0002fd,0x5c1ffb86,
0x50f7d45f,0x42fc4ffd,0x76f884fb,0x106fd47f,0x3fe20dfd,0x6ff98003,
0x2fffa800,0x17e2fb80,0x80fea3f9,0x417e42fc,0x003fd2fc,0xf981ffd3,
0xec82fdc1,0x3e67feee,0x3e2fd806,0x7c47f607,0x27e5be06,0x2e1be000,
0x6febdfff,0xdfddff90,0x5c2fc4ff,0x3eeff03f,0x7e67fec3,0x0bfd06ff,
0x0017ec00,0x03ff3fe2,0x0fea9f30,0x807f27f5,0xc83fc5f9,0x0333fd2f,
0x89f07fb0,0x1fe006f9,0x41fd00ff,0x44fd00fe,0x7d5be06f,0xdf037005,
0xfff97f70,0x77ed401b,0x17e26f8b,0xbbfc0fee,0xefffb83f,0x06fd86f9,
0x0017ec00,0x037ed3f6,0x441fcb7c,0xfd00fd5f,0x7e413ea1,0x03fb3fd2,
0x86d85fa8,0x8ff000ff,0x23fc00fe,0xf8ff01fd,0x3e2df107,0x07fdc00f,
0x18fee1be,0x89be2000,0xf03fb85f,0x0980feef,0x0ffb8df1,0x017ec000,
0x7fc4df70,0x3f47ec03,0x700bf6e8,0x6407f67f,0x9f73fd2f,0xfb83fc80,
0x2007fe40,0x01fec7f8,0x84fb8df5,0x40fec5f9,0x817f66fa,0x86f84ff8,
0x3b6003fb,0x37c4fb80,0x77f81fdc,0x9be2007f,0x80001ff9,0xff3002fd,
0x201ff983,0xf904fafa,0xdf1007f5,0xd2fc81be,0x20bff13f,0x2f880ffb,
0xb881ffc8,0x17fd47ff,0x7fc1ff4c,0xf707f621,0x137f441b,0xfd9819fd,
0xfb86f80f,0x477f2003,0x7fc1ffa8,0x7c0fee4e,0x22007f77,0x005ff16f,
0x200bf600,0xdf903ff8,0x0bfbe201,0x8007f7cc,0x3203fbfd,0x3e63fd2f,
0xfffddeff,0x7e417a02,0xfffedeff,0xdfffb80c,0xf704ffed,0x209ff9bf,
0xfefccffc,0x677ffcc6,0xdf01fffe,0xd8007f70,0x81ffffff,0x0fee7ffa,
0x003fbbfc,0x3bff2df1,0xeeeeeeee,0x017ec00e,0x3fa02fec,0x803ffa05,
0x3e6006ff,0x4bf200ff,0x3fb621fe,0x6401dfff,0x3ffb2a07,0x6dc01def,
0x403dffff,0x403efffa,0x6f8effec,0xfffffc98,0x261be00c,0xca88000a,
0x2e0400ab,0x3eeff03f,0x7e4aa003,0xffffffff,0x7ec00fff,0x007fdc02,
0x7e40bfe6,0x0027ec06,0x5f9017fa,0x009807fa,0x4c400620,0x00110000,
0x08800110,0x0004c400,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x2ca80000,0x98000f20,0x00000009,0x00000000,0x00000000,0x07f70000,
0x3ffffee0,0x1fffffff,0xfffffff3,0xff3039df,0x5bffffff,0x3fe65ff0,
0xfa97ec01,0x7ff8807f,0x3ea00bf5,0x9877ec05,0x209f506f,0x7fe442fa,
0x36a01eff,0x7c40ceff,0xffffffff,0xfffff34f,0x25ffffff,0xfffffff9,
0x7ec000ce,0x7ffffd41,0x22003def,0x3fb804ff,0xddddd500,0x1dddddff,
0x3bbbbfe6,0x4c2fffee,0xffeeeeff,0x997fc5ff,0x97ec06ff,0x5402fffa,
0x00bf57ff,0xefd817ea,0x7ec0ff40,0x742ff981,0x1ffebcff,0xffdeffd8,
0x3bbfe20f,0x33eeeeee,0xddddddff,0x3fe63ddd,0xffffeeee,0x83ff7003,
0xffeeeffa,0xff7005ff,0x007f700f,0x26037cc0,0x1ff2206f,0x7fd40df3,
0x7fccbfe2,0x54bf604f,0x7ec05fff,0x200bf57f,0x1dfb05fa,0x6f889f70,
0x2e2fffa8,0x547fb86f,0x12fe40ef,0x37cc00ff,0x441be600,0x7cc01ffd,
0x82fd41ff,0xfe803fe9,0x1fdc02fb,0x80df3000,0x2ff806f9,0xbf901be6,
0xfef997fc,0x2a5fb01f,0x3e207edf,0x00bf57fc,0x3bf617ea,0xfb8ff100,
0x3fbff623,0x3e20ff62,0x220ff61f,0x00ff10ff,0x260037cc,0x037e406f,
0xf507fbba,0x202fd40b,0x406f8df9,0x0e6443fb,0xf301be60,0x4c7fb00d,
0xf37d406f,0x3ef7e63f,0x3ea5fb06,0x5f702fcd,0x4017eaff,0x077ec5fa,
0x0fe87f60,0x8bf237f2,0x43fb00ba,0x21fd00db,0x3e6007f8,0x037cc006,
0x9fc817f4,0x02fd41fd,0x2fc80df3,0x1fdc03fd,0xf3007fd1,0x806f980d,
0x01be60ff,0x98ffcdf9,0xfb09fd5f,0x17e77ea5,0xfabfc76c,0x6cbf5005,
0x4fa800ef,0x322a8bf3,0x0ff1002f,0xff13fcc0,0x0037cc00,0x3ee01be6,
0x3fb4f984,0x3ee05fa8,0xfb87fc03,0x744fee04,0x0df3003f,0xd3106f98,
0x406f98bf,0x4c3fa4ff,0xd83ff35f,0x1fabf52f,0x55fe2fe2,0x2bf5005f,
0x3e000ffd,0xfc805f77,0x02fe8802,0xff893f20,0x09999999,0x26667be6,
0x3e609999,0x445fa806,0xf507f66e,0xf955333d,0x12fd401b,0x2fee01ff,
0x26003fe8,0x7ffcc06f,0xefffffff,0x55577cc0,0x20fffcaa,0x5cbf30fe,
0xfa97ec6f,0x9fb85f95,0x00bf57f8,0x3fff77ea,0x3abf2004,0x402fc807,
0x2a003fe8,0x3ffe20ff,0x23ffffff,0xfffffff9,0x1be65fff,0x3fb1be60,
0x3fea0fec,0x0fffffff,0x3f617ec0,0x7fd7f703,0x406f9800,0xffeeeff9,
0xfff302cf,0x1bffffff,0xd17e67d8,0xfa97ec9f,0x16e8bf35,0x4017eaff,
0xff9dfffa,0x9fbf3002,0xe805f900,0x3fea004f,0x7777fc41,0x3e62eeee,
0xcccccccf,0x201be63c,0xb0fea6f9,0xccefa83f,0x02ffedcc,0x0df50ff1,
0x017fffee,0xf980df30,0x301ffb86,0x355555df,0x5f99f201,0x2fd8ffcc,
0xf13f4bf5,0x2fd5fe27,0x2e5ffa80,0xffd000ff,0x405f9003,0x3f2004fb,
0x007f881f,0xf3001be6,0x22bf700d,0x541fd86f,0x03fea05f,0x33333bee,
0xffb81ffc,0x26002fea,0x837cc06f,0x6f980ffb,0x3e66c800,0x5fb6fb85,
0x72fb97ea,0x7d5fe21f,0xb0df5005,0x1bee00bf,0xfb017e40,0x07bf2003,
0xf3003fc4,0x06f9800d,0x9bf94fc8,0x39bfd999,0x7fb017ea,0xffffffd0,
0x7f709fff,0x4c003fe6,0x037cc06f,0x6f981dfb,0x3e66b800,0x5fb9fd05,
0xd5f997ea,0x5fabfc4d,0xf10bf500,0x07f5007f,0xfe80bf20,0x00efd800,
0xf9801fe2,0x037cc006,0xfffd97f4,0x2fffffff,0x4fb80bf5,0x4cccf7cc,
0x5c0ffa99,0x4017f23f,0x37cc06f9,0xf989ff10,0x5f980006,0x25fdff30,
0x7cff45fa,0x2fd5fe23,0xf505fa80,0x00fe803f,0x00005f90,0xff100bfb,
0x0037cc00,0xdf701be6,0x4cccccc4,0xbf509afe,0x7e43fd80,0x2e1ff403,
0x4017f43f,0x37cc06f9,0xf987fea0,0x26198006,0x3fff205f,0xefb8bf52,
0x7d5fe20f,0x40bf5005,0x64cc0ffc,0x0bf2004f,0x37d40198,0x2007f880,
0x7cc006f9,0x05ff9306,0xbf507f60,0xf03ff220,0x46fa801f,0x07fcc3fb,
0xf301be60,0x4cdfb00d,0x1ff8006f,0xffe80bf3,0xff98bf52,0xffabfc45,
0x3eeeeeee,0x7f440bf5,0x0077fec5,0x7fc05f90,0x3bbbfe01,0xf11eeeee,
0x77fcc00f,0xeeeeeeee,0xfdddff34,0x4005ffff,0x77fd41fd,0x2ffffeee,
0x7c402fd4,0x320fee1f,0x037cc05f,0x3e201be6,0x000df33f,0x017e63ff,
0x17ea5ff3,0x2ff10bfa,0xfffffffa,0x80bf54ff,0x2f2a3ff9,0x017e4000,
0x3fe603ff,0xffffffff,0x4c00ff11,0xffffffff,0xfff35fff,0x019ddfff,
0x7d41fd80,0xceffffff,0x9002fd81,0x000000bf,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x77774c00,
0x00004eee,0x7776c332,0x52eeeeee,0x88791039,0x4403cedb,0x4c02cedb,
0x200cdedc,0x402cedc8,0x5c0bddb8,0xc80cc80c,0x97019913,0x6dc46543,
0x2a32a0cd,0x013101cd,0x84000002,0x731950cc,0x5f64c5bb,0x66666440,
0x3951cccc,0x4198f220,0xfffffffa,0x3601be65,0x7fc7fe2f,0xffffffff,
0xdf105f92,0x7ff7ffcc,0xefffa80e,0xdff904ff,0xf703fffd,0x20bffdff,
0x3ffefff9,0x5ff30bf2,0x13f64f98,0xfbfb8df5,0xf70effff,0x2a07fff7,
0x005bb03f,0x7fdb6a00,0xffff7f71,0xfffff37f,0x7ffffc45,0xbf32ffff,
0x0ff8fee0,0x3e600bf2,0x322fd806,0x26fa800c,0x26f882fc,0x0ff622fd,
0x3aa17ff1,0x1077d43f,0xbff989fb,0xf889fd50,0x21ff30bf,0x27fdc4f9,
0x2ff88bee,0xffb83ff1,0x2e9fd11c,0x500a9cff,0x3fff207f,0x75c4000b,
0x2e1994ff,0xfff50cff,0x4017ea17,0x407f44fc,0xd83fe0fe,0x06f9800f,
0x88002fd8,0x20bf21ff,0x221fa6f8,0x4427e42c,0x20bb20ff,0x417ec6f9,
0x0ff20ff8,0x6c7f8fee,0x543f46ee,0xb83fe8ef,0xf76f986f,0x80fea00d,
0x01cfffc8,0x067ffe4c,0xdfd0df70,0xbf700fd0,0x5f987f70,0x401be0f8,
0x2fd806f9,0x643fd800,0x366f882f,0x7f400aef,0x1003fb01,0x207f8df5,
0x003f62fc,0xf99f0fec,0x7e417e21,0x09f705fe,0x013eedf1,0xea801fd4,
0x7f542eff,0x9f7002ef,0x3fb09f90,0x44077d40,0x2617e46f,0x5e4d7e26,
0xd806f981,0x2fd4002f,0x37c417e4,0x17bfffd1,0xfffffff0,0xb7505fff,
0x7c4dfffd,0x7f8fee06,0x7ccfea00,0x05f52faa,0xfb8077f4,0x0feedf03,
0x77f77764,0x64c04eee,0x39ffb6ff,0xc83fb800,0x301fd82f,0x07ec01ff,
0x7d43d0ff,0x44fffffe,0x2fd806f9,0x640ffc00,0x446f882f,0x22ffffda,
0xeeeeeff8,0x3fa22eee,0x26fabdff,0x4fee06f9,0x3e2007f8,0x29f11f95,
0xffd100fd,0x7c0fee01,0x3f605f76,0xffffffff,0xb7f5c406,0x4000befd,
0x82fc83fb,0x1ff981fd,0x4f99fd40,0x99bffb80,0x3fe63ffd,0xaaaaaaaa,
0x3ea002fe,0xf307f905,0x47fda80d,0x3f6000ff,0xf137cc0d,0xff17e40f,
0x6ebec0c0,0xf902fdfa,0x0fee0dfb,0x002fbb7c,0x326007f5,0xf710cfff,
0x2e0039ff,0xd82fc83f,0x017f441f,0x01fcb7c4,0xffa82c98,0xffffff30,
0x05ffffff,0xfb817ec0,0x9916fa83,0x3fe87fa0,0x1fe21990,0x07fa37d4,
0x03fd07f4,0xfafb8bf3,0x40feff24,0x707fb6fa,0x7ddbe07f,0x807f5002,
0x402effda,0x402effea,0x82fc83fb,0x027f41fd,0x30df3f90,0x97fc0013,
0xaaaaaff9,0x262feaaa,0x540ff101,0xb37f446f,0x547f883f,0x237d40ef,
0x37f440ff,0xdf7037ee,0x7ec0dfa8,0x517f7c41,0xff101fff,0xf707fe23,
0x17ddbe07,0xf703fa80,0x98003bff,0x4333fffd,0x82fc83fb,0x013f61fd,
0xf07fdf30,0x9fe4003f,0x2fd806f9,0x0ff207fe,0xbd97dff0,0x5effccdf,
0xffd84fec,0x5c1ffdbd,0xfefcabef,0xfbcffe87,0xcffd80ef,0xffd05feb,
0xd837fc41,0x2e37d43f,0x3eedf03f,0x207f5002,0x40000cfd,0x23ff6fb8,
0x82fc83fb,0x99ff71fd,0x20599999,0x1ff80ffe,0x31fd80a6,0x45fb00df,
0x00ff81ff,0xea7fff44,0x77fffdc6,0x3fffee03,0xffeb881c,0xf703fb3f,
0x5c01bfff,0x900bdfff,0x707fd0df,0xb93f60df,0x3eedf03f,0x20151002,
0x23000001,0x907f71ff,0x323fb05f,0xffffffff,0x00bf705f,0x37c417f4,
0x5fb00df3,0x037c40f8,0x4c400310,0x80022000,0x00880008,0x00000440,
0x00000000,0x00000000,0x00000000,0xc8000000,0x264fc86f,0x22fd806f,
0x005f986a,0x00000000,0x00000000,0x22031000,0x99999999,0x00018809,
0x2ea01110,0x3a61302c,0xff34eeee,0xffffffff,0x000009ff,0x40000000,
0xeffbcffe,0x3601be60,0x3ee07a2f,0x00000004,0x00000000,0xfd000000,
0xfffffb05,0xf50dffff,0x4ffc3fe0,0x21bee6f9,0x9cfffffd,0xfff30fb9,
0x2eee2bff,0xbbbbbbbb,0x0000001b,0x22000000,0x40dffffc,0x2fd806f9,
0x0002fc80,0x00000000,0x00000000,0xb86ffa80,0xcccccccc,0x4dea2e3c,
0x4ffc3fe1,0x217ec6f9,0xfffecbdf,0x26660fff,0x00000099,0x00000000,
0x20198000,0x2fd806f9,0x00000000,0x00000000,0x40000000,0x0001fcfd,
0x7f7f7fc4,0x4ffc3fe5,0x1c5e86f9,0x0067764c,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x98000000,0x0005f8cf,0x41cfea88,
0x3e23f67e,0x00000005,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0xf9000000,0xaa983f63,0x2aaaaaaa,0x3607e7dc,0x004f9f26,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x266f8800,0x3ffff64f,0x226fffff,0x23a8dd3f,0x0000723a,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x4fd0bee0,
0xaaaaaaa9,0x0130c2aa,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x20000000,0x003fb87f,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x881a8800,
0x0000001a,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,
};
static signed short stb__stbfont_x[95]={ 0,1,1,0,0,1,0,0,1,1,0,1,1,0,
2,0,0,2,0,0,0,0,0,1,0,0,2,1,1,1,1,0,1,-1,1,1,1,1,1,1,1,2,0,1,
1,1,1,1,1,0,1,1,0,1,0,0,0,0,0,1,0,0,0,-1,0,0,1,0,0,0,0,0,1,1,
-2,1,1,1,1,0,1,0,1,0,0,1,0,0,0,0,0,0,2,0,0, };
static signed short stb__stbfont_y[95]={ 20,3,3,3,2,3,3,3,3,3,3,6,17,13,
17,3,3,3,3,3,3,4,3,4,3,3,8,8,6,8,6,3,3,3,3,3,3,3,3,3,3,3,3,3,
3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,23,3,8,3,8,3,8,3,8,3,3,
3,3,3,8,8,8,8,8,8,8,4,8,8,8,8,8,8,3,3,3,10, };
static unsigned short stb__stbfont_w[95]={ 0,4,6,13,12,18,15,4,6,6,8,11,4,7,
3,7,12,7,12,12,12,12,12,11,12,12,3,4,11,11,11,12,21,16,13,15,14,13,12,16,14,3,10,14,
11,16,14,16,13,17,15,13,14,14,15,21,15,15,14,5,7,5,10,14,6,12,11,11,11,12,7,11,10,3,
6,11,3,17,10,12,11,11,7,11,7,10,11,16,12,11,11,7,2,7,13, };
static unsigned short stb__stbfont_h[95]={ 0,17,7,18,21,18,18,7,22,22,8,12,7,3,
3,18,18,17,17,18,17,17,18,16,18,18,12,16,12,8,12,17,22,17,17,18,17,17,17,18,17,17,18,17,
17,17,17,18,17,19,17,18,17,18,17,17,17,17,17,22,18,22,10,2,4,13,18,13,18,13,17,17,17,17,
22,17,17,12,12,13,17,17,12,13,17,13,12,12,12,17,12,22,22,22,4, };
static unsigned short stb__stbfont_s[95]={ 255,58,157,123,75,162,181,152,27,1,143,
169,251,185,251,197,55,134,155,137,210,1,205,34,231,218,205,29,193,131,181,
142,47,237,223,80,195,181,168,23,14,252,244,107,95,78,63,106,44,88,28,
1,13,40,232,210,194,178,163,69,15,41,120,193,164,82,150,108,68,69,96,
116,136,147,34,1,248,209,150,95,104,151,161,57,128,46,239,120,137,122,227,
19,16,8,171, };
static unsigned short stb__stbfont_t[95]={ 1,43,74,1,1,1,1,74,1,1,74,
61,61,74,69,1,24,43,43,1,43,61,1,61,1,1,61,61,61,74,61,
43,1,43,43,24,43,43,43,24,61,24,1,43,43,43,43,1,43,1,43,
24,43,24,24,24,24,24,24,1,24,1,74,74,74,61,1,61,24,61,24,
24,24,24,1,43,24,61,61,61,24,24,61,61,24,61,61,61,61,43,61,
1,1,1,74, };
static unsigned short stb__stbfont_a[95]={ 99,99,127,199,199,318,239,68,
119,119,139,209,99,119,99,99,199,199,199,199,199,199,199,199,
199,199,99,99,209,209,209,199,363,239,239,259,259,239,219,278,
259,99,179,239,199,298,259,278,239,278,259,239,219,259,239,338,
239,239,219,99,99,99,168,199,119,199,199,179,199,199,99,199,
199,80,80,179,80,298,199,199,199,199,119,179,99,199,179,259,
179,179,179,120,93,120,209, };
// Call this function with
// font: NULL or array length
// data: NULL or specified size
// height: STB_FONT_stbfont_BITMAP_HEIGHT or STB_FONT_stbfont_BITMAP_HEIGHT_POW2
// return value: spacing between lines
static void stb_font_stbfont(stb_fontchar font[STB_FONT_stbfont_NUM_CHARS],
unsigned char data[STB_FONT_stbfont_BITMAP_HEIGHT][STB_FONT_stbfont_BITMAP_WIDTH],
int height)
{
int i,j;
if (data != 0) {
unsigned int *bits = stb__stbfont_pixels;
unsigned int bitpack = *bits++, numbits = 32;
for (i=0; i < STB_FONT_stbfont_BITMAP_WIDTH*height; ++i)
data[0][i] = 0; // zero entire bitmap
for (j=1; j < STB_FONT_stbfont_BITMAP_HEIGHT-1; ++j) {
for (i=1; i < STB_FONT_stbfont_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_stbfont_BITMAP_WIDTH;
float recip_height = 1.0f / height;
for (i=0; i < STB_FONT_stbfont_NUM_CHARS; ++i) {
// pad characters so they bilerp from empty space around each character
font[i].s0 = (stb__stbfont_s[i]) * recip_width;
font[i].t0 = (stb__stbfont_t[i]) * recip_height;
font[i].s1 = (stb__stbfont_s[i] + stb__stbfont_w[i]) * recip_width;
font[i].t1 = (stb__stbfont_t[i] + stb__stbfont_h[i]) * recip_height;
font[i].x0 = stb__stbfont_x[i];
font[i].y0 = stb__stbfont_y[i];
font[i].x1 = stb__stbfont_x[i] + stb__stbfont_w[i];
font[i].y1 = stb__stbfont_y[i] + stb__stbfont_h[i];
font[i].advance_int = (stb__stbfont_a[i]+8)>>4;
font[i].s0f = (stb__stbfont_s[i] - 0.5f) * recip_width;
font[i].t0f = (stb__stbfont_t[i] - 0.5f) * recip_height;
font[i].s1f = (stb__stbfont_s[i] + stb__stbfont_w[i] + 0.5f) * recip_width;
font[i].t1f = (stb__stbfont_t[i] + stb__stbfont_h[i] + 0.5f) * recip_height;
font[i].x0f = stb__stbfont_x[i] - 0.5f;
font[i].y0f = stb__stbfont_y[i] - 0.5f;
font[i].x1f = stb__stbfont_x[i] + stb__stbfont_w[i] + 0.5f;
font[i].y1f = stb__stbfont_y[i] + stb__stbfont_h[i] + 0.5f;
font[i].advance = stb__stbfont_a[i]/16.0f;
}
}
}
#ifndef STB_SOMEFONT_CREATE
#define STB_SOMEFONT_CREATE stb_font_stbfont
#define STB_SOMEFONT_BITMAP_WIDTH STB_FONT_stbfont_BITMAP_WIDTH
#define STB_SOMEFONT_BITMAP_HEIGHT STB_FONT_stbfont_BITMAP_HEIGHT
#define STB_SOMEFONT_BITMAP_HEIGHT_POW2 STB_FONT_stbfont_BITMAP_HEIGHT_POW2
#define STB_SOMEFONT_FIRST_CHAR STB_FONT_stbfont_FIRST_CHAR
#define STB_SOMEFONT_NUM_CHARS STB_FONT_stbfont_NUM_CHARS
#define STB_SOMEFONT_LINE_SPACING STB_FONT_stbfont_LINE_SPACING
#endif