mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-10-04 08:56:32 +00:00
font/shaper: split ligature around cell style change
This commit is contained in:
@@ -218,6 +218,16 @@ pub const Cell = struct {
|
||||
/// also be true. The grapheme code points can be looked up in the
|
||||
/// screen grapheme map.
|
||||
grapheme: bool = false,
|
||||
|
||||
/// Returns only the attributes related to style.
|
||||
pub fn styleAttrs(self: @This()) @This() {
|
||||
var copy = self;
|
||||
copy.wide = false;
|
||||
copy.wide_spacer_tail = false;
|
||||
copy.wide_spacer_head = false;
|
||||
copy.grapheme = false;
|
||||
return copy;
|
||||
}
|
||||
} = .{},
|
||||
|
||||
/// True if the cell should be skipped for drawing
|
||||
@@ -2666,6 +2676,7 @@ pub fn testWriteString(self: *Screen, text: []const u8) !void {
|
||||
switch (width) {
|
||||
1 => {
|
||||
const cell = row.getCellPtr(x);
|
||||
cell.* = self.cursor.pen;
|
||||
cell.char = @intCast(c);
|
||||
|
||||
grapheme.x = x;
|
||||
@@ -2691,6 +2702,7 @@ pub fn testWriteString(self: *Screen, text: []const u8) !void {
|
||||
|
||||
{
|
||||
const cell = row.getCellPtr(x);
|
||||
cell.* = self.cursor.pen;
|
||||
cell.char = @intCast(c);
|
||||
cell.attrs.wide = true;
|
||||
|
||||
|
Reference in New Issue
Block a user