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.

The gcw device driver uses our plfreetype interface to the freetype library.
That interface needs further development to use fontconfig to greatly ease
the pain of font selection. For now, plfreetype simply uses the crude method
of specifying a directory for the TrueType fonts and the name of a font file
in that directory in order to get access to a particular kind of font. So
probably on your system, your fonts are installed in a directory or with
file names which are not the defaults expected by our interface.

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:

[EMAIL PROTECTED]> 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

Probably the most important of these variables is PL_FREETYPE_FONT_PATH.
For example if you change that variable using the cmake option

-DPL_FREETYPE_FONT_PATH:PATH=/YOUR/TrueType/font/location

that may be all you need to get access to your Truetype fonts.

To make sure you actually have TrueType fonts installed on your system, you
could try our xcairo device where the font selection is handled
automatically and smoothly by fontconfig.  If that works, then you should be
able to select the right mix of cmake -D options so that gcw works as well.
There is also a method where you can change the font directory and font file
names at run-time using environment variables, see the above URL.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to