Closed Kubrix closed 4 months ago
Issue reopened. Can I NOT force user to install additional fonts?
That's a monogame limitation, not specific to geonbit.ui. I think you can pre build the spritefont and provide the xnb files with copy action instead of build, pretty sure that would work.
Ps be sure to use monospace fonts, or some features may not work properly.
not specific to geonbit.ui.
Ok but with https://github.com/rds1983/Myra/wiki i just provide .ttf with my prohgram and load fonts like this: https://github.com/FontStashSharp/FontStashSharp/wiki/Using-FontStashSharp-in-MonoGame-or-FNA#basic-usage
So i dont have to install them
Looks cool! You can use that lib to load the font and set the Resources instance fonts:
https://github.com/RonenNess/GeonBit.UI/blob/master/GeonBit.UI/Source/Resources.cs#L269
Didn't try it but I think it should work. That said, it would be a lot more easier to just pre-build your font, since you won't really utilize all the cool features FontStashSharp actually provides.
Please also look at the open PR's https://github.com/RonenNess/GeonBit.UI/pull/138 and https://github.com/RonenNess/GeonBit.UI/pull/139.
You can use the font path in your .spritefont.xml like this:
<FontName>../../../../Fonts/Bitstream Vera Sans Mono Bold.ttf</FontName>
I want to use my own fonts and use GeonBit UI. Is that possible? I dont want to force end-user to install fonts - i have them in /Fonts subfolder