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.
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.
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