FS#17782 - [gnuplot] looks for fonts to wrong directory (solution included)
Attached to Project:
Arch Linux
Opened by Tomas Mudrunka (harvie) - Sunday, 10 January 2010, 18:54 GMT
Last edited by Ronald van Haren (pressh) - Monday, 11 October 2010, 08:38 GMT
Opened by Tomas Mudrunka (harvie) - Sunday, 10 January 2010, 18:54 GMT
Last edited by Ronald van Haren (pressh) - Monday, 11 October 2010, 08:38 GMT
|
Details
Description: getting this error message from gnuplot:
"Could not find/open font when opening font "arial", using internal non-scalable font" and then it produces ugly graph using bitmap font ;-) Additional info: * package version(s) latest * config and/or log files etc. SOLUTION #1: can be fixed using something like: 1 ;( harvie@harvie-ntb ~ $ sudo mkdir -p /usr/X11R6/lib/X11/fonts/ 0 ;) harvie@harvie-ntb ~ $ sudo ln -s /usr/share/fonts/TTF /usr/X11R6/lib/X11/fonts/truetype SOLUTION #2 (better): or you better should patch gnuplot sources using sed -e to look into the /usr/share/fonts/TTF instead of /usr/X11R6/lib/X11/fonts/truetype in PKGBUILD... Steps to reproduce: try gnuplot (not x11 version) or using wxplot2d() in wxMaxima... |
This task depends upon
Closed by Ronald van Haren (pressh)
Monday, 11 October 2010, 08:38 GMT
Reason for closing: Works for me
Monday, 11 October 2010, 08:38 GMT
Reason for closing: Works for me
I can't reproduce this problem:
$ pacman -Qs gnuplot
local/gnuplot 4.2.6-2
Plotting package which outputs to X11, PostScript, PNG, GIF, and others
$ gnuplot --version
gnuplot 4.2 patchlevel 6
$ gnuplot
G N U P L O T
Version 4.2 patchlevel 6
last modified Sep 2009
System: Linux 2.6.32-ARCH
Copyright (C) 1986 - 1993, 1998, 2004, 2007 - 2009
Thomas Williams, Colin Kelley and many others
Type `help` to access the on-line reference manual.
The gnuplot FAQ is available from http://www.gnuplot.info/faq/
Send bug reports and suggestions to <http://sourceforge.net/projects/gnuplot>
Terminal type set to 'wxt'
gnuplot> plot sin(x)/x
gnuplot> exit
I don't get any error-message and the plot looks okay. Coul you better describe what has to be done to reproduce this error if it really still exists? If it really still exists there's a environmental variable called GNUPLOT_FONTPATH which could be the correct solution.
see attachment.
Let me see if I can fix it sometime during the weekend.
From my understanding when calling from either of these apps, the x11 terminal is used by default. The gnuplot x11 terminal looks for ttf fonts in the path defined by the GDFONTPATH variable, which is by default undefined.
Calling gnuplot itself from the commandline defaults to the wxt terminal on my machine which uses pango/cairo to find fonts (and does so coorectly).
To get the x11 terminal find the fonts, this works for me:
export GDFONTPATH=/usr/share/fonts/TTF (of course you can source the variable any way you want)
after that calling wxmaxima and plotting for example "wxplot2d(sin(x), [x,-5,5]);" gives me correct output.
If you have another solution that works and is more convenient let me know, otherwise I suppose I can't do much about it.