harfbuzz / harfbuzz

HarfBuzz text shaping engine
http://harfbuzz.github.io/
Other
3.66k stars 591 forks source link

Partially instancing CFF appears to work, but outlines don't vary #4700

Open simoncozens opened 3 weeks ago

simoncozens commented 3 weeks ago
% hb-subset --variations=wght=400:900 --unicodes='*' Sans/Variable/OTF/NotoSansCJKjp-VF.otf -o regbold.otf
% shape regbold.otf abc
[gid66=0+563|gid67=1+618|gid68=2+510]

shape

(This is correct at 400 weight, but:)

$ shape regbold.otf abc --variations=wght=900
[gid66=0+606|gid67=1+658|gid68=2+537]

shape

Horizontal metrics have varied correctly, outlines have not.

I don't mind if it doesn't work yet, but it should give a warning or some indication to the user.

behdad commented 3 weeks ago

I thought I implemented this. Will take a look.

behdad commented 3 weeks ago

Oh nevermind. I implemented full instancing, not partial instancing IIRC. It's really complicated but doable...

@qxliu76 can you add a warning or error?