6152 Commits

Author SHA1 Message Date
Qwerasd
3156df261f fix a couple test failures 2024-05-09 00:03:40 -04:00
Qwerasd
d4a7549222 feat(font): Non-integer point sizes
Allows for high dpi displays to get odd numbered pixel sizes, for
example, 13.5pt @ 2px/pt for 27px font. This implementation performs
all the sizing calculations with f32, rounding to the nearest pixel
size when it comes to rendering. In the future this can be enhanced
by adding fractional scaling to support fractional pixel sizes.
2024-05-09 00:03:40 -04:00
Mitchell Hashimoto
08940940d5 Merge pull request #1742 from mitchellh/macos-matrix
ci: add renderer, font engine macOS build+test matrix
2024-05-08 20:59:31 -07:00
Mitchell Hashimoto
6dcf567554 font: fix coretext test issues with harfbuzz shaper 2024-05-08 18:33:14 -07:00
Mitchell Hashimoto
435bd32cfd font: SharedGridSet works without font discovery 2024-05-08 18:24:55 -07:00
Mitchell Hashimoto
995f39314d ci: add renderer, font engine macOS build+test matrix 2024-05-08 12:31:30 -07:00
Mitchell Hashimoto
3c882e364a font: disable CJK unification fallback with freetype rasterizer 2024-05-08 12:18:35 -07:00
Mitchell Hashimoto
e037c55da6 Merge pull request #1740 from mitchellh/ct-rtl
coretext: force LTR font shaping
2024-05-08 10:19:57 -07:00
Mitchell Hashimoto
1cb70d6e40 font/coretext: force LTR shaping 2024-05-08 10:11:57 -07:00
Severus
245aaa34bf Add upstream's issue 2024-05-09 00:00:14 +07:00
Severus
b33190131f Add GDK_DEBUG as default environment variable for linux
Since gtk 4.14, we need to define driver to run OpenGL as (gtk's issue)[https://gitlab.gnome.org/GNOME/gtk/-/issues/6589]
2024-05-08 23:50:08 +07:00
Mitchell Hashimoto
eeb7f7aa02 pkg/macos: add more text APIs 2024-05-08 09:49:16 -07:00
Mitchell Hashimoto
18e5382909 font/coretext: do not assume capacity on arraylist append
Now that we're padding the cells with blanks if we have shaped ligatures
we don't actually know the exact count based on the CoreText APIs, so we
should just dynamically add.
2024-05-08 08:55:28 -07:00
Mitchell Hashimoto
f13a471e05 Merge pull request #1738 from jparise/bash-histfile
shell-integration: expand bash HISTFILE value
2024-05-08 07:59:48 -07:00
Jon Parise
054e01eaaf shell-integration: expand bash HISTFILE value
bash reads HISTFILE at startup to locate its history file, but this is
apparently too early for it to be able to expand home-relative paths. We
now manually expand the full path and add that to the environment.
2024-05-08 07:49:46 -07:00
Mitchell Hashimoto
2b785127b1 Merge pull request #1729 from jparise/bash-integration
shell-integration: automatic bash integration
2024-05-07 20:01:51 -07:00
Mitchell Hashimoto
4eaebe5abc update README 2024-05-07 20:01:30 -07:00
Mitchell Hashimoto
d64fa6d9db termio: shell integration uses arena 2024-05-07 19:57:26 -07:00
Mitchell Hashimoto
0445a017a2 Merge pull request #1736 from qwerasd205/metal-cell-fixes
Metal cell Contents structure improvements
2024-05-07 19:23:45 -07:00
Mitchell Hashimoto
0335b0eada core: preedit modification sets full screen dirty
Fixes #1735
2024-05-07 19:19:58 -07:00
Qwerasd
7e9bdb84a8 renderer/Metal: cell Contents asserts 2024-05-07 21:19:22 -04:00
Qwerasd
c801e28c39 renderer/Metal: cell Contents tests 2024-05-07 21:13:50 -04:00
Qwerasd
4f26eb203b renderer/Metal: cell Contents cleanup
Cleaned up naming, some logic changes, added comments.
2024-05-07 20:46:20 -04:00
Qwerasd
adf211f5d5 renderer/Metal: ArrayList cell Contents rows
This will allow for unlimited glyphs per row, eliminating the issue run in to with multi-substitution glyphs and combining characters which can result in more glyphs in a row than there are columns.
2024-05-07 19:19:06 -04:00
Qwerasd
dafabe3296 renderer/Metal: improve cell contents tracking
Previous version prevented multiple glyphs from belonging to the same coordinate, which broke quite a few things. This implementation fixes that (and may be more efficient too). Needs clean-up.
2024-05-07 19:19:06 -04:00
Mitchell Hashimoto
91bcc3de39 font/coretext: choose proper original font for CJK search 2024-05-07 15:39:17 -07:00
Mitchell Hashimoto
b7b76e352c Merge pull request #1734 from mitchellh/ct-fallback
coretext: let macOS choose the font for CJK Unified Ideographs
2024-05-07 15:21:38 -07:00
Mitchell Hashimoto
84095025d5 font: fontconfig has proper function 2024-05-07 15:10:53 -07:00
Mitchell Hashimoto
7c5d829274 font: use CoreText API for CJK unified ideographs 2024-05-07 15:05:34 -07:00
Mitchell Hashimoto
4dd3b107c6 Merge pull request #1733 from mitchellh/dirty-fixes
Track dirty bits in more places
2024-05-07 10:47:17 -07:00
Mitchell Hashimoto
cd42888182 terminal: eraseRows sets dirty bits 2024-05-07 10:38:27 -07:00
Mitchell Hashimoto
f975861891 terminal: maintain dirty bits when rotating rows on clone 2024-05-07 10:36:54 -07:00
Mitchell Hashimoto
165c2d9056 renderer/metal: rebuild full screen when viewport changes 2024-05-07 10:22:12 -07:00
Mitchell Hashimoto
a1372a0efd terminal: more dirty tracking 2024-05-07 09:55:32 -07:00
Mitchell Hashimoto
3cfce658c3 terminal: dirty tracking in more places, tests coverage 2024-05-07 09:52:03 -07:00
Mitchell Hashimoto
a84314befe renderer/metal: disable bandaid 2024-05-07 09:51:45 -07:00
Mitchell Hashimoto
c2c8660c62 renderer/metal: disable dirty tracking temporarily
While #1731 is not fixed.
2024-05-07 07:26:59 -07:00
Mitchell Hashimoto
4c39739a26 renderer/metal: rebuild all cells on resize 2024-05-06 20:51:55 -07:00
Mitchell Hashimoto
db1fccf28c Merge pull request #1730 from mitchellh/dirty
renderer/metal: reset screen dirty flag properly, be more careful setting selection dirty flag
2024-05-06 18:38:05 -07:00
Mitchell Hashimoto
d3abe65ad6 terminal: only set selection dirty to true on clear if previously set 2024-05-06 18:35:51 -07:00
Mitchell Hashimoto
26300447e4 renderer/metal: reset screen dirty flags
I introduced screen dirty flags fairly late, and never reset them. As a
result, dirty tracking basically gets disabled as soon as selection
changes in any form. This happens frequently because _unsetting_
selection also resets selection which happens for various events.
2024-05-06 18:31:26 -07:00
Mitchell Hashimoto
1189817dd8 pkg/macos: CTFontCreateForString 2024-05-05 21:38:19 -07:00
Mitchell Hashimoto
a29a0a1e5c pkg/macos: add more CoreText APIs 2024-05-05 21:01:44 -07:00
Jon Parise
861edc722f shell-integration: revise ShellIntegration.command comment 2024-05-05 14:03:31 -07:00
Jon Parise
73b3560e62 shell-integration: automatic bash integration
This change adds automatic bash shell detection and integration.

Unlike our other shell integrations, bash doesn't provide a built-in
mechanism for injecting our ghostty.bash script into the new shell
environment.

Instead, we start bash in POSIX mode and use the ENV environment
variable to load our integration script, and the rest of the bash
startup sequence becomes the responsibility of our script to emulate
(along with disabling POSIX mode).
2024-05-05 13:59:52 -07:00
Mitchell Hashimoto
2e2d924353 Merge pull request #1728 from mitchellh/vsync
macOS: add window-vsync option for vsync
2024-05-05 10:24:03 -07:00
Mitchell Hashimoto
8fdf6b4b64 renderer: add window-vsync option (defaults to false) 2024-05-05 10:18:15 -07:00
Mitchell Hashimoto
fe070f10cd Merge pull request #1727 from mitchellh/metal-link2
macOS: Unleash the Framerate
2024-05-04 20:20:11 -07:00
Mitchell Hashimoto
ca9689be46 renderer/metal: API to handle macOS display ID changing 2024-05-04 19:40:58 -07:00
Mitchell Hashimoto
6b3cb69101 renderer/metal: clean up some unnecessary state around rebuilds 2024-05-04 19:06:43 -07:00