Skip to content
Snippets Groups Projects
Commit 613f9c2b authored by rxi's avatar rxi
Browse files

Changed renderer to make tab and newline glyphs invisible

Fixes #16
parent 33ad329f
No related branches found
No related tags found
No related merge requests found
......@@ -173,6 +173,11 @@ RenFont* ren_load_font(const char *filename, float size) {
float scale = stbtt_ScaleForMappingEmToPixels(&font->stbfont, size);
font->height = (ascent - descent + linegap) * scale + 0.5;
/* make tab and newline glyphs invisible */
stbtt_bakedchar *g = get_glyphset(font, '\n')->glyphs;
g['\t'].x1 = g['\t'].x0;
g['\n'].x1 = g['\n'].x0;
return font;
fail:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment