Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 292458 - sci-visualization/gnuplot: set default environment variables for fonts
Summary: sci-visualization/gnuplot: set default environment variables for fonts
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Ulrich Müller
URL: http://www.gnuplot.info/faq/faq.html#...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-09 00:03 UTC by Christopher Harvey
Modified: 2009-11-11 19:52 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Harvey 2009-11-09 00:03:52 UTC
The link in the URL section of this bug pretty much explains the whole problem. The font env variables aren't set by this e-build, so each user has to figure out what's going on, find the FAQ, then set the env variables locally. 

Reproducible: Always

Steps to Reproduce:
1. emerge octave  (depends on gnuplot)
2. plot some data  (in octave)
3. print("examplePlot.png", "-dpng")


Actual Results:  
Plot with no text

Expected Results:  
plot with text

I use 

export GDFONTPATH=/usr/share/fonts/freefont-ttf/
export GNUPLOT_DEFAULT_GDFONT=FreeMono

in .bashrc as a work around.
Comment 1 Ulrich Müller gentoo-dev 2009-11-10 09:28:17 UTC
Gnuplot should fallback to its internal font. Doesn't it do that for you?

> export GDFONTPATH=/usr/share/fonts/freefont-ttf/
> export GNUPLOT_DEFAULT_GDFONT=FreeMono

I'm reluctant to add such settings since it would require additional dependencies (media-fonts/freefont-ttf for your example).
Comment 2 Christopher Harvey 2009-11-11 01:26:11 UTC
(In reply to comment #1)
> Gnuplot should fallback to its internal font. Doesn't it do that for you?
> 


No, not for sci-visualization/gnuplot-4.2.6 anyway...Maybe we can just mark this bug as ignore and people will see the bug report and that will be enough. 
Comment 3 Ulrich Müller gentoo-dev 2009-11-11 19:47:59 UTC
Not really a fix, but I've added the following einfo message to pkg_postinst:

+   if use gd; then
+       echo
+       einfo "For font support in png/jpeg/gif output, you may have to"
+       einfo "set the GDFONTPATH and GNUPLOT_DEFAULT_GDFONT environment"
+       einfo "variables. See the FAQ file in /usr/share/doc/${PF}/"
+       einfo "for more information."
+   fi