Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Can I change the path of the fonts folder in a portable install? (Read 1685 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Can I change the path of the fonts folder in a portable install?

I've converted Tedgo's DarkOne theme to a portable and I'm wondering if I can somehow have an internal fonts directory instead of using the default Windows Fonts Directory. It can be done with images but I can't figure out how to do it with fonts.

I tried this below but it doesn't work.
Quote
var configPath = fb.FoobarPath + "themes\\DarkOne_v4.0\\";
var fontPath = configPath + "Fonts\\";

var btp_font = gdi.Font(fontPath + "Roboto", 11, 0);
or
var btp_font = gdi.Font(fontPath + "Roboto.tff", 11, 0);


Any ideas? Thanks.

 

Re: Can I change the path of the fonts folder in a portable install?

Reply #1
No, that will never work. The gdi.Font function expects a font name only.

edit: it actually loads 2 fonts internally and I won't bore you with the details of how/why it does that but here's the documentation for one of the methods used...

https://docs.microsoft.com/en-us/windows/win32/api/wingdi/nf-wingdi-createfontw