On 7/18/08, Alan W. Irwin <irwin@beluga.phys.uvic.ca> wrote:
Hi Martin:

On 2008-07-18 13:45+0200 Martin Sarajervi wrote:

Hi,

I can't get any labels on my plots when using plplot_canvas. I keep getting
warnings when I start the demo program (plplotcanvas_demo.c).

I get the following errors:


(foo.x:23374): GnomePrint-CRITICAL **: file gnome-font-face.c: line 801
(gnome_font_face_get_font_default): assertion `face != NULL' failed

[...]For information, I have truetypesupport in my plplot compilation. Anyone
have any idea what could cause this problem?

I am guessing a bit because you didn't specify your PLplot version or what
platform you are running on, but I assume you are building and running our
latest release, 5.9.0, or even the svn trunk version of PLplot and probably
running on Linux or MacOS X rather than Windows.
 
 
I run the latest release-version on Linux.


There are a multitude of configuration options to choose your font files for
drivers like gcw that use plfreetype.

I was just going to refer you to
http://plplot.sourceforge.net/docbook-manual/plplot-html-5.9.0/characters.html
for documentation, but it needs updating. For example, I noticed it refers
to ./configure --help which is a historical artifact that is no longer valid
for our CMake-based build system.  Instead, look at the results in
CMakeCache.txt in your build tree for the relevant information.

Here is just the start of those results on my system:

software@raven> grep PL_FREE CMakeCache.txt |head -10
PL_FREETYPE_FONT_PATH:PATH=/usr/share/fonts/truetype/freefont
//Font file for PL_FREETYPE_MONO
PL_FREETYPE_MONO:FILEPATH=FreeMono.ttf
//Font file for PL_FREETYPE_MONO_BOLD
PL_FREETYPE_MONO_BOLD:FILEPATH=FreeMonoBold.ttf
//Font file for PL_FREETYPE_MONO_BOLD_ITALIC
PL_FREETYPE_MONO_BOLD_ITALIC:FILEPATH=FreeMonoBoldOblique.ttf
//Font file for PL_FREETYPE_MONO_BOLD_OBLIQUE
PL_FREETYPE_MONO_BOLD_OBLIQUE:FILEPATH=FreeMonoBoldOblique.ttf
//Font file for PL_FREETYPE_MONO_ITALIC
 
The thing is, the truetypefonts works fine when I do normal plots (not using the gnome2 canvas).
I have the same result from the grep (only with another PATH that I have specified). In that dir I have placed fonts
FreeMono*, FreeSans*, FreeSerif*. I did download these manually and place them there, but again, it works fine when plutting without gcw (I get smooth truetype/"freetype" fonts on the labels).
This is the main reason for me suspecting something gcw specific, does gcw expect some different fonts or odoes it have any other compile parameters that I may have missed?
 
/Martin