Cartoon demo requires reopen font several times

parent e41528a2
......@@ -87,15 +87,21 @@ void init( void )
font->rendermode = RENDER_OUTLINE_POSITIVE;
font->outline_thickness = 7;
add_text( buffer, font, "Freetype GL", pen, black, black );
texture_font_close( font, MODE_ALWAYS_OPEN, MODE_FREE_CLOSE );
font = texture_font_new_from_file( atlas, 128, "fonts/LuckiestGuy.ttf" );
font->rendermode = RENDER_OUTLINE_POSITIVE;
font->outline_thickness = 5;
add_text( buffer, font, "Freetype GL", pen, yellow, yellow );
texture_font_close( font, MODE_ALWAYS_OPEN, MODE_FREE_CLOSE );
font = texture_font_new_from_file( atlas, 128, "fonts/LuckiestGuy.ttf" );
font->rendermode = RENDER_OUTLINE_EDGE;
font->outline_thickness = 3;
add_text( buffer, font, "Freetype GL", pen, black, black );
texture_font_close( font, MODE_ALWAYS_OPEN, MODE_FREE_CLOSE );
font = texture_font_new_from_file( atlas, 128, "fonts/LuckiestGuy.ttf" );
font->rendermode = RENDER_NORMAL;
font->outline_thickness = 0;
add_text( buffer, font, "Freetype GL", pen, orange1, orange2 );
......
......@@ -815,8 +815,8 @@ cleanup_stroker:
glyph->advance_x = slot->advance.x * self->scale;
glyph->advance_y = slot->advance.y * self->scale;
} else {
glyph->advance_x = slot->advance.x / HRESf;
glyph->advance_y = slot->advance.y / HRESf;
glyph->advance_x = slot->advance.x * self->scale / HRESf;
glyph->advance_y = slot->advance.y * self->scale / HRESf;
}
texture_font_index_glyph(self, glyph, ucodepoint);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment