RazrFalcon / rustybuzz

A complete harfbuzz's shaping algorithm port to Rust
MIT License
498 stars 34 forks source link

Run Apple tests in CI #113

Closed LaurenzV closed 1 week ago

LaurenzV commented 1 week ago

Nearly done, just one failing test case I need to investigate.

LaurenzV commented 1 week ago

@behdad Do you know whether it's a bug or "intended" that the following two commands yield different results?

hb-shape "/System/Library/Fonts/Supplemental/Devanagari Sangam MN.ttc" --unicodes U+092D,U+0941 --no-glyph-names
[160=0+1339|1324=0@-296,11+0]
hb-shape "/System/Library/Fonts/Supplemental/Devanagari Sangam MN.ttc" --unicodes U+092D,U+0941 --shaper=coretext --no-glyph-names
[160=0+1043|1324=0@0,11+296]

I'm not sure if passing --shaper=coretext is always supposed to have the same results.

EDIT: Ah, I guess while the numbers are different, the visual result itself should be the same.

RazrFalcon commented 1 week ago

So we did had one bug in ot_shape.rs, still way better then I was expecting. But I guess this code haven't changed since I last tested it.

Having our copy of macos.tests is meh. Can't we simply add some tests to the ignore list? And you have already added hash "support" to the Python script.

LaurenzV commented 1 week ago

So we did had one bug in ot_shape.rs, still way better then I was expecting. But I guess this code haven't changed since I last tested it.

Two more bugs actually. But yes, luckily not a lot of bugs.

Having our copy of macos.tests is meh. Can't we simply add some tests to the ignore list?

The thing is that some of the font paths changed apparently, meaning that we would lose many tests just because the font path changed, which would be kind of a waste... I don't think macos.tests changes often, so I hope it shouldn't be a big deal. It's not ideal, but certainly better than having no tests at all!

And you have already added hash "support" to the Python script.

Well, right now we basically ignore them, because as mentioned in the file I don't think we need to bother with running on different MacOS versions, we always run on MacOS 14 for now, and we use the output from harfbuzz as our test oracle. I think that is the cleanest approach for now.

LaurenzV commented 1 week ago

Alright, it works now. :D So we can merge this after https://github.com/RazrFalcon/ttf-parser/pull/157 is merged.

RazrFalcon commented 1 week ago

Ok, makes sense.

LaurenzV commented 1 week ago

Nice! I'll attempt to port the aat changes myself next, hopefully it will work.