Read kerning table (untested cause there ain't one)
This commit is contained in:
@@ -605,11 +605,13 @@ pub fn printLine(self: *Gui, comptime fmt: []const u8, fmt_args: anytype, print_
|
||||
|
||||
var cursor_offset_em = glyph_data.bottom_left_em;
|
||||
cursor_offset_em.y = -cursor_offset_em.y;
|
||||
cursor_offset_em.x += glyph_data.left_side_bearing_em;
|
||||
if (maybe_prev_glyph == null) {
|
||||
cursor_offset_em.x += glyph_data.left_side_bearing_em;
|
||||
}
|
||||
|
||||
if (maybe_prev_glyph) |prev_glyph| {
|
||||
const kerning_em = font.kerning_em.get(.{ prev_glyph, glyph_id }) orelse 0;
|
||||
cursor_offset_em.x += kerning_em;
|
||||
cursor_sspx.x += kerning_em;
|
||||
}
|
||||
|
||||
if (glyph_data.gpu_glyph_id) |gpu_glyph_id| {
|
||||
|
||||
Reference in New Issue
Block a user