Page 1 of 1

Problems with fonts

Posted: Fri Sep 07, 2018 7:34 am
by bx_joscha
Hello,

I am currently going through some trouble using fonts in VSTGUI. What I want to achieve is to use arbitrary TTF fonts in VSTGUI-based plugin editors without the need of having them installed in the system.

On Mac OS, I have managed to access the fonts by manually registering them to the operating system using the command CTFontManagerRegisterFontsForURL. That works perfectly fine.

How to do that on Windows? I am only able to use fonts that are stored in the system fonts folder. Is it possible to directly register fonts contained in the Resources that are compiled using a resource compiler, as we use PNG graphics from the resources by using FindResourceA in file win32support.cpp?

Thanks in advance,

Joscha

Re: Problems with fonts

Posted: Fri Sep 07, 2018 9:46 am
by Arne Scheffler
Hi Joscha,
for Direct2D it looks like IDWriteFactory::RegisterFontCollectionLoader () API could be used.

Cheers,
Arne

Re: Problems with fonts

Posted: Fri Sep 07, 2018 10:58 am
by bx_joscha
Arne Scheffler wrote:Hi Joscha,
for Direct2D it looks like IDWriteFactory::RegisterFontCollectionLoader () API could be used.

Cheers,
Arne
Thank you. I already thought about that option. I will try that.

Re: Problems with fonts

Posted: Fri Sep 07, 2018 11:58 am
by bx_joscha
Working now.