On 7/21/08, Alan W. Irwin <irwin@beluga.phys.uvic.ca> wrote:
On 2008-07-21 08:47+0200 Martin Sarajervi wrote:

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).

Just to confirm you have set up your fonts correctly, please give the exact
results of the above command on your system, and also the results of ls on
the absolute path directory pointed to by PL_FREETYPE_FONT_PATH.  IOW, do
not cd to the directory, simply execute

ls /usr/share/fonts/truetype/freefont

or whatever your exact PL_FREETYPE_FONT_PATH is.

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?

Which device gives you good-looking fonts?  The point is some of the devices
use fontconfig (where system fonts are found automatically) and some use
plfreetype (like gcw where you may have to go to some trouble to access your
fonts). In particular, do you get good-looking results for -dev png (which
also uses plfreetype)?

I just tried -dev gcw for myself using both examples/c/x01c -dev gcw and
examples/c/plplotcanvas_animation _in the install_ directory, and the fonts
looked good.

I frankly cannot remember whether there were any bugs in gcw or plfreetype
in our latest release that have been fixed in the svn trunk version, but
that version (which is what I use) is pretty stable at the moment so you
might want to try that following the directions at
http://sourceforge.net/svn/?group_id=118417

Also, could you give your Linux distribution name and version and
libfreetype version?  I am grasping at straws here, but it is possible your
problems may have to do with the particular version of libfreetype that you
have and nothing to do with PLplot.
 
Ok, here we go with some debugging information:

masar@dwarflin /h/masar/plplot-5.9.0/Compilation> grep PL_FREE CMakeCache.txt
| head -10
PL_FREETYPE_FONT_PATH:PATH=/h/masar/sfd
//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


masar@dwarflin /h/masar/plplot-5.9.0/Compilation> ls -l /h/masar/sfd
total 3536
-rw-rw-r--  1 masar masar 128384 Oct  8  2003 FreeMonoBoldOblique.ttf
-rw-rw-r--  1 masar masar 175016 Oct  8  2003 FreeMonoBold.ttf
-rw-rw-r--  1 masar masar 175484 Oct  8  2003 FreeMonoOblique.ttf
-rw-rw-r--  1 masar masar 293572 Oct  8  2003 FreeMono.ttf
-rw-rw-r--  1 masar masar  95508 Oct  8  2003 FreeSansBoldOblique.ttf
-rw-rw-r--  1 masar masar  91432 Oct  8  2003 FreeSansBold.ttf
-rw-rw-r--  1 masar masar 110740 Oct  8  2003 FreeSansOblique.ttf
-rw-rw-r--  1 masar masar 264072 Oct  8  2003 FreeSans.ttf
-rw-rw-r--  1 masar masar 126456 Oct  8  2003 FreeSerifBoldItalic.ttf
-rw-rw-r--  1 masar masar 198992 Oct  8  2003 FreeSerifBold.ttf
-rw-rw-r--  1 masar masar 154900 Oct  8  2003 FreeSerifItalic.ttf
-rw-rw-r--  1 masar masar 621136 Oct  8  2003 FreeSerif.ttf

I now tried the following:

./x01c -dev png

this one outputs just fine, all labels in place with truetypefonts.

./x01c -dev gcw

same problem, GnomePrint-Critical warnings, and no labels are displayed. I run
all this from the src code dir, that is /h/masar/plplot-5.9.0/Compilation/examples/c. Once I run an example file that dosnt have any text I dont get any warnings with -dev gcw either. (for example x30c)

Your link leads to the svn information for FreeEOS? I suspect you mean I
should try to grab the svn version of plplot?

In my compilation of plplot I have FREETYPE_INCLUDE_DIR=/usr/include/freetype2
and FREETYPE_LIBRARY=/usr/lib64/libfreetype.so.

masar@dwarflin /usr/include/freetype2/freetype/config>
/usr/bin/freetype-config --version
9.7.3

Im running on a Redhat Enterprise WS, Release 4. Could it be some kind of
linking problem with my gcw driver on compile? Also I dont have root access on
this box, so my make install is in /h/masar/plplot-5.9.0/Compilation.

On compile I get one error that im not sure what means, maybe it could be an
issue:

[......]
-- checking for module 'pango'
--   found pango, version 1.6.0
--static: unknown option
--static: unknown option
--static: unknown option
--static: unknown option
--static: unknown option
--static: unknown option
--static: unknown option
-- checking for module 'pangoft2'
--   found pangoft2, version 1.6.0
--static: unknown option
--static: unknown option
--static: unknown option
--static: unknown option
--static: unknown option
--static: unknown option
--static: unknown option
-- Found LTDL: /usr/lib64/libltdl.so;/usr/lib64/libdl.so
-- checking for module 'libgnomeprintui-2.2'
--   found libgnomeprintui-2.2, version 2.8.0
--static: unknown option
--static: unknown option
--static: unknown option
--static: unknown option
--static: unknown option
--static: unknown option
--static: unknown option
-- Found GD: /usr/lib64/libgd.so
[......]


/Martin