msdf-bmfont-web icon indicating copy to clipboard operation
msdf-bmfont-web copied to clipboard

[Enhancement] Use a default charset if one is not defined

Open dsinni opened this issue 6 years ago • 3 comments

For those who are unsure of what characters they will need, it would be beneficial to use a default character set without the user having to type all characters out manually.

Just a thought.

Thanks for yet another great tool.

dsinni avatar May 06 '18 02:05 dsinni

Thanks for making this awesome tool! I had the same need today for an A-Frame project using a custom font. I ended up writing a quick Ruby one-liner to produce a string containing all ASCII printable characters:

 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~

In case it's helpful, here's the code which could be modified to handle any other hex codes for other languages or character sets (note that it includes space (0x20); not sure if this is needed for an MSDF font definition):

puts (0x20..0x7E).map(&:chr).join

subelsky avatar Nov 06 '19 18:11 subelsky

This would be great, possibly better if there was a default list of different languages/character sets to add.

2xAA avatar May 28 '21 09:05 2xAA

If you're looking for MSDF fonts with a complete ASCII character set, an archive like https://github.com/etiennepinchon/aframe-fonts might be what you want.

For several common languages, having the entire alphabet in an MSDF font is much too large to be practical, and that's basically why this tool exists - to make it very easy to create subsets with the necessary characters.

I don't think I am interested in maintaining lists of all characters for various languages myself, but if someone would like to create such a list I'm happy to link to it.

donmccurdy avatar May 28 '21 16:05 donmccurdy