revert on comment removal

This commit is contained in:
Gordon Cassie
2024-04-25 19:27:51 -07:00
committed by Mitchell Hashimoto
parent e564454ff1
commit e77f9962a8
2 changed files with 17 additions and 0 deletions

View File

@ -424,6 +424,18 @@ pub const Face = struct {
var advances: [glyphs.len]macos.graphics.Size = undefined; var advances: [glyphs.len]macos.graphics.Size = undefined;
_ = self.font.getAdvancesForGlyphs(.horizontal, &glyphs, &advances); _ = self.font.getAdvancesForGlyphs(.horizontal, &glyphs, &advances);
// std.log.warn("renderGlyph rect={} width={} height={} render_x={} render_y={} offset_y={} ascent={} cell_height={} cell_baseline={}", .{
// rect,
// width,
// height,
// render_x,
// render_y,
// offset_y,
// glyph_ascent,
// self.metrics.cell_height,
// self.metrics.cell_baseline,
// });
return .{ return .{
.width = width, .width = width,
.height = height, .height = height,
@ -525,6 +537,9 @@ pub const Face = struct {
.strikethrough_thickness = @intFromFloat(strikethrough_thickness), .strikethrough_thickness = @intFromFloat(strikethrough_thickness),
}; };
// std.log.warn("font size size={d}", .{ct_font.getSize()});
// std.log.warn("font metrics={}", .{result});
return result; return result;
} }
}; };

View File

@ -379,6 +379,7 @@ pub const Shaper = struct {
pub fn prepare(self: *RunIteratorHook) !void { pub fn prepare(self: *RunIteratorHook) !void {
try self.shaper.run_state.reset(); try self.shaper.run_state.reset();
// log.warn("----------- run reset -------------", .{});
} }
pub fn addCodepoint(self: RunIteratorHook, cp: u32, cluster: u32) !void { pub fn addCodepoint(self: RunIteratorHook, cp: u32, cluster: u32) !void {
@ -397,6 +398,7 @@ pub const Shaper = struct {
.codepoint = cp, .codepoint = cp,
.cluster = cluster, .cluster = cluster,
}); });
// log.warn("run cp={X}", .{cp});
// If the UTF-16 codepoint is a pair then we need to insert // If the UTF-16 codepoint is a pair then we need to insert
// a dummy entry so that the CTRunGetStringIndices() function // a dummy entry so that the CTRunGetStringIndices() function