diff --git a/src/gui/Font.cc b/src/gui/Font.cc index 01b81eb..4c46019 100644 --- a/src/gui/Font.cc +++ b/src/gui/Font.cc @@ -29,17 +29,20 @@ namespace jes FT_Set_Pixel_Sizes(m_face, 0, size); - GlyphRef x_glyph = load_glyph('x'); - if (x_glyph == NULL) + GlyphRef glyph = load_glyph('g'); + if (glyph == NULL) { - std::cerr << "Could not load 'x' glyph from font" << fname << std::endl; + std::cerr << "Could not load 'g' glyph from font" << fname << std::endl; return false; } - m_glyphs['x'] = x_glyph; + m_glyphs['g'] = glyph; - m_advance = x_glyph->get_advance(); + m_advance = glyph->get_advance(); m_line_height = round_up_26_6(m_face->size->metrics.height); +#if 0 m_baseline_offset = round_up_26_6((m_face->size->metrics.height - (m_face->size->metrics.ascender - m_face->size->metrics.descender)) / 2 - m_face->size->metrics.descender); +#endif + m_baseline_offset = 1 - m_face->glyph->bitmap_top + m_face->glyph->bitmap.rows; m_loaded = true; return true;