diff options
Diffstat (limited to 'drw.c')
| -rw-r--r-- | drw.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -413,7 +413,7 @@ load_bitmap(Font *font, uint_least32_t charcode) } FT_Get_Glyph(slot, &glyph); - FT_Glyph_StrokeBorder(&glyph, font->stroke, 0, 1); + error = FT_Glyph_StrokeBorder(&glyph, font->stroke, 0, 1); if (error) { fprintf(stderr, "warning: could not apply stroke\n"); return cglyph; @@ -441,17 +441,19 @@ draw_char(Canvas *canvas, FontCache *fontcache, uint_least32_t charcode, unsigne { Font *font; CacheGlyph cg; + unsigned stroke_size; font = get_font_with_charcode(fontcache, charcode); FT_Set_Pixel_Sizes(font->face, 0, fontcache->fontsize); if (boldstokemode && fontcache->fonttype == FONT_BOLD) { - FT_Stroker_Set(font->stroke, fontcache->fontsize * 2, FT_STROKER_LINECAP_BUTT, FT_STROKER_LINEJOIN_ROUND, fontcache->fontsize * 2); - y -= fontcache->fontsize * 2 / 64 + 1; + stroke_size = fontcache->fontsize * 2; } else { - FT_Stroker_Set(font->stroke, 0, FT_STROKER_LINECAP_BUTT, FT_STROKER_LINEJOIN_ROUND, 0); + stroke_size = 0; } + FT_Stroker_Set(font->stroke, stroke_size, FT_STROKER_LINECAP_BUTT, FT_STROKER_LINEJOIN_ROUND, 0); + cg = load_bitmap(font, charcode); if (cg.bg == 0) |