googlefonts / fontc

Where in we pursue oxidizing (context: https://github.com/googlefonts/oxidize) fontmake.
Apache License 2.0
62 stars 10 forks source link

[g2fir] Handle magic '*origin' anchor #771

Closed cmyr closed 2 months ago

cmyr commented 3 months ago

I think this is the most principaled approach; we apply this delta in the conversion to IR, and drop the anchor then.

cc @anthrotype, does this seem reasonable to you? If yes let's try and figure out what a test case looks like?

rsheeter commented 3 months ago

If yes let's try and figure out what a test case looks like?

Naively this seems readily unit testable in glyphs2fontir/src/source.rs, is there a barrier to testing I'm missing?

cmyr commented 3 months ago

If yes let's try and figure out what a test case looks like?

Naively this seems readily unit testable in glyphs2fontir/src/source.rs, is there a barrier to testing I'm missing?

I want an end-to-end test that goes from 'source including *origin anchor' to 'mark compiled at correct position', and I want to be able to validate this against what glyphs is compiling for some sample source. Last we spoke cosimo was working on putting something like this together.

rsheeter commented 3 months ago

I want an end-to-end test

Agreed, but I don't think we need to block this PR on it. We could unit test the funcitonality here and then update it if the full compile test reveals problems.

cmyr commented 2 months ago

So after conversation with @anthrotype, I'm going to close this; I don't think it's the correct approach.