summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2025-10-11fix(font): Additional scale group tweaks (#9152)HEADtipmainDaniel Wennberg
Of course #9142 would require a minor follow-up! * Scale groups can cut across patch sets, but not across fonts. We had some scale group mixing between Font Awesome and the weather symbols, which is removed by this PR.[^cp_table_full] * There's one case where a scale group includes a glyph that's not part of any patch sets, just for padding out the group bounding box. Previously, an unrelated glyph from a different font would be pulled in. Now we use an appropriate stand-in. (See code comment for details.) * I noticed overlaps weren't being split between each side of the bounding box, they were added to both sides, resulting in twice as much padding as specified. Screenshots showing the extra vertical padding for progress bar elements due to the second bullet point: **Before** <img width="191" height="42" alt="Screenshot 2025-10-11 at 15 33 54" src="https://github.com/user-attachments/assets/cf288cce-86d3-46fd-ae86-18e5c274b0e4" /> **After** <img width="191" height="42" alt="Screenshot 2025-10-11 at 15 33 20" src="https://github.com/user-attachments/assets/7ac799c7-bf50-4e65-a74a-f8a2c42d2441" /> [^cp_table_full]: Forming and using the merged `cp_table_full` table should have been a red flag. Such a table doesn't make sense, it would be a one-to-many map. You need the names of the original fonts to disambiguate.
2025-10-11font(fix): Extract and apply Nerd Font codepoint mapping table (#9142)Daniel Wennberg
Fixes #9076 **Before** <img width="128" height="57" alt="Screenshot 2025-10-11 at 00 07 09" src="https://github.com/user-attachments/assets/a6b416d5-dae1-4cea-a836-00640ceaf39b" /> **After** <img width="128" height="57" alt="Screenshot 2025-10-11 at 00 07 31" src="https://github.com/user-attachments/assets/7d2df7b1-4767-4e2d-84d2-8301da5c6602" /> These screenshots show the chevrons mentioned in https://github.com/ghostty-org/ghostty/discussions/7820#discussioncomment-14617170, which should be scaled as a group but were not until this PR. The added code downloads each individual symbol font file from the Nerd Fonts github repo (making sure to get the version corresponding to the vendored `font-patcher.py`) and iterates over all of them to build the correct and complete codepoint mapping table. The table is saved to `nerd_font_codepoint_tables.py`, which `nerd_font_codegen.py` will reuse if possible instead of downloading the font files again. I'm not going to utter any famous last words or anything, but... after this, I don't think the number of remaining issues with icon scaling/alignment is _large._
2025-10-11GTK fix quick terminal autohide (#9139)Brice
This is pretty much a direct port of the previous GTK app. still inside of the `isActive` handler for a window https://github.com/ghostty-org/ghostty/blob/7e429d73d6af65a397c6264b18ab60609ae8eefe/src/apprt/gtk/Window.zig#L822-L837 Fixes: https://github.com/ghostty-org/ghostty/discussions/9137
2025-10-11gtk: fix clicking on desktop notifications (#9146)Jeffrey C. Ollie
Clicking on desktop notifications sent by Ghostty _should_ cause the window that sent the notification to come to the top. However, because the notification that was sent targeted the wrong surface (apprt surface vs core surface) and the window did not call `present()` on itself the window would never be brought to the surface, the correct tab would not be selected, etc. Fixes #9145
2025-10-10gtk: better reporting for CSS parsing problems (#9129)Jeffrey C. Ollie
Log messages will include the problematic CSS, simplifying debugging. Especially helpful since some of our CSS is generated at runtime so it could be difficult to examine the CSS "source". ``` info(gtk_ghostty_application): loading gtk-custom-css path=/home/ghostty/dev/ghostty/x.css warning(gtk_ghostty_application): css parsing failed at <data>:2:3-14: gtk-css-parser-error-quark 4 No property named "border-poop" * { border-poop: 0; warning(gtk_ghostty_application): css parsing failed at <data>:1:3-3:1: gtk-css-parser-warning-quark 1 Unterminated block at end of document * { border-poop: 0; ``` vs: ``` info(gtk_ghostty_application): loading gtk-custom-css path=/home/ghostty/dev/ghostty/x.css warning(glib): WARNING: Gtk: Theme parser error: <data>:2:3-14: No property named "border-poop" warning(glib): WARNING: Gtk: Theme parser warning: <data>:1:3-3:1: Unterminated block at end of document ```
2025-10-10Set title as argv[0] for commands specified with `-e` (#9121)Bruno BELANYI
I want to see #7932 get merged, so applied the latest proposed patch. Will close if the original PR gets some traction, as I do _not_ know Zig nor this project. Co-authored-by: rhodes-b <59537185+rhodes-b@users.noreply.github.com>
2025-10-10gtk: properly check for amount of time elapsed before notifying about ↵Jeffrey C. Ollie
command finish (#9128)
2025-10-10osc: do inplace decoding of cmdline passed in OSC 133;C (#9127)Jeffrey C. Ollie
2025-10-10terminal: add semi-colon character to word boundary list for easier ↵Mitchell Hashimoto
selection (#9069) Sorry, I'm living dangerously here and haven't started a discussion. New ghostty user. When working interactively with SQL clients you're often writing semi-colons at the end of statements, e.g. `select * from table;` It's super annoying when you double-click to select the word `table` it actually selects `table;` Anecdotally, this behaviour disagrees with other terminals I've tried (tho not exhaustive). Disclosure: Claude wrote this code but, ironically, I "assisted it" by pointing to the file and function after uncovering issue #30 and relevant PR.
2025-10-10apprt/gtk: use configured title as fallback for closureComputedTitletlj
2025-10-09set minimum required zig version from build.zig.zon in tests and dockerfileĒriks Remess
2025-10-09use app_version from build.zig.zonĒriks Remess
2025-10-07terminal: add semi-colon character to word boundary listRavi Chandra
2025-10-06lib-vt: begin paste utilities exports starting with safe pasteMitchell Hashimoto
2025-10-06lib-vt: split header to be more consumableMitchell Hashimoto
2025-10-06osc: parse additional OSC 133 options (#9059)Jeffrey C. Ollie
OSC 133;A can have: - special_key - click_events OSC 133;C can have: - cmdline - cmdline_url Notably, they are in use by `fish`. Not sure what other shells currently use these options. Note that the options are only parsed. Nothing further is done with them at this point.
2025-10-06fix custom-shader writergate breakageJeffrey C. Ollie
Fixes: #9060
2025-10-06osc: parse additional OSC 133 optionsJeffrey C. Ollie
OSC 133;A can have: - special_key - click_events OSC 133;C can have: - cmdline - cmdline_url Notably, they are in use by `fish`. Not sure what other shells currently use these options. Note that the options are only parsed. Nothing further is done with them at this point.
2025-10-06apprt/gtk: only close with no windows active if close delay is offMitchell Hashimoto
Fixes #9052
2025-10-06lib-vt docs: add etags to the pagesMitchell Hashimoto
2025-10-06doxygen: integrate examples into documentationMitchell Hashimoto
2025-10-06gtk: use std.Io.Writer to generate runtime CSSJeffrey C. Ollie
2025-10-05lib-vt: trying to fix up hosted docsMitchell Hashimoto
2025-10-05libghostty website: update to use arch for doxygen for latestMitchell Hashimoto
2025-10-05lib-vt: fix dockerfile to include assets for webMitchell Hashimoto
2025-10-05osc: reorder osc tests and name them consistently (#9042)Mitchell Hashimoto
No changes in the tests were made, but reordering them and naming them consistently will makes finding tests easier (there are a LOT).
2025-10-05linux cgroup: also fix controllers()Jeffrey C. Ollie
This fix was found by Claude Code, but I manually reviewed this change and removed extraneous changes made by the AI tool. Co-authored-by: moderation <michael@sooper.org>
2025-10-05linux cgroup: fix initializationJeffrey C. Ollie
2025-10-05osc: reorder osc tests and name them consistentlyJeffrey C. Ollie
2025-10-05libghostty: use Arch for docs container to get later DoxygenMitchell Hashimoto
2025-10-05libghostty docs: use latest DoxygenMitchell Hashimoto
2025-10-05lib-vt: expose key encoding as a C API (#9040)Mitchell Hashimoto
Example in `example/c-vt-key-encode`, but here is an abridged version: ```c #include <assert.h> #include <stddef.h> #include <stdio.h> #include <string.h> #include <ghostty/vt.h> int main() { GhosttyKeyEncoder encoder; GhosttyResult result = ghostty_key_encoder_new(NULL, &encoder); assert(result == GHOSTTY_SUCCESS); ghostty_key_encoder_setopt(encoder, GHOSTTY_KEY_ENCODER_OPT_KITTY_FLAGS, &(uint8_t){GHOSTTY_KITTY_KEY_ALL}); GhosttyKeyEvent event; result = ghostty_key_event_new(NULL, &event); assert(result == GHOSTTY_SUCCESS); ghostty_key_event_set_action(event, GHOSTTY_KEY_ACTION_RELEASE); ghostty_key_event_set_key(event, GHOSTTY_KEY_CONTROL_LEFT); ghostty_key_event_set_mods(event, GHOSTTY_MODS_CTRL); char buf[128]; size_t written = 0; result = ghostty_key_encoder_encode(encoder, event, buf, sizeof(buf), &written); assert(result == GHOSTTY_SUCCESS); ghostty_key_event_free(event); ghostty_key_encoder_free(encoder); return 0; } ```
2025-10-05lib-vt: expose key encoding as a C APIMitchell Hashimoto
2025-10-05fix: do not remove libc memmove until performance comparisons have been ↵NikoMalik
conducted
2025-10-05fix:use builtin memmoveNikoMalik
2025-10-04input: use std.Io.Writer for key encoder, new API, expose via libghosttyMitchell Hashimoto
This modernizes `KeyEncoder` to a new `std.Io.Writer`-based API. Additionally, instead of a single struct, it is now an `encode` function that takes a series of more focused options. This is more idiomatic Zig while also making it easier to expose via libghostty-vt. libghostty-vt also gains access to key encoding APIs.
2025-10-04build: framegen can use self-hosted (#9021)Mitchell Hashimoto
This was a red herring when I was doing the 0.15 port. It works with self-hosted just fine.
2025-10-04Move paste encoding to the input package, test, optimize away one allocMitchell Hashimoto
This moves our paste logic to `src/input` in preparation for exposing this as part of libghostty-vt. This yields an immediate benefit of unit tests for paste encoding. Additionally, we were able to remove one allocation on every unbracketed paste path unless the input specifically contains a newline. Unlikely to be noticable, but nice. NOTE: This also includes one change in behavior: we no longer encode `\r\n` and a single `\r`, but as a duplicate `\r\r`. This matches xterm behavior and I don't think will result in any issues since duplicate carriage returns should do nothing in well-behaved terminals.
2025-10-04Expand `~` in `macos-custom-icon` (#9024)Mitchell Hashimoto
Since #8999, `macos-custom-icon` works when its a fully expanded absolute path like `/Users/username/dir/icon.icns`, but not when it's abbreviated as `~/dir/icon.icns`. Users were understandably surprised and confused by this. This PR adds tilde expansion using `NSString`s built-in property for this. Also removed a line from the config docs that seemed erroneous. Given that the option has a functional default, it seems incorrect to say that it's required.
2025-10-04Remove incorrect note from config docsDaniel Wennberg
2025-10-03Add comprehensive constraint testsDaniel Wennberg
2025-10-03Fix botched cherry-pick from #8990Daniel Wennberg
2025-10-03build: framegen can use self-hostedMitchell Hashimoto
This was a red herring when I was doing the 0.15 port. It works with self-hosted just fine.
2025-10-03Handle font_patcher codepoint range overlapsDaniel Wennberg
2025-10-03Handle font_patcher codepoint offsetsDaniel Wennberg
2025-10-03Skip patchsets and codepoints not in SymbolsNFDaniel Wennberg
2025-10-03Add font_patcher's grouped vs individual alignmentDaniel Wennberg
2025-10-03Align stretched glyphs to cell, not faceDaniel Wennberg
2025-10-03Always clamp scaled glyph to cellDaniel Wennberg
Also take padding into account for centered alignment, necessary since our constraint type allows asymmetric padding.
2025-10-03fix(font): Anchor scaling at bounding box centerDaniel Wennberg