photopea / Typr.js

Typr.js - process fonts in Javascript
MIT License
914 stars 73 forks source link

Consolidated fixes #35

Closed fredli74 closed 4 years ago

fredli74 commented 4 years ago

Various fixes I have made for a typescript version I use in my own projects. I have tried to isolate pure Typr.js fixes and make them as un-intrusive as possible for easier merging.

fredli74 commented 4 years ago

According to opentype specs, multiple GPOS adjustments on the same pair should be accumulated. This also corrects a bug I introduced in efb1f66efa9fe09089812621f0229a06df2f2b66

lojjic commented 4 years ago

@fredli74 As you've probably seen, Typr.js has moved on to a WASMified Harfbuzz implementation for most layout features, so there seems there's no chance of your fixes getting back in to the primary branch here.

I personally still have need of the pure JS implementation, and I'd like to get your fixes (particularly the ones in getPairAdjustment), so I'm trying to figure out how best to go about that. I see these options:

Thoughts?

photopea commented 4 years ago

Guys, our old code was buggy, and this pull request could probably make it a little less buggy.

I really think you should switch to HarfBuzz, if you render anything non-trivial. I think you should not care about browsers without WASM support, as they are slowly disappearing (and you should help them disappear faster by making WASM mandatory).

lojjic commented 4 years ago

Different tools for different use cases and all that.

Should I take your response as not being interested in a maintenance branch in this repo?

photopea commented 4 years ago

No, I would like to have just one branch here. You can make and maintain your own branch.

lojjic commented 4 years ago

Fair enough, thanks for considering. :)

@fredli74 would you be interested your fork becoming the canonical maintenance branch? Otherwise, I will create a fork myself, but fewer forks is better IMO.

fredli74 commented 4 years ago

I actually do not use typr.js to render complete text paths but to convert fonts into a proprietary font format. Moving forward, I will continue to need the OpenType font table lookups and things like getPairAdjustment. So maybe this is where we part ways? ☺️

@lojjic Sure, you pull, I pull, either way, is fine by me. As you maybe noticed, my master is the typescript wrapper and the typr.js branch is the pure js forked version with fixes.