[vtk-developers] Using system fonts on Windows (fontconfig equivalent?)

Elvis Stansvik elvis.stansvik at orexplore.com
Tue Apr 11 04:45:19 EDT 2017

Hi all,

Cross-posting since I'm not sure if vtkusers@ or vtk-developers@ is
most appropriate for this.

On Linux, I'm using the vtkRendereringFreeTypeFontConfig module, so
that I can use system fonts (e.g. for charts labels et.c). The goal is
to make VTK fonts match those used by Qt, so I'm using
QFontDatabase::system(...) to query for the user's preferred font, and
then use that in my VTK code. This is all working quite well.

I'm now porting the application to Windows. Does VTK have any support
for loading system fonts on Windows? Something similar to the
vtkRendereringFreeTypeFontConfig, but for whatever font backend
Windows uses?

If not, has anyone had luck in building fontconfig for Windows, and
using the vtkRendereringFreeTypeFontConfig module there? (I'm not even
sure if fontconfig has support for hooking into Windows' font backend,
so this may not be a solution at all).

Many thanks in advance,

More information about the vtk-developers mailing list