Pomax / lib-font

This library adds a new Font() object to the JavaScript toolbox, similar to new Image() for images
MIT License
734 stars 72 forks source link

Merge with plumin? #29

Closed davelab6 closed 4 years ago

davelab6 commented 9 years ago

I still think JavaScript needs a Font object, but at this point rewriting it from scratch so that it's backed by OpenType.js is far more sensible

You know, http://www.pluminjs.com provides a Font() object. Maybe merging the details of this into plumin is best?

Pomax commented 9 years ago

Hmm, the "what they do" seems drastically different between the two, though. Plumin is about "an actual font", whereas this Font is pretty much identical in function and intended use as the JavaScript Image or Audio objects, in this case for font resource loading with event hooks so the browser can trigger things when they can be reasonably expected to succeed, but that's it.

Much like how Image will let you get image dimensions and mime type, but won't let you edit the pixels without a canvas, or how Audio won't let you edit the stream without a dps.js or something, this Font object will let you access some obvious metadata about the font, and about text in that font, but won't let you edit the resource data itself, needing you to do that yourself using OpenType.js or Plumin or the like.

Pomax commented 4 years ago

obsolete with the 2019 rewrite, which is more of a true parser than a convenience object (even though it has a limited number of convenience functions)