mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-05-23 05:10:17 +00:00
use unicode.graphemeBreak in src/font/shaper/web_canvas.zig
This commit is contained in:
@@ -3,7 +3,7 @@ const assert = std.debug.assert;
|
||||
const Allocator = std.mem.Allocator;
|
||||
const font = @import("../main.zig");
|
||||
const terminal = @import("../../terminal/main.zig");
|
||||
const uucode = @import("uucode");
|
||||
const unicode = @import("../../unicode/main.zig");
|
||||
|
||||
const log = std.log.scoped(.font_shaper);
|
||||
|
||||
@@ -111,7 +111,7 @@ pub const Shaper = struct {
|
||||
// font ligatures. However, we do support grapheme clustering.
|
||||
// This means we can render things like skin tone emoji but
|
||||
// we can't render things like single glyph "=>".
|
||||
var break_state: uucode.GraphemeBreakState = .default;
|
||||
var break_state: unicode.GraphemeBreakState = .{};
|
||||
var cp1: u21 = @intCast(codepoints[0]);
|
||||
|
||||
var start: usize = 0;
|
||||
@@ -126,7 +126,7 @@ pub const Shaper = struct {
|
||||
const cp2: u21 = @intCast(codepoints[i]);
|
||||
defer cp1 = cp2;
|
||||
|
||||
break :blk uucode.graphemeBreak(
|
||||
break :blk unicode.graphemeBreak(
|
||||
cp1,
|
||||
cp2,
|
||||
&break_state,
|
||||
|
||||
Reference in New Issue
Block a user