mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-09-23 05:53:52 +00:00
unicode: isolate properties, tables, and ziglyph into separate files
This makes it cleaner to add new sources of table generation and also avoids inadvertently depending on different modules (despite Zig's lazy analysis). This also fixes up terminal to only use our look up tables which avoids bringing ziglyph in for the terminal module.
This commit is contained in:
18
src/unicode/props_table.zig
Normal file
18
src/unicode/props_table.zig
Normal file
@@ -0,0 +1,18 @@
|
||||
const Properties = @import("Properties.zig");
|
||||
const lut = @import("lut.zig");
|
||||
|
||||
/// The lookup tables for Ghostty.
|
||||
pub const table = table: {
|
||||
// This is only available after running a generator as part of the Ghostty
|
||||
// build.zig process, but due to Zig's lazy analysis we can still reference
|
||||
// it here.
|
||||
//
|
||||
// An example process is the `main` in `props_ziglyph.zig`
|
||||
const generated = @import("unicode_tables").Tables(Properties);
|
||||
const Tables = lut.Tables(Properties);
|
||||
break :table Tables{
|
||||
.stage1 = &generated.stage1,
|
||||
.stage2 = &generated.stage2,
|
||||
.stage3 = &generated.stage3,
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user