harfbuzz / harfbuzzjs

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

How to get or modify the font name table? #25

Closed yisibl closed 4 years ago

yisibl commented 4 years ago

Can you provide API to get and modify the font name table? This is very useful for icon font.

behdad commented 4 years ago

Use fonttools.

yisibl commented 4 years ago

Sorry, I am not sure what the positioning of harfbuzzjs is. However, there is still a lack of similar features in Node.js, which can help improve the performance of font processing. Fonttools cannot integrate well with Node.js, are there any plans to support it? Or where should I start to build the version with the name table?

behdad commented 4 years ago

Maybe you can tell is about what your use-case is, so we can (in Dilbert's terms) tell you how to do without what you are asking for.

yisibl commented 4 years ago

I need to generate different font files from SVG icon. Therefore, it is necessary to define the information of font related tables, such as various names, copyright information, etc. When the new SVG icon is added to the font, the version information needs to be updated.

harfbuzzjs already has glyphs available, which is great. If I can get these through harfbuzzjs, I can get rid of opentype.js completely.

This is a simple flow chart: image

khaledhosny commented 4 years ago

HarfBuzz is not a font editing library, you will need to use something else like FontTools (if you can use Python, or another JS library).

yisibl commented 4 years ago

@khaledhosny Thanks!