mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 08:46:08 +03:00
coretext: don't emit 0 codepoints for special fonts
This commit is contained in:
@ -361,6 +361,12 @@ pub const Shaper = struct {
|
||||
self.cell_buf.clearRetainingCapacity();
|
||||
try self.cell_buf.ensureTotalCapacity(self.alloc, state.codepoints.items.len);
|
||||
for (state.codepoints.items) |entry| {
|
||||
// We use null codepoints to pad out our list so indices match
|
||||
// the UTF-16 string we constructed for CoreText. We don't want
|
||||
// to emit these if this is a special font, since they're not
|
||||
// part of the original run.
|
||||
if (entry.codepoint == 0) continue;
|
||||
|
||||
self.cell_buf.appendAssumeCapacity(.{
|
||||
.x = @intCast(entry.cluster),
|
||||
.glyph_index = @intCast(entry.codepoint),
|
||||
|
Reference in New Issue
Block a user