sile-typesetter / sile

The SILE Typesetter — Simon’s Improved Layout Engine
https://sile-typesetter.org
MIT License
1.68k stars 99 forks source link

Add support for alternate shaper: allsorts #1188

Open alerque opened 3 years ago

alerque commented 3 years ago

I currently believe our current default shaper of harfbuzz is far and away the best choice. However I'm not quite so sure SILE's usage of it is as clean an implementation as it could/should be. There are multiple places where we make deep calls into Harfbuzz internals that I think should be abstracted though the shaper API.

More as an exercise in cleaning up SILE's architecture than anything else, bringing support for an alternative shaper (at least up to the capability limits of that shaper) up to speed should be a good step. As a bonus it might even be useful to Font developers and shaper engineers as a testing platform.

To this end, one candidate would be allsorts.

See also #1187 for rustybuzz.

ctrlcctrlv commented 3 years ago

I think allsorts support would be more useful than rustybuzz, personally.

alerque commented 3 years ago

I tend to agree ;-) Especially since rustybuzz's goal is to be API compatible with Harfbuzz, it doesn't particularly further the goal of understanding whether our shaper interface is good or not.

ctrlcctrlv commented 3 years ago

@alerque Right, exactly. Meanwhile, allsorts is meant to be an entirely new shaper. Also, I find allsorts' code more readable and its analogous tools to hb-shape more useful.