font: add constraint width to glyph cache key

This commit is contained in:
Qwerasd
2025-07-04 13:44:58 -06:00
parent 1a8a048136
commit f292132762

View File

@ -287,7 +287,6 @@ pub fn renderGlyph(
}; };
} }
// Render into the atlas // Render into the atlas
const glyph = self.resolver.renderGlyph( const glyph = self.resolver.renderGlyph(
alloc, alloc,
@ -348,7 +347,8 @@ const GlyphKey = struct {
cell_width: u2, cell_width: u2,
thicken: bool, thicken: bool,
thicken_strength: u8, thicken_strength: u8,
_padding: u5 = 0, constraint_width: u2,
_padding: u3 = 0,
}, },
inline fn from(key: GlyphKey) Packed { inline fn from(key: GlyphKey) Packed {
@ -359,6 +359,7 @@ const GlyphKey = struct {
.cell_width = key.opts.cell_width orelse 0, .cell_width = key.opts.cell_width orelse 0,
.thicken = key.opts.thicken, .thicken = key.opts.thicken,
.thicken_strength = key.opts.thicken_strength, .thicken_strength = key.opts.thicken_strength,
.constraint_width = key.opts.constraint_width,
}, },
}; };
} }