6038 Commits

Author SHA1 Message Date
Qwerasd
155a6d1114 font: fix discovery of styles
These are meant to be absolute indexes, make it so.
2024-04-08 20:44:17 -04:00
Mitchell Hashimoto
188d25b5d9 font/coretext: fix merge issue from #1662 2024-04-08 17:07:00 -04:00
Mitchell Hashimoto
e66e82787b Merge pull request #1662 from mitchellh/fontmem
Dedupe font stack for terminals with identical font configuration
2024-04-08 16:57:58 -04:00
Mitchell Hashimoto
b8410187c8 Merge pull request #1666 from mitchellh/ct-runs
font/coretext: shaper may return multiple runs and that's okay
2024-04-08 08:05:29 -07:00
Mitchell Hashimoto
edac4a113f font/coretext: shaper may return multiple runs and that's okay
Fixes #1664

I previously asserted that we got exactly one run from CoreText because
I assumed that our run iterator was perfectly splitting runs for
CoreText. This assumption appears to be false and that seems okay.

The test case in this commit produces two runs that are directly next to
each other and there's no downside to simply iterating over them. So
this commit changes to iterate over the runs.
2024-04-08 10:52:50 -04:00
Mitchell Hashimoto
0d8aa788c5 Merge pull request #1665 from aca/dbg
input: fix bs emitting sequence when it should not
2024-04-08 06:21:13 -07:00
rok
df9b8f1fbc input: fix bs emitting sequence when it should not
In korean input method on macos, it should simply return empty string.
Issue was created after https://github.com/mitchellh/ghostty/pull/1659.

```
gksr<BS> # 한ㄱ<BS>
```

'ㄱ' at the end should be removed with single <BS>, but for now
it requires two <bs> to remove 'ㄱ'.
2024-04-08 22:11:01 +09:00
Mitchell Hashimoto
21a648748d font: CodepointMap supports clone 2024-04-07 10:54:59 -07:00
Mitchell Hashimoto
06df9b7867 font: remove old files 2024-04-06 20:10:57 -07:00
Mitchell Hashimoto
e3402cef4d address many fontmem todos 2024-04-06 20:00:22 -07:00
Mitchell Hashimoto
3b0b9c2cfd renderer/opengl: set the font grid 2024-04-06 19:55:00 -07:00
Mitchell Hashimoto
2f61f7d6a3 font: fix hashing of descriptor strings 2024-04-06 19:49:14 -07:00
Mitchell Hashimoto
21605eaab7 apprt/embedded: setfontsize 2024-04-06 19:37:41 -07:00
Mitchell Hashimoto
84f30a6064 apprt/gtk: setFontsize should have error 2024-04-06 19:36:59 -07:00
Mitchell Hashimoto
3afeac99e9 renderer/opengl: support font size change 2024-04-06 19:35:56 -07:00
Mitchell Hashimoto
506ba854fa core: font size changes work 2024-04-06 19:33:49 -07:00
Mitchell Hashimoto
f51dad445f core: add todo for next time 2024-04-06 10:56:21 -07:00
Mitchell Hashimoto
b8d11e57c9 renderer/Metal: change font size works again 2024-04-06 10:55:58 -07:00
Mitchell Hashimoto
ebd31ad50f font: SharedGridSet DerivedConfig does not take font size 2024-04-06 10:45:44 -07:00
Mitchell Hashimoto
b9efd83798 font: SharedGridSet uses DerivedConfig 2024-04-06 10:37:26 -07:00
Mitchell Hashimoto
07a5dd0442 config: FontStyle.clone 2024-04-06 10:28:57 -07:00
Mitchell Hashimoto
efb8146c28 config: RepeatableString.clone should clone all the strings too 2024-04-06 10:20:16 -07:00
Mitchell Hashimoto
00f677fd51 font: SharedGridSet locks and is thread-safe 2024-04-06 10:08:52 -07:00
Mitchell Hashimoto
a22ca8e4c1 renderer/opengl: clean up texture sync 2024-04-06 09:34:34 -07:00
Mitchell Hashimoto
45f518851d renderer/opengl: convert to SharedGrid, new windows/tabs are frozen 2024-04-05 22:00:51 -07:00
Mitchell Hashimoto
b77513de1a font/harfbuzz: work with new font structures 2024-04-05 21:48:53 -07:00
Mitchell Hashimoto
6aa659c4b5 renderer/metal: re-enable preedit rendering 2024-04-05 21:39:39 -07:00
Mitchell Hashimoto
2a06cf54ba core: App asserts the font grid set is empty on close 2024-04-05 21:28:50 -07:00
Mitchell Hashimoto
29b172b3ac renderer/metal: use new atlas APIs 2024-04-05 21:13:10 -07:00
Mitchell Hashimoto
de2b0f6857 font: Atlas updated to use monotonic ID 2024-04-05 21:10:10 -07:00
Mitchell Hashimoto
c45747bf1f font: implement many rendering, caching functions for SharedGrid 2024-04-05 20:50:35 -07:00
Mitchell Hashimoto
c88137d254 font/shaper: work on new grid APIs 2024-04-05 20:21:13 -07:00
Mitchell Hashimoto
90ea733cbd font: SharedGrid hasCodepoint 2024-04-05 19:07:45 -07:00
Mitchell Hashimoto
c99b27d364 font: SharedGrid.getIndex 2024-04-05 19:00:41 -07:00
Mitchell Hashimoto
329697779a renderer/metal: convert more 2024-04-05 18:51:26 -07:00
Mitchell Hashimoto
d6c048f1e3 renderer/metal: picking away at font group => grid changes 2024-04-05 15:35:16 -07:00
Mitchell Hashimoto
04e0cd29e5 core: begin converting to SharedGridSet, renderers still broken 2024-04-05 15:25:45 -07:00
Mitchell Hashimoto
4a29da3525 font: SharedGridSet clarify memory ownership 2024-04-05 15:15:30 -07:00
Mitchell Hashimoto
719c5d7c25 font: SharedGridSet starts 2024-04-05 15:03:22 -07:00
Mitchell Hashimoto
b9471f3791 font: SharedGrid setup test infra 2024-04-05 14:39:31 -07:00
Pete Schaffner
1bf05187a6 Merge remote-tracking branch 'upstream/main' into titlebar-unzoom-button 2024-04-05 21:15:45 +02:00
Pete Schaffner
620c0f9450 Fix new tab icon color not updating sometimes 2024-04-05 21:12:11 +02:00
Mitchell Hashimoto
35c4059f18 Merge pull request #1660 from mitchellh/macos-app
macos: wrap syncAppearance in async call
2024-04-05 10:05:32 -07:00
Mitchell Hashimoto
dd0ec492e4 macos: wrap syncAppearance in async call
Fixes #1656

When called as part of window restoration AppKit has a lock, so
NSAppearance changes need to be called async.

See deadlock:

```
Thread 1 Queue : com.apple.main-thread (serial)
0	0x000000018fd63fac in __ulock_wait ()
1	0x00000001069bf720 in _dlock_wait ()
2	0x00000001069bfaec in _dispatch_group_wait_slow ()
3	0x0000000106b5f5c4 in interposed_dispatch_group_wait ()
4	0x00000001937fb1f0 in NSCGSTransactionRunPreCommitActions_ ()
5	0x00000001938f1230 in -[_NSCGSTransaction synchronize] ()
6	0x00000001938f11ac in NSCGSTransactionSynchronize ()
7	0x000000019382ad30 in +[NSCGSWindow(NSCGSSpace) isAnyWindowOnAVisibleSpace:] ()
8	0x000000019382a968 in -[NSWindow _isInSomeVisibleSpace] ()
9	0x000000019382a8e4 in -[NSWindow isOnActiveSpace] ()
10	0x0000000193db8d98 in -[NSApplication(NSApplicationAppearance_Internal) _invalidateWindowAppearances] ()
11	0x00000001938f44d4 in -[NSApplication(NSAppearanceCustomization) setAppearance:] ()
12	0x0000000102c48050 in AppDelegate.syncAppearance() at /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/macos/Sources/App/macOS/AppDelegate.swift:412
13	0x0000000102c47840 in AppDelegate.configDidReload(_:) at /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/macos/Sources/App/macOS/AppDelegate.swift:380
14	0x0000000102c43c7c in AppDelegate.applicationDidFinishLaunching(_:) at /Users/mitchellh/code/go/src/github.com/mitchellh/ghostty/macos/Sources/App/macOS/AppDelegate.swift:110
```
2024-04-05 10:01:44 -07:00
Mitchell Hashimoto
9fb883666a font: start SharedGrid 2024-04-05 09:29:41 -07:00
Mitchell Hashimoto
88db80b7b0 font: CodepointResolver test box glyph 2024-04-05 09:29:41 -07:00
Mitchell Hashimoto
b2541d24f1 font: CodepointResolver style disabling test 2024-04-05 09:29:41 -07:00
Mitchell Hashimoto
4eccd42f6b font: CodepointResolver beginnings 2024-04-05 09:29:41 -07:00
Mitchell Hashimoto
bd479db09f font: Collection setSize 2024-04-05 09:29:41 -07:00
Mitchell Hashimoto
4d70859864 font: Collection autoItalicize 2024-04-05 09:29:41 -07:00