Open thedamon opened 4 years ago
Yah this is totally possible, and shouldn't be too hard to do just by looking at what the patcher does and maybe also what the powerline font patcher does, it should be possible to only copy a subset of characters. I don't plan on implementing this though, but you can if you want to.
If you are making a Javascript component and using underlines, I recommend just inserting underline tags since that will be slightly more seamless and lightweight, and work with any font. But if you specifically want fake commas that aren't part of the text when copy-pasted then you may need a font.
Yes I am more concerned with commas than underlines. This approach would solve a few issues really nicely:
First of all this is an amazing idea.
I am intrigued by the notion of using this for UI facing inputs. There are many potential ways to solve thousands separators with javascript, but they pose many complications that a font-based solution completely and utterly removes. The added complication of managing what font is being used is many orders of magnitude more straightforward.
However... in a case where we're using a licensed font, running a fontfile through a patcher is potentially illegal! I was thinking an alternative would be to bake a custom font with similar numbers based on an open source font into a component, but ideally JUST a subset of characters that will be needed. An option to specify characters would allow this while using the patcher would be awesome so that a frontend component could bundle with it a much lighterweight font (There is probably a way to do it separately as well, but I have very little experience with open type fonts)