text: // 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_11_usascii_*,
  // and separately install each font. Note that the CREATE function call has a
  // totally different name; it's just 'stb_font_arial_bold_11_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_arial_bold_11_usascii_BITMAP_WIDTH         128
  #define STB_FONT_arial_bold_11_usascii_BITMAP_HEIGHT         50
  #define STB_FONT_arial_bold_11_usascii_BITMAP_HEIGHT_POW2    64
  
  #define STB_FONT_arial_bold_11_usascii_FIRST_CHAR            32
  #define STB_FONT_arial_bold_11_usascii_NUM_CHARS             95
  
  #define STB_FONT_arial_bold_11_usascii_LINE_SPACING           7
  
  static unsigned int stb__arial_bold_11_usascii_pixels[]={
      0x0881008c,0x00020020,0x02026098,0x00018400,0x200800a0,0x5a820000,
      0xf53441fb,0x50953d49,0xfe89dddb,0x5761ff34,0x3bfa60f9,0x6cc9b00b,
      0x506fec78,0x30ffec0f,0x260b21dd,0x2eea85ee,0x2e8ba4a8,0x1444c9a2,
      0x846d41f1,0x79a6c4c8,0x3e25cbd4,0x9b04ea9d,0x4c3af722,0x05ea4d8e,
      0xbb8af3aa,0x1b9068bc,0x84b9f81f,0x23d8f12c,0x8f513268,0xbb71d13d,
      0xf34d8f3f,0x7d45f5f0,0xda6c1ae0,0x74c1efef,0x997f7ea1,0x4eed40ef,
      0x89df302c,0x21d02af9,0x6886e46a,0x647a85d1,0x5eab7754,0x43cd361c,
      0x263dc7ec,0x23a4d80f,0x2a1ec82d,0x3ee2f89f,0xab45542f,0x84cffe40,
      0x3444dcfb,0xd13f98d7,0xb71ea1f6,0x5b54b672,0xf9879a6c,0x4d70fcc4,
      0x3bf69b08,0x2a6b81ef,0x0d790fa7,0xfa9b2eb2,0x2f51fec8,0x8d525479,
      0x1745a25c,0x2ae991ea,0xd8979d3d,0x03f30f34,0x649d53bd,0xf5d73f9d,
      0x9723aa13,0xd71f8afa,0x36d10d5b,0xf31f51e9,0x1ae7e21f,0x8f63c459,
      0x8f513668,0xbbd3b32d,0x1e69b03d,0x3f2609f7,0x37fa60be,0xfb0b5970,
      0x27efd43d,0x4b207bf6,0x6ffe46db,0xd0bbee4d,0x45d12d81,0x7b837268,
      0xd503723c,0x0079a6c1,0x11110000,0x20480000,0x20000040,0x41db5981,
      0x7d53e668,0x3b6a0ea4,0x53fa0cee,0x00000ff9,0x00000000,0x00000000,
      0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
      0x00000000,0x00000000,0x21002000,0x00080608,0x40000800,0x88200000,
      0x00442011,0x40cfc800,0x7e4c1efc,0x7efec0be,0xdf9303a2,0xf00dfb87,
      0x306ffec5,0xe88be21f,0x41e60dff,0xfa9ff479,0x777ec5fe,0x49ffff72,
      0x3aa7ea6c,0x323e63e8,0x2754ef45,0x645f31f3,0x97d46f42,0xf843d9f8,
      0x49d13f32,0x225f10f9,0x265e99de,0x3e628817,0x4be27ea2,0x312f98f9,
      0xa7c45f93,0x8972b94e,0x83e63dbf,0x22f9ae6b,0x2083e24a,0x6fecb76a,
      0x815bf12f,0x265f10f9,0xd9f3021f,0xffe9e61d,0x5d361f51,0x07f30be6,
      0x5fccdbf5,0x70ff6c7e,0x3f31f98f,0xf73445f7,0xf37bb5c0,0x7ecc5f31,
      0x7c43e62f,0x33774f72,0x9e63f13f,0x22bea1f8,0x5f51f31f,0x5fb02fc4,
      0x5ae5cb98,0x2223e66b,0x3efae0fa,0x21f98742,0x5d6ed50b,0xc894cbe6,
      0x8fc43e67,0x4cf951f9,0xf13ccbe7,0x227efd43,0x1ba2fdfc,0xd8d98f70,
      0xd1b23ea3,0x64cbff5b,0xd1641f88,0x3e23f73b,0xf53f33d8,0x9f62be65,
      0x20fb9cf8,0x267d99ee,0xf13ccbe7,0x2f803d43,0x701335f9,0xd819fd0f,
      0x7fe4c1ef,0x17ff61ee,0x3efc992a,0xbf906fdc,0x0fff645d,0xb10fffee,
      0xf3cc5dff,0x21f89e65,0x3a5f007a,0x7b86ffff,0x05c00000,0x00000200,
      0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
      0x00000000,0x00000000,0x00000000,0x005c0000,0xd91fa800,0x9a7cd3a1,
      0x2f897a0f,0x3fff60f5,0x7fccf36f,0x987d44ff,0x3e22ffff,0x997c7f32,
      0xf70ff67f,0x3ee1f307,0xff907ea2,0x45f07cc9,0x5b22f9ed,0xfb8d76fc,
      0x18bd4f70,0x4c277662,0x3ea6be67,0x57cc3ea2,0x4cbe27d9,0x3e65f0ff,
      0xfe87ff1f,0x3fa8f986,0x11f33ff4,0x2f83e65d,0x2f517fe2,0x444d8fce,
      0x47d49b2f,0x3cc5d85e,0x43f311f3,0x2e1f30fa,0x4ef98fc7,0x26f7e65f,
      0x3ebe63ee,0x427dfcc1,0x25f100f9,0x42f99af9,0x7d7c42fd,0xdd82fae9,
      0x177ea1f8,0xf99e62ec,0x87d43fff,0x7c4ffef9,0x5f3f3f30,0x3b2f6fe6,
      0x26275723,0x0f986fff,0x3fe64f88,0x3bea2fff,0xfd97ee86,0xa8f7f503,
      0x98bb06ff,0x0bee3e67,0x2afe61f5,0x32f30e80,0xdf3f32fe,0x7f7fc7d5,
      0x3e6fe60f,0x2dc07cc3,0xf12f83e6,0x4fc87f19,0x27fc0ff5,0x360fa3ea,
      0x21f33cc5,0x4c3ea0fc,0xbcc3200f,0x3ef32ff8,0x55f53e8f,0xc87cc7f5,
      0x503fe20f,0x4be0f985,0x543f70fc,0x640bf12f,0x0fabd41f,0xf99e62ec,
      0x87d4bd10,0x4c7e00f9,0xdbccbea7,0xd91767d7,0x05f887cc,0x20f98b90,
      0x0000002f,0x00000000,0x00000000,0x00000000,0x00000000,0x80001800,
      0x03e66ffd,0x00010104,0x10040002,0x08ffff70,0xfff317c4,0x3fffe69f,
      0x0bfffe67,0x98fc3df9,0x6c84ffff,0x0f98aafe,0x7447e798,0x43d502fe,
      0x076e4ffc,0x3f20f76c,0x176aa23f,0xf317f43f,0x2be61335,0x267e6199,
      0xd91f50fc,0xf535f30c,0x7c5bf623,0x203e60bc,0x57547e79,0x8fbae209,
      0x911f88fa,0x5ab545df,0x220e63e6,0xfdb84c0e,0x9866be62,0x3e6099af,
      0x0d908fe0,0x89ee6be6,0xbb7d36bb,0xf3cc07cc,0xf71ffe43,0x21ecd707,
      0xddf91fd8,0x0f6035cd,0x262f8f98,0xdf30ffff,0xd07cc7dd,0x42a2fa89,
      0xb85ffff9,0x1f30f986,0x23f31f30,0x7dc4d73a,0x3e67ea3e,0x547df911,
      0x547cc536,0x45407c46,0xf30dfced,0x2601f301,0x3f98fe0f,0xf10f98fc,
      0x71d36b87,0x04cd7ccd,0x3a23fbfd,0x43d502ef,0x0b6e3efc,0x3f21775c,
      0x9f834c2e,0xf30dfccb,0x3335f301,0x87dccfcc,0x43219cf8,0x43f99af9,
      0x9877f66b,0x0005ffff,0x00000000,0x5f002dc0,0x7fcc07cc,0x3ffe67ff,
      0x9ffff22e,0x17fffe61,0x000001ae,0x00000000,0x00000000,0x00000000,
      0x00000000,0x00000000,0x40880000,0x08844220,0x88820882,0x01042088,
      0x44222021,0x00880888,0x82101079,0x10866028,0x42882233,0x442eeeee,
      0x7cf63fee,0x7cd367d4,0x64bb1f50,0xf9d53fff,0x67ccbfdb,0x2bdf30ee,
      0x741ffffc,0x305ec445,0x3e7ea137,0xfcb5cf30,0x2ff92eff,0x2001e669,
      0x36e5c8a8,0xf30f8ef8,0x01ffb172,0x2a3ea1d9,0x27e6799f,0x213f31f8,
      0x75408888,0x3ffff20f,0x3ea3bd51,0x36b960f9,0x20888aa2,0x6c400008,
      0x32fe26ee,0x0fd746bf,0x83ee17e6,0x99e6f37a,0x323cc7e7,0x2ba1ffff,
      0x82f6224c,0x11ca25c9,0x00001441,0x1b2d7000,0xb87f95fd,0x21fde86f,
      0x2f509bfa,0xf3ccf379,0x33311e63,0xd849a443,0x00000003,0x3a600000,
      0x547dc7de,0x2e1fc41f,0x3ffa1d96,0x4de6f55f,0xf31f9e67,0x00000000,
      0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,
      0x00000000,0x00000000,0x00000000,0x00000000,
  };
  
  static signed short stb__arial_bold_11_usascii_x[95]={ 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, };
  static signed short stb__arial_bold_11_usascii_y[95]={ 8,0,0,0,0,0,0,0,0,0,0,2,6,4,
  6,0,0,0,0,0,0,1,0,1,0,0,2,2,1,2,1,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,9,0,2,0,2,0,2,0,2,0,0,
  0,0,0,2,2,2,2,2,2,2,1,2,2,2,2,2,2,0,0,0,3, };
  static unsigned short stb__arial_bold_11_usascii_w[95]={ 0,3,5,6,6,9,7,2,3,3,4,6,3,3,
  3,4,5,4,5,6,6,6,6,6,6,6,3,3,6,6,6,6,10,8,7,7,7,7,6,8,7,3,5,8,
  6,8,7,8,7,8,8,7,6,7,8,10,7,8,6,4,4,3,6,7,3,6,6,6,6,6,4,6,6,3,
  4,6,3,9,6,6,6,6,4,6,4,6,6,8,6,6,5,4,2,4,6, };
  static unsigned short stb__arial_bold_11_usascii_h[95]={ 0,8,4,9,9,9,9,4,11,11,5,5,4,3,
  2,9,9,8,8,9,8,8,9,7,9,9,6,8,7,5,7,8,11,8,8,9,8,8,8,9,8,8,9,8,
  7,8,8,9,8,9,8,9,8,9,8,8,8,8,8,10,9,10,5,1,3,7,9,7,9,7,8,9,8,8,
  11,8,8,6,6,7,8,8,6,7,8,7,6,6,6,9,6,11,11,11,3, };
  static unsigned short stb__arial_bold_11_usascii_s[95]={ 127,68,85,69,90,97,107,95,1,23,80,
  73,91,105,113,122,44,49,31,76,1,54,115,117,8,1,124,37,82,59,96,
  112,27,89,41,36,23,15,8,73,119,56,63,98,61,80,72,54,60,15,47,
  57,36,65,20,9,1,119,112,42,31,38,66,117,109,1,83,110,50,103,93,
  24,82,89,18,29,43,37,47,89,98,105,54,75,107,68,17,8,24,47,31,
  13,10,5,98, };
  static unsigned short stb__arial_bold_11_usascii_t[95]={ 1,23,41,1,1,1,1,41,1,1,41,
  41,41,41,41,1,13,32,32,1,32,32,1,32,13,13,32,32,32,41,32,
  23,1,23,32,13,32,32,32,13,23,23,1,23,32,23,23,1,23,13,23,
  13,23,13,23,23,23,13,13,1,13,1,41,41,41,41,1,32,13,32,13,
  13,13,13,1,23,23,41,41,32,13,13,41,32,23,32,41,41,41,1,41,
  1,1,1,41, };
  static unsigned short stb__arial_bold_11_usascii_a[95]={ 44,52,75,88,88,140,114,37,
  52,52,61,92,44,52,44,44,88,88,88,88,88,88,88,88,
  88,88,52,52,92,92,92,96,154,114,114,114,114,105,96,123,
  114,44,88,114,96,131,114,123,105,123,114,105,96,114,105,149,
  105,105,96,52,44,52,92,88,52,88,96,88,96,88,52,96,
  96,44,44,88,44,140,96,96,96,96,61,88,52,96,88,123,
  88,88,79,61,44,61,92, };
  
  // Call this function with
  //    font: NULL or array length
  //    data: NULL or specified size
  //    height: STB_FONT_arial_bold_11_usascii_BITMAP_HEIGHT or STB_FONT_arial_bold_11_usascii_BITMAP_HEIGHT_POW2
  //    return value: spacing between lines
  static void stb_font_arial_bold_11_usascii(stb_fontchar font[STB_FONT_arial_bold_11_usascii_NUM_CHARS],
                  unsigned char data[STB_FONT_arial_bold_11_usascii_BITMAP_HEIGHT][STB_FONT_arial_bold_11_usascii_BITMAP_WIDTH],
                  int height)
  {
      int i,j;
      if (data != 0) {
          unsigned int *bits = stb__arial_bold_11_usascii_pixels;
          unsigned int bitpack = *bits++, numbits = 32;
          for (i=0; i < STB_FONT_arial_bold_11_usascii_BITMAP_WIDTH*height; ++i)
              data[0][i] = 0;  // zero entire bitmap
          for (j=1; j < STB_FONT_arial_bold_11_usascii_BITMAP_HEIGHT-1; ++j) {
              for (i=1; i < STB_FONT_arial_bold_11_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_arial_bold_11_usascii_BITMAP_WIDTH;
          float recip_height = 1.0f / height;
          for (i=0; i < STB_FONT_arial_bold_11_usascii_NUM_CHARS; ++i) {
              // pad characters so they bilerp from empty space around each character
              font[i].s0 = (stb__arial_bold_11_usascii_s[i]) * recip_width;
              font[i].t0 = (stb__arial_bold_11_usascii_t[i]) * recip_height;
              font[i].s1 = (stb__arial_bold_11_usascii_s[i] + stb__arial_bold_11_usascii_w[i]) * recip_width;
              font[i].t1 = (stb__arial_bold_11_usascii_t[i] + stb__arial_bold_11_usascii_h[i]) * recip_height;
              font[i].x0 = stb__arial_bold_11_usascii_x[i];
              font[i].y0 = stb__arial_bold_11_usascii_y[i];
              font[i].x1 = stb__arial_bold_11_usascii_x[i] + stb__arial_bold_11_usascii_w[i];
              font[i].y1 = stb__arial_bold_11_usascii_y[i] + stb__arial_bold_11_usascii_h[i];
              font[i].advance_int = (stb__arial_bold_11_usascii_a[i]+8)>>4;
              font[i].s0f = (stb__arial_bold_11_usascii_s[i] - 0.5f) * recip_width;
              font[i].t0f = (stb__arial_bold_11_usascii_t[i] - 0.5f) * recip_height;
              font[i].s1f = (stb__arial_bold_11_usascii_s[i] + stb__arial_bold_11_usascii_w[i] + 0.5f) * recip_width;
              font[i].t1f = (stb__arial_bold_11_usascii_t[i] + stb__arial_bold_11_usascii_h[i] + 0.5f) * recip_height;
              font[i].x0f = stb__arial_bold_11_usascii_x[i] - 0.5f;
              font[i].y0f = stb__arial_bold_11_usascii_y[i] - 0.5f;
              font[i].x1f = stb__arial_bold_11_usascii_x[i] + stb__arial_bold_11_usascii_w[i] + 0.5f;
              font[i].y1f = stb__arial_bold_11_usascii_y[i] + stb__arial_bold_11_usascii_h[i] + 0.5f;
              font[i].advance = stb__arial_bold_11_usascii_a[i]/16.0f;
          }
      }
  }
  
  #ifndef STB_SOMEFONT_CREATE
  #define STB_SOMEFONT_CREATE              stb_font_arial_bold_11_usascii
  #define STB_SOMEFONT_BITMAP_WIDTH        STB_FONT_arial_bold_11_usascii_BITMAP_WIDTH
  #define STB_SOMEFONT_BITMAP_HEIGHT       STB_FONT_arial_bold_11_usascii_BITMAP_HEIGHT
  #define STB_SOMEFONT_BITMAP_HEIGHT_POW2  STB_FONT_arial_bold_11_usascii_BITMAP_HEIGHT_POW2
  #define STB_SOMEFONT_FIRST_CHAR          STB_FONT_arial_bold_11_usascii_FIRST_CHAR
  #define STB_SOMEFONT_NUM_CHARS           STB_FONT_arial_bold_11_usascii_NUM_CHARS
  #define STB_SOMEFONT_LINE_SPACING        STB_FONT_arial_bold_11_usascii_LINE_SPACING
  #endif
  
  