harfbuzz / harfbuzzjs

Providing HarfBuzz shaping library for client/server side JavaScript projects
https://harfbuzz.github.io/harfbuzzjs/
Other
197 stars 34 forks source link

CFF support is not enabled #58

Closed yisibl closed 2 years ago

yisibl commented 2 years ago

Open: https://harfbuzz.github.io/harfbuzzjs/

Use Font

WenYue_YingHei-JF.otf.zip

(index):75 Error: <svg> attribute viewBox: A negative value is not valid. ("12000 12000 -24000 -24000")

image

khaledhosny commented 2 years ago

This is a font with CFF table and hb.wasm is not built with CFF support, so getting glyph path and extents are not supported. Enabling CFF support increases the file size by about 40KB, so I’m not sure if we want to do this.

khaledhosny commented 2 years ago

Thinking more, I’m leaning towards enabling this by default. People who are more file size-conscious should build their own hb.wasm with modified override file to fit their needs.

yisibl commented 2 years ago

Yes, in Node.js it doesn't matter much about the size of the wasm file.

Maybe it's possible to build two versions, one with CFF?

papandreou commented 2 years ago

A "kitchen sink" build sounds like a good idea, also when it comes to other potentially useful features that might not make the cut otherwise.

behdad commented 2 years ago

A "kitchen sink" build sounds like a good idea, also when it comes to other potentially useful features that might not make the cut otherwise.

I agree a full build would also be interesting.