mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 08:46:08 +03:00
font: shaper test should decode unicode codepoints
This commit is contained in:
@ -119,7 +119,15 @@ pub const Wasm = struct {
|
||||
// Create a terminal and print all our characters into it.
|
||||
var term = try terminal.Terminal.init(alloc, self.cell_buf.len, 80);
|
||||
defer term.deinit(alloc);
|
||||
for (str) |c| try term.print(c);
|
||||
|
||||
// Iterate over unicode codepoints and add to terminal
|
||||
{
|
||||
const view = try std.unicode.Utf8View.init(str);
|
||||
var iter = view.iterator();
|
||||
while (iter.nextCodepoint()) |c| {
|
||||
try term.print(c);
|
||||
}
|
||||
}
|
||||
|
||||
// Iterate over the rows and print out all the runs we get.
|
||||
var rowIter = term.screen.rowIterator(.viewport);
|
||||
|
Reference in New Issue
Block a user