Skip to content

Conversation

@jacobsandlund
Copy link
Contributor

@jacobsandlund jacobsandlund commented Jan 15, 2026

This PR incorporates the recent changes made to CoreText in the following PRs:

Tests have been added verifying the behavior. Below are all the changes in shaping from the above PRs but now using HarfBuzz.

Tai Tham vowels (#9883)

Browser:

ᨯᩰ

Before:

(Note that this worked correctly with the old logic for HarfBuzz in contrast to CoreText)

CleanShot 2026-01-15 at 09 50 50@2x

After:

CleanShot 2026-01-15 at 09 51 07@2x

Tibetan characters (discussion #8054)

Browser:

Before (with Noto Serif Tibetan):

CleanShot 2026-01-16 at 09 28 32@2x

After:

CleanShot 2026-01-16 at 09 28 46@2x

Tai Tham ligature (#10179 and #10295)

Browser:

ᩉ᩠ᨿᩩ

Before:

CleanShot 2026-01-15 at 09 57 30@2x

After:

CleanShot 2026-01-15 at 09 57 44@2x

Javanese ligature (#10295)

Browser:

ᩉ᩠ᨿᩩ

Before:

CleanShot 2026-01-15 at 09 59 04@2x

After:

CleanShot 2026-01-15 at 09 59 23@2x

Chakma ligature (#10295)

Browser:
𑄝𑄖𑄳𑄠𑄬

Before:

CleanShot 2026-01-15 at 10 00 31@2x

After:

CleanShot 2026-01-15 at 10 00 52@2x

Bengali ligature (#10295)

Browser:
রাষ্ট্রে

Before:
CleanShot 2026-01-15 at 10 02 16@2x

After:
CleanShot 2026-01-15 at 10 02 32@2x

Devanagari string (test changed in #10295)

Browser:
अपार्टमेंट

Before:

CleanShot 2026-01-16 at 09 31 45@2x

After:

CleanShot 2026-01-16 at 09 32 06@2x

AI disclaimer

I used Amp to copy the logic from CoreText, but had to help it along. I took over after I noticed the different behavior with HarfBuzz's default cluster level.

Adopt CoreText changes to HarfBuzz shaper
Rename debug_codepoints, explore HarfBuzz alternatives
Fix cluster indexing in codepoints array

@jacobsandlund jacobsandlund marked this pull request as ready for review January 16, 2026 14:40
@jacobsandlund jacobsandlund requested a review from a team as a code owner January 16, 2026 14:40
@mitchellh mitchellh added this to the 1.3.0 milestone Jan 16, 2026
@mitchellh
Copy link
Contributor

Ran CI with some real failures!

@jacobsandlund
Copy link
Contributor Author

Ah shoot, I thought it passed locally. I'll check tomorrow! Might be time for me to invest in a linux laptop

@jacobsandlund
Copy link
Contributor Author

Okay, yeah, I confirmed running zig test -Dfont-backend=coretext_harfbuzz on my mac passes. I've been planning on getting a linux laptop for a while, so I think I'll do that now and then address the failures once I get it (making them pass on both linux and mac), instead of messing with a linux VM or partition. I'll mark this as draft for now.

@jacobsandlund jacobsandlund marked this pull request as draft January 17, 2026 14:30
@mitchellh
Copy link
Contributor

I use a Linux VM on Mac to great success. Running tests you can do with any provider but running the GUI requires VMware due to OpenGL 4.3

@danielwe
Copy link
Contributor

I can run the GUI no problem in my UTM/QEMU Linux VM on a mac host. Just select virtio-gpu-pci as GPU and install virtio drivers on the guest.

@jacobsandlund
Copy link
Contributor Author

Okay, I'll look at running a linux VM on Tuesday!

@jacobsandlund
Copy link
Contributor Author

Taking a bit to get set up on linux and also work's been busy. Maybe I'll be up and running tomorrow, if not early next week

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants