title: Freetype with C++ not loading all glyphs correctly
body: <p>I'm using FreeType to load the glyph textures, basically using FT_Load_Char to get the texture, then creating an instance of my custom class Character that contains all the metrics and texture for rendering later:</p>
  <pre><code>  for (unsigned int c = min; c &lt; max; c++)
    {
      if (FT_Get_Char_Index(faces[faceIndex].second, c) == 0)
        continue;
      if (FT_Load_Char(faces[faceIndex].second, c, FT_LOAD_RENDER))
      {
        cout &lt;&lt; &quot;Error: Failed to load Glyph: &quot; &lt;&lt; c &lt;&lt; endl;
        continue;
      }
      FT_GlyphSlot glyph = faces[faceIndex].second-&gt;glyph;
      GLuint texture;
      glGenTextures(1, &amp;texture);
      glBindTexture(GL_TEXTURE_2D, texture);
      glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
      glTexImage2D(GL_TEXTURE_2D, 0, GL_RED, glyph-&gt;bitmap.width, glyph-&gt;bitmap.rows, 0, GL_RED, GL_UNSIGNED_BYTE, glyph-&gt;bitmap.buffer);
      glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
      glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
      glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
      glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
  
      Character character;
      character.texture = texture;
      character.bearingX = glyph-&gt;bitmap_left;
      character.bearingY = glyph-&gt;bitmap_top;
      character.width = glyph-&gt;bitmap.width;
      character.height = glyph-&gt;bitmap.rows;
      character.advance = glyph-&gt;advance.x;
  
      characters[faceIndex][c] = character;
      count++;
    }
  </code></pre>
  <p>This works correctly for a vast majority of characters, but typing something like <code>asd-=_+123</code> will produce the following:</p>
  <p><a href="https://i.stack.imgur.com/0N1mt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0N1mt.png" alt="enter image description here" /></a></p>
  <p>So it's not loading some glyphs correctly like <code>+=-</code>, I am using NotoMono-Regular so it obviously has these basic glyphs</p>
  <p>Further debugging by printing out the glyph bitmap buffer gives the following for &quot;bad&quot; characters:
  <code>bitmap buffer of - gives: α                              α                              α                              α                              α                              α                               α                              α                              α                              α </code></p>
  <p>While for &quot;good&quot; characters it's something like: <code>bitmap buffer of 1 gives: 94</code></p>
  <p>So I think the problem is here, but not sure how to fix it</p>