[vtkusers] Using fontconfig with vtkTextMapper/vtkTextProperty?

Elvis Stansvik elvis.stansvik at orexplore.com
Thu Oct 20 08:48:23 EDT 2016

2016-10-20 14:06 GMT+02:00 Elvis Stansvik <elvis.stansvik at orexplore.com>:
> Hi,
> How can I load a system font through fontconfig and use it with
> vtkTextMapper/vtkTextProperty?
> I've called vtkFreeTypeTools::GetInstance()->ForceCompiledFontsOff(),
> but I can't find any API on vtkTextProperty to set a font family to
> use for a fontconfig-based search.

Am I supposed to pass the fontconfig family name (e.g. "Noto Sans") to
vtkTextProperty::SetFontFamilyAsString(..) ? I tried it but it didn't
seem to have any effect.

In fact, I just had a look at the build log for the Debian package I
built of 7.1.0.rc1, and it's not mentioning "FontConfig" at all (see
attached log). Does that mean my build doesn't have fontconfig
support? Must I enable the FreeTypeFontConfig module explicitly? (not
enough that fontconfig is found on the system?).


> Elvis

More information about the vtkusers mailing list