|
From: Manfred S. <man...@gm...> - 2009-02-19 13:39:29
|
> On Wednesday 18 February 2009 09:41:44 Manfred Schwarb wrote: > > > > > On Wednesday 18 February 2009 05:13:09 Manfred Schwarb wrote: > > > > > > > > your change in term/png.trm of > > > > "revision 1.130, Thu Nov 20 06:14:41 2008 UTC" set "arial" as the > > > > font default. > > > > > > > > Now, I can't select the builtin fonts any more. > > > > I tried > > > > "set term png small" > > > > "set term png small font small" > > > > "set term png font small" > > > > > > > > but I always get Arial as the selected font. > > > > How to select the builtin fonts? > > > > > > Why would you ever want to? > > > > > > > > > 1) Because I want to be able to shoot myself into the foot? > > > > 2) Because I don't want blurred text in an otherwise unblurred > > plot? I really want terminal-font quality in a pixel plot. > > So why not set the font to whatever you are using in your terminal? > How to do? You can only select Truetype fonts. E.g. I'd like to set the font to the "6x13" terminal font, and something like "set term png font '6x13'" does not work, as expected. > > Otherwise I would use vector output (i.e. ps-terminal) and > > convert the resulting vector plot into png. This way I would > > get homogeneous "blurring". > > So for me the question is really > > "Why would you ever want to NOT to?" (for a pixel terminal). > > It sounds to me that you might have a font problem external to > gnuplot per se, but I don't know what it might be. > > > 3) For 90 degree rotated text, font quality for non-builtin > > fonts is really bad. > > That makes no sense to me at all. The font rendering in libgd > is identical in the two cases. All that the rotation changes is the > order in which text pixels are copied across onto the image canvas. > 90-rotated text should be pixel-for-pixel identical to unrotated text. > If it isn't, this sounds like a bug that should be filed against libgd > rather than against gnuplot. > > > I can send examples if you like. > > Please do. Please also provide the script that generated them, > and the version number of libgd against which gnuplot is linked. > Probably a good idea to send them to the libgd list also. > I suspect it is a generic issue (or perhaps I simply expect too much from font rendering machines). I tested with pngcairo, and I got the same artefact. It's like there is a too coarse or skewed color gradient when rendering the characters, I don't know. libgd and libcairo are reasonably new, I guess (2.0.36 and 1.4.10). I will attach some plot snipplets to this email, for builtin, ttf and cairo. The upper strings are done with "set label" in combination with "splot", the lower ones are plotted with "set label" in a "plot" plot. The upper labels seem to be of higher quality than the lower ones, somehow. Please ignore the bad text alignment in the plots, just look at the characters themself. > > 4) If you want to produce light-weight plots for e.g. web applications > > (i.e. the fewer bytes the better) you really want to avoid > > such truetype fonts. > > Possibly. But I am curious about the weight of that argument. > Can you provide some numbers that demonstrate a significant difference > in the output file sizes? If I compare the output of a 'typical' plot > from the demo set using "verdana,9" as compared to the "medium" built-in > font, I get a difference of about 400 bytes out of 8000. I would gladly > pay that price, because to my eyes the built-in font is both ugly and > harder to read. You have said that your eyes disagree, and I believe you. > On the other hand, if you are exporting your plots to the rest of the > world then the question is what does a typical viewer think about it? > I realize that discussion of font preferences can degenerate into > intractable differences of opinion, but you must be aware that many > people prefer anti-aliased text. > Size: in a plot with moderate amount of labels, I get: ttf -> builtin: -15% ttf -> cairo: +40% For the attached snipplets, the size differences are much bigger. > > > Font problems are the most common cause for complaint or requested > > > support with regard to the png terminal. Neither enhanced text nor > > > internationalization work with the built-in fonts. The rationale > > > for the change you point to was to make it as hard as possible to > > > end up with the built-in fonts. I consider them as only a last > > > resort to be used in desperation. > > > > > > > Hmm, setting the default is one thing. Taking away the choice is > > another thing. > > If you always want to use the gd built-in fonts, then it seems to > make sense to simply remove GDFONTPATH from the environment in > which your web applications run. > Yes, this works for me. Thanks, Manfred > > > > > Cheers, > > Manfred > > > > > > > > > Having said that, I would think you could defeat the search for > > > arial.ttf by clearing the GDFONTPATH environmental variable. > > > And you can certainly set the default font to something other than > > > arial. For example, if you want a mono-spaced font you could set > > > GNUPLOT_DEFAULT_GDFONT to Courier (postscript font) > > > or couri (ttf equivalent). > > > > > > -- > > > Ethan A Merritt > > > > -- > Ethan A Merritt -- Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger01 |