You are here: Home Support Coin FAQ Common problems fonts

I try to change the SoText2/SoText3 font, but nothing happens. Why, oh why?

The font support prior to Coin 2.1 was limited to a hardcoded font for both Text2 and Text3. TrueType 2D fonts support were implemented in Coin 2.1 and 3D fonts in Coin 2.2.

On Windows platforms, TrueType fonts are imported by utilizing the native support for this in the operating system. No such native TrueType support exists on UNIX and UNIX-like systems, so these platforms will use the FreeType library: http://www.freetype.org

If your requested font could not be found, try to set the environment variable COIN_DEBUG_FONTSUPPORT to 1. Extensive debug information will then be forwarded to the console. This includes info on which font library is being used, and whether Coin could locate the requested font or not, and where it looked.

When using the FreeType library, requested fonts will first be searched for in the working directory. The path specified by the COIN_FONT_PATH environment variable will then be searched. It is not possible to explicitly specify a font file when using the Win32 library as all font handeling must be done through the operating system.

For more information, please read the API documention on SoFont: http://doc.coin3d.org/Coin/classSoFont.html

Common problems
Resources