mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-09-05 19:08:17 +00:00
Compare commits
5 Commits
c3e7857a2c
...
93744a4002
Author | SHA1 | Date | |
---|---|---|---|
![]() |
93744a4002 | ||
![]() |
3ac2da99f4 | ||
![]() |
43ee3cc8c6 | ||
![]() |
7c4b45ecee | ||
![]() |
2464728851 |
@@ -55,8 +55,8 @@
|
||||
.gobject = .{
|
||||
// https://github.com/jcollie/ghostty-gobject based on zig_gobject
|
||||
// Temporary until we generate them at build time automatically.
|
||||
.url = "https://github.com/jcollie/ghostty-gobject/releases/download/0.14.1-2025-08-30-39-1/ghostty-gobject-0.14.1-2025-08-30-39-1.tar.zst",
|
||||
.hash = "gobject-0.3.0-Skun7HlFnQBaCs-ZxA9JLd_QV9wbvrnfoJDzPx96IDLc",
|
||||
.url = "https://github.com/jcollie/ghostty-gobject/releases/download/0.15.1-2025-09-04-48-1/ghostty-gobject-0.15.1-2025-09-04-48-1.tar.zst",
|
||||
.hash = "gobject-0.3.0-Skun7ET3nQAc0LzvO0NAvTiGGnmkF36cnmbeCAF6MB7Z",
|
||||
.lazy = true,
|
||||
},
|
||||
|
||||
|
6
build.zig.zon.json
generated
6
build.zig.zon.json
generated
@@ -24,10 +24,10 @@
|
||||
"url": "https://deps.files.ghostty.org/glslang-12201278a1a05c0ce0b6eb6026c65cd3e9247aa041b1c260324bf29cee559dd23ba1.tar.gz",
|
||||
"hash": "sha256-FKLtu1Ccs+UamlPj9eQ12/WXFgS0uDPmPmB26MCpl7U="
|
||||
},
|
||||
"gobject-0.3.0-Skun7HlFnQBaCs-ZxA9JLd_QV9wbvrnfoJDzPx96IDLc": {
|
||||
"gobject-0.3.0-Skun7ET3nQAc0LzvO0NAvTiGGnmkF36cnmbeCAF6MB7Z": {
|
||||
"name": "gobject",
|
||||
"url": "https://github.com/jcollie/ghostty-gobject/releases/download/0.14.1-2025-08-30-39-1/ghostty-gobject-0.14.1-2025-08-30-39-1.tar.zst",
|
||||
"hash": "sha256-e/HM6V8s0flOVMelia453vAs4jH4jy7QArPiIsS/k74="
|
||||
"url": "https://github.com/jcollie/ghostty-gobject/releases/download/0.15.1-2025-09-04-48-1/ghostty-gobject-0.15.1-2025-09-04-48-1.tar.zst",
|
||||
"hash": "sha256-h6aKUerGlX2ATVEeoN03eWaqDqvUmKdedgpxrSoHvrY="
|
||||
},
|
||||
"N-V-__8AALiNBAA-_0gprYr92CjrMj1I5bqNu0TSJOnjFNSr": {
|
||||
"name": "gtk4_layer_shell",
|
||||
|
6
build.zig.zon.nix
generated
6
build.zig.zon.nix
generated
@@ -123,11 +123,11 @@ in
|
||||
};
|
||||
}
|
||||
{
|
||||
name = "gobject-0.3.0-Skun7HlFnQBaCs-ZxA9JLd_QV9wbvrnfoJDzPx96IDLc";
|
||||
name = "gobject-0.3.0-Skun7ET3nQAc0LzvO0NAvTiGGnmkF36cnmbeCAF6MB7Z";
|
||||
path = fetchZigArtifact {
|
||||
name = "gobject";
|
||||
url = "https://github.com/jcollie/ghostty-gobject/releases/download/0.14.1-2025-08-30-39-1/ghostty-gobject-0.14.1-2025-08-30-39-1.tar.zst";
|
||||
hash = "sha256-e/HM6V8s0flOVMelia453vAs4jH4jy7QArPiIsS/k74=";
|
||||
url = "https://github.com/jcollie/ghostty-gobject/releases/download/0.15.1-2025-09-04-48-1/ghostty-gobject-0.15.1-2025-09-04-48-1.tar.zst";
|
||||
hash = "sha256-h6aKUerGlX2ATVEeoN03eWaqDqvUmKdedgpxrSoHvrY=";
|
||||
};
|
||||
}
|
||||
{
|
||||
|
2
build.zig.zon.txt
generated
2
build.zig.zon.txt
generated
@@ -27,7 +27,7 @@ https://deps.files.ghostty.org/wuffs-122037b39d577ec2db3fd7b2130e7b69ef6cc1807d6
|
||||
https://deps.files.ghostty.org/zig_js-12205a66d423259567764fa0fc60c82be35365c21aeb76c5a7dc99698401f4f6fefc.tar.gz
|
||||
https://deps.files.ghostty.org/ziglyph-b89d43d1e3fb01b6074bc1f7fc980324b04d26a5.tar.gz
|
||||
https://deps.files.ghostty.org/zlib-1220fed0c74e1019b3ee29edae2051788b080cd96e90d56836eea857b0b966742efb.tar.gz
|
||||
https://github.com/jcollie/ghostty-gobject/releases/download/0.14.1-2025-08-30-39-1/ghostty-gobject-0.14.1-2025-08-30-39-1.tar.zst
|
||||
https://github.com/jcollie/ghostty-gobject/releases/download/0.15.1-2025-09-04-48-1/ghostty-gobject-0.15.1-2025-09-04-48-1.tar.zst
|
||||
https://github.com/mbadolato/iTerm2-Color-Schemes/archive/6cdbc8501d48601302e32d6b53e9e7934bf354b4.tar.gz
|
||||
https://github.com/mitchellh/libxev/archive/7f803181b158a10fec8619f793e3b4df515566cb.tar.gz
|
||||
https://github.com/mitchellh/zig-objc/archive/c9e917a4e15a983b672ca779c7985d738a2d517c.tar.gz
|
||||
|
@@ -31,9 +31,9 @@
|
||||
},
|
||||
{
|
||||
"type": "archive",
|
||||
"url": "https://github.com/jcollie/ghostty-gobject/releases/download/0.14.1-2025-08-30-39-1/ghostty-gobject-0.14.1-2025-08-30-39-1.tar.zst",
|
||||
"dest": "vendor/p/gobject-0.3.0-Skun7HlFnQBaCs-ZxA9JLd_QV9wbvrnfoJDzPx96IDLc",
|
||||
"sha256": "7bf1cce95f2cd1f94e54c7a589ae39def02ce231f88f2ed002b3e222c4bf93be"
|
||||
"url": "https://github.com/jcollie/ghostty-gobject/releases/download/0.15.1-2025-09-04-48-1/ghostty-gobject-0.15.1-2025-09-04-48-1.tar.zst",
|
||||
"dest": "vendor/p/gobject-0.3.0-Skun7ET3nQAc0LzvO0NAvTiGGnmkF36cnmbeCAF6MB7Z",
|
||||
"sha256": "87a68a51eac6957d804d511ea0dd377966aa0eabd498a75e760a71ad2a07beb6"
|
||||
},
|
||||
{
|
||||
"type": "archive",
|
||||
|
@@ -7,7 +7,7 @@
|
||||
const Constraint = @import("face.zig").RenderOptions.Constraint;
|
||||
|
||||
/// Get the a constraints for the provided codepoint.
|
||||
pub fn getConstraint(cp: u21) Constraint {
|
||||
pub fn getConstraint(cp: u21) ?Constraint {
|
||||
return switch (cp) {
|
||||
0x2500...0x259f,
|
||||
=> .{
|
||||
@@ -1060,6 +1060,6 @@ pub fn getConstraint(cp: u21) Constraint {
|
||||
.align_vertical = .center,
|
||||
.group_width = 1.3001222493887530,
|
||||
},
|
||||
else => .none,
|
||||
else => null,
|
||||
};
|
||||
}
|
||||
|
@@ -351,8 +351,8 @@ if __name__ == "__main__":
|
||||
const Constraint = @import("face.zig").RenderOptions.Constraint;
|
||||
|
||||
/// Get the a constraints for the provided codepoint.
|
||||
pub fn getConstraint(cp: u21) Constraint {
|
||||
pub fn getConstraint(cp: u21) ?Constraint {
|
||||
return switch (cp) {
|
||||
""")
|
||||
f.write(generate_zig_switch_arms(patch_set, nerd_font))
|
||||
f.write("\n else => .none,\n };\n}\n")
|
||||
f.write("\n else => null,\n };\n}\n")
|
||||
|
@@ -237,13 +237,27 @@ pub fn isCovering(cp: u21) bool {
|
||||
|
||||
/// Returns true of the codepoint is a "symbol-like" character, which
|
||||
/// for now we define as anything in a private use area and anything
|
||||
/// in the "dingbats" unicode block.
|
||||
/// in several unicode blocks:
|
||||
/// - Dingbats
|
||||
/// - Emoticons
|
||||
/// - Miscellaneous Symbols
|
||||
/// - Enclosed Alphanumerics
|
||||
/// - Enclosed Alphanumeric Supplement
|
||||
/// - Miscellaneous Symbols and Pictographs
|
||||
/// - Transport and Map Symbols
|
||||
///
|
||||
/// In the future it may be prudent to expand this to encompass more
|
||||
/// symbol-like characters, and/or exclude some PUA sections.
|
||||
pub fn isSymbol(cp: u21) bool {
|
||||
// TODO: This should probably become a codegen'd LUT
|
||||
return ziglyph.general_category.isPrivateUse(cp) or
|
||||
ziglyph.blocks.isDingbats(cp);
|
||||
ziglyph.blocks.isDingbats(cp) or
|
||||
ziglyph.blocks.isEmoticons(cp) or
|
||||
ziglyph.blocks.isMiscellaneousSymbols(cp) or
|
||||
ziglyph.blocks.isEnclosedAlphanumerics(cp) or
|
||||
ziglyph.blocks.isEnclosedAlphanumericSupplement(cp) or
|
||||
ziglyph.blocks.isMiscellaneousSymbolsAndPictographs(cp) or
|
||||
ziglyph.blocks.isTransportAndMapSymbols(cp);
|
||||
}
|
||||
|
||||
/// Returns the appropriate `constraint_width` for
|
||||
|
@@ -3066,7 +3066,14 @@ pub fn Renderer(comptime GraphicsAPI: type) type {
|
||||
.thicken = self.config.font_thicken,
|
||||
.thicken_strength = self.config.font_thicken_strength,
|
||||
.cell_width = cell.gridWidth(),
|
||||
.constraint = getConstraint(cp),
|
||||
// If there's no Nerd Font constraint for this codepoint
|
||||
// then, if it's a symbol, we constrain it to fit inside
|
||||
// its cell(s), we don't modify the alignment at all.
|
||||
.constraint = getConstraint(cp) orelse
|
||||
if (cellpkg.isSymbol(cp)) .{
|
||||
.size_horizontal = .fit,
|
||||
.size_vertical = .fit,
|
||||
} else .none,
|
||||
.constraint_width = constraintWidth(cell_pin),
|
||||
},
|
||||
);
|
||||
|
Reference in New Issue
Block a user