From e77f9962a82947957e280e50e065ba5f45b8519f Mon Sep 17 00:00:00 2001 From: Gordon Cassie Date: Thu, 25 Apr 2024 19:27:51 -0700 Subject: [PATCH] revert on comment removal --- src/font/face/coretext.zig | 15 +++++++++++++++ src/font/shaper/coretext.zig | 2 ++ 2 files changed, 17 insertions(+) diff --git a/src/font/face/coretext.zig b/src/font/face/coretext.zig index affe7878f..3178a8132 100644 --- a/src/font/face/coretext.zig +++ b/src/font/face/coretext.zig @@ -424,6 +424,18 @@ pub const Face = struct { var advances: [glyphs.len]macos.graphics.Size = undefined; _ = 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 .{ .width = width, .height = height, @@ -525,6 +537,9 @@ pub const Face = struct { .strikethrough_thickness = @intFromFloat(strikethrough_thickness), }; + // std.log.warn("font size size={d}", .{ct_font.getSize()}); + // std.log.warn("font metrics={}", .{result}); + return result; } }; diff --git a/src/font/shaper/coretext.zig b/src/font/shaper/coretext.zig index 1e599475b..c83d07533 100644 --- a/src/font/shaper/coretext.zig +++ b/src/font/shaper/coretext.zig @@ -379,6 +379,7 @@ pub const Shaper = struct { pub fn prepare(self: *RunIteratorHook) !void { try self.shaper.run_state.reset(); + // log.warn("----------- run reset -------------", .{}); } pub fn addCodepoint(self: RunIteratorHook, cp: u32, cluster: u32) !void { @@ -397,6 +398,7 @@ pub const Shaper = struct { .codepoint = cp, .cluster = cluster, }); + // log.warn("run cp={X}", .{cp}); // If the UTF-16 codepoint is a pair then we need to insert // a dummy entry so that the CTRunGetStringIndices() function