2567 Commits

Author SHA1 Message Date
SoraTenshi
ead70eadae Add Caveat information for shell integration 2023-08-28 19:44:01 +02:00
SoraTenshi
fcf1537f82 config: Add option for custom cursor style 2023-08-28 18:20:45 +02:00
Mitchell Hashimoto
3b9d5d27ad terminal: implement DECRQM (request mode) 2023-08-28 08:50:11 -07:00
Mitchell Hashimoto
cbfa22555e terminal: test to ensure that DECRQM can parse 2023-08-28 08:36:00 -07:00
Mitchell Hashimoto
aa08f3cd6b Merge pull request #346 from mitchellh/combining-resize
Resize with less cols (reflow or not) preserves zero-width codepoints
2023-08-28 08:24:22 -07:00
Mitchell Hashimoto
be27b825f3 terminal: resize with less cols preserves zero width codepoints 2023-08-28 08:18:03 -07:00
Mitchell Hashimoto
c243c9d72e terminal: screen test dumpString function should add graphemes 2023-08-28 08:07:40 -07:00
Mitchell Hashimoto
83959cd058 Merge pull request #345 from mitchellh/variable-fonts
Variable font support
2023-08-28 07:35:19 -07:00
Mitchell Hashimoto
b61541cc3f Merge pull request #344 from mitchellh/psth/gtk-switch-page
use Gtk.Notebook::switch-page callback for setting window title
2023-08-28 07:34:41 -07:00
Seth Rider
c56d07c36f use Gtk.Notebook::switch-page callback for setting window title 2023-08-28 07:26:30 -07:00
Mitchell Hashimoto
ae3892995a Merge pull request #342 from mitchellh/goonz/non-native-fullscreen-fixes
macos: fix non-native fullscreen dock/menubar bugs
2023-08-28 07:25:51 -07:00
Mitchell Hashimoto
1ee5b7f91c font: freetype supports font variation settings 2023-08-28 07:25:09 -07:00
Mitchell Hashimoto
906852976b config: new "font-variation" set of configurations to set variable font 2023-08-28 07:25:09 -07:00
Mitchell Hashimoto
16808f2b35 font/coretext: log the variation axes in debug mode 2023-08-28 07:25:09 -07:00
Mitchell Hashimoto
9d0729f17c font/coretext: ability to set variation axes 2023-08-28 07:25:09 -07:00
Mitchell Hashimoto
fb0f80f9ca macos: add necessary functions for variation axes querying 2023-08-28 07:25:09 -07:00
Mitchell Hashimoto
decdf49a2b add pixman vendor without submodule 2023-08-28 07:24:12 -07:00
Mitchell Hashimoto
220e5b1818 remove pixman submodule 2023-08-28 07:22:18 -07:00
Will Pragnell
55d5350a65 macos: fix non-native fullscreen dock/menubar bugs 2023-08-26 19:35:19 -07:00
Mitchell Hashimoto
f733e58dc4 font/shaper: on macos load apple color emoji for tests 2023-08-26 17:14:22 -07:00
Mitchell Hashimoto
fc3ca689af Merge pull request #341 from mitchellh/psth/gtk-window-title
Set gtk window title on change and tab swap (by key command)
2023-08-26 16:54:27 -07:00
Seth Rider
fc774cf21a Set gtk window title on change and tab swap (by key command) 2023-08-26 21:25:54 +01:00
Mitchell Hashimoto
928f12b5c1 Merge pull request #339 from mitchellh/combining
font: grapheme clusters need to find a single font for all codepoints
2023-08-26 09:41:45 -07:00
Mitchell Hashimoto
14c9279c21 config: add doc comment for cursor-text 2023-08-26 09:39:25 -07:00
Mitchell Hashimoto
71fddcdc89 Merge pull request #329 from hovsater/cursor-colors
Implement cursor text color option
2023-08-26 09:38:35 -07:00
Mitchell Hashimoto
e6edf3105e font: grapheme clusters need to find a single font for all codepoints
When font shaping grapheme clusters, we erroneously used the font index
of a font that only matches the first codepoint in the cell. This led to the
combining characters being [usually] unknown and rendering as boxes.

For a grapheme, we must find a font face that has a glyph for _all codepoints_
in the grapheme.

This also fixes an issue where we now properly render the unicode replacement
character if we can't find a font satisfying a codepoint.
2023-08-26 09:35:56 -07:00
Mitchell Hashimoto
39c2332d35 input: keypad enter should act as normal "\r" if no other seq matches
This matches Kitty behavior on both macOS and Linux. In certain keyboard
modes and Kitty keyboard modes, the behavior changes but those already
matched (tested).
2023-08-26 07:43:22 -07:00
Kevin Hovsäter
8b9a11db4b Implement cursor text in addition to color 2023-08-26 15:29:48 +02:00
Mitchell Hashimoto
73ff43590c Merge pull request #335 from mitchellh/null-focus
core: set focused surface pointer to null if matches on delete
2023-08-25 21:08:16 -07:00
Mitchell Hashimoto
6a8d302fa0 core: set focused surface pointer to null if matches on delete
We previously never set the focused pointer to null. I thought this
would be fine because a `hasSurface` check would say it doesn't exist.
But I didn't account for the fact that a deleted surface followed very
quickly by a new surface would free the pointer, then the allocation
would reuse the very same pointer, making `hasSurface` return a false
positive.

Well, technically, hasSurface is not wrong, the surface exists, but its
not really the same surface, its just a surface that happens to have the
same pointer as a previously freed surface.

Co-authored-by: Will Pragnell <wpragnell@gmail.com>
2023-08-25 21:01:12 -07:00
Mitchell Hashimoto
134568c395 Merge pull request #333 from mitchellh/face-rework
font: Improve quirks mode performance, DeferredFace, Group refactor

This was motivated by #331. I realized with #331 that this added a lot of overhead on every render frame, because for each text run being rendered, we were (1) reloading the font name (unknown performance cost on macOS due to closed source, looks like [it ain't exactly free in Freetype](https://sourcegraph.com/github.com/freetype/freetype@4d8db130ea4342317581bab65fc96365ce806b77/-/blob/src/base/ftsnames.c?L44)) (2) doing multiple string compares (3) multiple function call overhead. And realistically, quirks mode will be _rare_, so paying a very active cost for a rare thing is 💩 .

In investigating that I finally shaved some yaks I've been wanting to shave on this path... the end result is that overall we should be doing [very] slightly less work no matter what and using slightly less memory. And on the renderer path, we're doing _way_ less work. 

- All loaded font `Face` structures must also check and cache their quirks mode settings. This makes #331 a single boolean check per text run which is effectively free compared to the actual shaping task. The cost is one additional byte on the face structure (well, whatever the alignment is).
- `DeferredFace` now only represents an _unloaded_ face (that can be loaded multiple times). This lowers memory usage significantly (`Face` was large) per deferred face.
- `DeferredFace.name()` now takes a buffer for output instead of just failing on no static space, weird decision. No performance impact but makes this function more robust.
- `Group.addFace` now takes a tagged union representing either a deferred or loaded face, this gets rid of all the weird `DeferredFace.initLoaded` wrappers that were unnecessary and dumb. No real performance impact.
- When a font face is loaded in `Group` (lots of things trigger this), the DeferredFace it came from is now deinitialized immediately. This should save on memory significantly because we free all the font discovery information. We can do this because a deferred face is only ever loaded _once_ when its part of a `Group`, and the group owns the deferred face.
- Auto-italicize moves into `Group` and is no longer duplicated between Deferred and normal Face. No performance change, less code.
2023-08-25 15:13:01 -07:00
Mitchell Hashimoto
c15cf6d9f1 font: fontconfig adaptations to new api 2023-08-25 14:57:05 -07:00
Mitchell Hashimoto
f4738210e1 font: determine quirks modes on font face load 2023-08-25 14:44:16 -07:00
Mitchell Hashimoto
b51ef704f4 font: DeferredFace.name takes a buffer 2023-08-25 14:40:59 -07:00
Mitchell Hashimoto
167bf6f098 font: DeferredFace can no longer represent a loaded face 2023-08-25 13:28:46 -07:00
Mitchell Hashimoto
ad6c2b6cc8 font: move auto-italicization to Group 2023-08-25 13:16:42 -07:00
Mitchell Hashimoto
1dcf921ed9 font: Group maintains face ownership 2023-08-25 13:00:04 -07:00
Mitchell Hashimoto
ea3b957bc7 quirks: Menlo/Monaco should disable ligatures by default (#331)
* font: disable default font features for Menlo and Monaco

Both of these fonts have a default ligature on "fi" which makes terminal
rendering super ugly. The easiest thing to do is special-case these
fonts and disable ligatures. It appears other terminals do the same
thing.
2023-08-25 09:29:15 -07:00
Mitchell Hashimoto
63386e4a22 build: can select renderer with -Drenderer
Note that not all renderers work in all environments.
2023-08-25 08:12:31 -07:00
Mitchell Hashimoto
e903ec382b Merge pull request #326 from mitchellh/kitty-modifier
input: kitty should not encode modifier-only key unless "report all"
2023-08-24 21:30:49 -07:00
Mitchell Hashimoto
e7c11f7d13 input: kitty should not encode modifier-only key unless "report all" 2023-08-24 21:24:41 -07:00
Mitchell Hashimoto
e0ee5d1763 Revert "Merge pull request #322 from mitchellh/big-glyphs"
This reverts commit 0ffbab00a42ba0fb9a3f2aa02428760df61d03d3, reversing
changes made to 6751087bead34efe1684997503c3764a63607397.
2023-08-24 21:05:33 -07:00
Mitchell Hashimoto
5829ad51eb Merge pull request #323 from mitchellh/mac-strip-control
apprt/embedded: do not translate control characters
2023-08-24 15:15:25 -07:00
Mitchell Hashimoto
3a93aaf9cf apprt/embedded: do not translate control characters
macOS translates inputs such as shift+tab into the control character tab
(ascii 0x09). Linux/GTK does not translate character inputs except to
printable characters. We don't want control character translations
because these are all handled manually by our key encoder (i.e.
translating ctrl+c to 0x03).
2023-08-24 15:01:57 -07:00
Mitchell Hashimoto
0ffbab00a4 Merge pull request #322 from mitchellh/big-glyphs
renderer/opengl: glyphs that are too wide should be scaled down
2023-08-24 14:29:01 -07:00
Mitchell Hashimoto
aad4bdb32a renderer/opengl: glyphs that are too wide should be scaled down
U+226A is 1-char wide according to the Unicode database but renders very
wide in many fonts. This causes it to leak outside of its grid cell. We
should scale down by x the same way we scale down by y.
2023-08-24 14:19:38 -07:00
Mitchell Hashimoto
6751087bea Merge pull request #318 from mitchellh/update-zig
update zig
2023-08-24 10:36:36 -07:00
Mitchell Hashimoto
ab9f86cd23 update zig 2023-08-24 09:52:31 -07:00
Mitchell Hashimoto
86495e826c Merge pull request #317 from mitchellh/kitty-gfx
Kitty Graphics Protocol Initial Support
2023-08-24 08:50:13 -07:00
Mitchell Hashimoto
5aaf82065c remove kitty graphics from TODO 2023-08-24 08:50:01 -07:00