design-tokens icon indicating copy to clipboard operation
design-tokens copied to clipboard

Font weights are not extracted from custom font

Open healtheloper opened this issue 1 year ago • 1 comments

Thanks for making such a great plugin.

I am using custom fonts, Everything is fine, but the font weight is not extracted correctly.

When I looked at the code, it looks like my fonts are now in the format Font 1 Thin, Font 2 ExtraLight which is why it is not extracting properly.

I'll send a PR with a fix for this if needed.

healtheloper avatar Apr 30 '24 13:04 healtheloper

Hey, the code that does this is here: https://github.com/lukasoppermann/design-tokens/blob/main/src/extractor/extractFonts.ts#L24

if your font uses a different naming system, you can add it via a PR.

lukasoppermann avatar May 03 '24 09:05 lukasoppermann