linebender / piet

An abstraction for 2D graphics.
Apache License 2.0
1.26k stars 94 forks source link

piet-coregraphics font weight problems #383

Open eulerdisk opened 3 years ago

eulerdisk commented 3 years ago

Running test-picture in compare mode agains the snapshots dir for piet-coregraphics gives me a lot of differences. Basically all the tests with fonts are different. Maybe most of them are differences due to the GPU, but in test 14 seems like font weight isn't working at all.

MacOS 10.14.6 MacBook Air mid 2012 (Intel HD graphics 4000)

test-images.zip

cmyr commented 3 years ago

These definitely change based on hardware and OS, because some of these fonts are not shipped on all OSes. For this reason the generated images include a GENERATED_BY file that includes the OS version and other relevant details.

It's also likely that your MacBook has different default settings because it doesn't have a 'retina' display; for instance it might be that sub-pixel anti-aliasing is on by default, where it is off in CI.

Example 14 uses a variable font, so that won't work on older OSes, but I would expect it work on 10.14.x, so that's a bit of a mystery. 😕

summing up: I think everything here is expected except for the missing bold on example 14, which I'm confused about.