Mitchell Hashimoto
435bd32cfd
font: SharedGridSet works without font discovery
2024-05-08 18:24:55 -07:00
Mitchell Hashimoto
3c882e364a
font: disable CJK unification fallback with freetype rasterizer
2024-05-08 12:18:35 -07:00
Mitchell Hashimoto
1cb70d6e40
font/coretext: force LTR shaping
2024-05-08 10:11:57 -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
91bcc3de39
font/coretext: choose proper original font for CJK search
2024-05-07 15:39:17 -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
851b1fe2ac
font: noop shaper
2024-05-01 20:31:50 -07:00
Mitchell Hashimoto
a8b97d4061
font/coretext: only pad shaped text ltr
2024-05-01 20:27:40 -07:00
Mitchell Hashimoto
6683b159ce
font/shaper: run hash should include font index
2024-05-01 19:53:27 -07:00
Mitchell Hashimoto
74236d2db6
renderer/metal: log some cache info
2024-05-01 19:49:22 -07:00
Mitchell Hashimoto
d7de26ef58
renderer/metal: integrate shaping cache
2024-05-01 19:01:08 -07:00
Mitchell Hashimoto
0a69615670
font/shaper: add Cache
2024-05-01 18:55:22 -07:00
Mitchell Hashimoto
81a12b0d86
font/shaper: add hash to text runs
2024-05-01 18:28:53 -07:00
Mitchell Hashimoto
f99823ec38
Merge pull request #1713 from BvngeeCord/main
...
sprites: dont thicken via font-thicken, add cursor thickness adjustment
2024-04-30 14:09:04 -07:00
Mitchell Hashimoto
1072354747
build: add -Dfont-backend=coretext_harfbuzz to force Harfbuzz w/ CT
2024-04-30 14:03:38 -07:00
Mitchell Hashimoto
6858646843
font/coretext: tests for #1721
2024-04-30 11:55:18 -07:00
Mitchell Hashimoto
313c7f4cf1
font: runs do not split on bg color change
...
We previously split text runs for shaping on bg color changes. As
pointed out in Discord, this is not necessary, since we can always color
cells according to their desired background even if the text in the cell
shapes to something else.
2024-04-30 11:23:41 -07:00
Gordon Cassie
e77f9962a8
revert on comment removal
2024-04-30 10:21:31 -07:00
Gordon Cassie
e564454ff1
More log statements.
2024-04-30 10:21:08 -07:00
Gordon Cassie
b76f5976ee
Remove unnecessary allocation.
2024-04-30 10:20:50 -07:00
Gordon Cassie
abd782a7aa
Fix typo.
2024-04-30 10:20:31 -07:00
Mitchell Hashimoto
9b4e362a33
font/coretext: shaping ligatures adds padding cells for replaced cells
...
Fixes #1708
Harfbuzz does this automatically. Our tests for harfbuzz test this. We
had a todo in CoreText to mimic this but wasn't sure if it was useful.
Turns out, it is important (see bug!)
2024-04-30 10:14:43 -07:00
Jack N
8c8f1b6fde
fix macos build
2024-04-22 23:35:48 -07:00
Jack N
346eba3152
sprites: dont thicken via font-thicken, + add cursor thickness adjustment
2024-04-22 20:35:23 -07:00
Mitchell Hashimoto
0f348e809e
font: strikethrough uses sprite rendering
2024-04-22 10:25:33 -07:00
Mitchell Hashimoto
13d9c0159d
font: SharedGridSet.Key needs to clone the DerivedConfig
...
Key contains pointers into DerivedConfig. Each surface has its own
DerivedConfig. This would cause memory corruption if the surface that
opened the initial font grid deallocates. Instead, let's make sure Key
owns its own DerivedConfig.
2024-04-11 13:04:23 -04:00
Mitchell Hashimoto
a1923c105c
Merge pull request #1671 from mitchellh/font-dpi
...
font: SharedGridSet must hash diff for font size change
2024-04-09 08:50:52 -04:00
Mitchell Hashimoto
f67c2b70a7
font: SharedGridSet must hash diff for font size change
...
Fixes #1670
This fixes two issues:
- If no font families are set, font points would not change the hash.
- DPI changes would not change the hash.
When the hash doesn't change when it should, we reuse a font stack due
to changes in #1662 . This would cause some font issues. :)
2024-04-09 08:45:01 -04:00
Mitchell Hashimoto
97a7c75437
Merge pull request #1669 from qwerasd205/fix-U+255D
...
font/sprite: Fix U+255D
2024-04-09 08:22:33 -04:00
Qwerasd
4b33f07b73
font/sprite: Fix U+255D
...
Double Up and Left '╝' previously had a hole in the bottom, extend line to fill gap.
2024-04-08 23:10:00 -04:00
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
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
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
2f61f7d6a3
font: fix hashing of descriptor strings
2024-04-06 19:49:14 -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
00f677fd51
font: SharedGridSet locks and is thread-safe
2024-04-06 10:08:52 -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
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