aboutsummaryrefslogtreecommitdiff
path: root/drw.c
diff options
context:
space:
mode:
authorNathan Reiner <nathan@nathanreiner.xyz>2023-04-30 09:35:29 +0200
committerNathan Reiner <nathan@nathanreiner.xyz>2023-04-30 09:35:29 +0200
commitbefac6668eab41849b0e638b20c2636e82328fb4 (patch)
treee1ddc08c1a0095a5948a7ee9dcc4efc1899ce629 /drw.c
parent93044651200982abc936d727c0447b911dfe36b8 (diff)
add mouse support
Diffstat (limited to 'drw.c')
-rw-r--r--drw.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drw.c b/drw.c
index 3800de5..a131623 100644
--- a/drw.c
+++ b/drw.c
@@ -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)