octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Freetype font warning


From: Ben Abbott
Subject: Re: Freetype font warning
Date: Sat, 22 Jan 2011 16:39:11 -0500

On Jan 22, 2011, at 4:22 PM, David Bateman wrote:

> Ben Abbott wrote:
>> On Jan 22, 2011, at 5:58 AM, logari81 <address@hidden> wrote:
>> 
>> 
>>> I think that freetype will be at some point in the future a prerequisite
>>> for octave anyway, even when using gnuplot, just for estimating text
>>> extents.
>>> 
>> 
>> Good point.
>> 
>> 
> This is what I tried with the legend code. Trying to estimate the text
> extents with FreeType when for example gnuplot is using something else
> (gd, etc) gives pretty poor results. This is why I ended up treating the
> gnuplot legends  with the gnuplot legend functionality rather than using
> an overlaid axis with appropriate line and text objects.
> 
> Kostas, if you figure out a way to get good text extents for gnuplot
> I'll applaud and then go and make the gnuplot legend code much simpler.
> However, I think it'll be really hard to get it right, and probably the
> only way is to have gnuplot modified to supply the means to give them to us.
> 
> D.

A half-measure which I'm interested in looking at is to ...

(1) have an estimate for the text extents when using the gnuplot backend.
(2) leave the legend code as it is if the estimate isn't good enough
(3) implement the tightinset and position/outerposition properties in the 
Matlab manner (should be less problematic than legend).
(4) use gnuplot's "offset" parameter for the axis labels to shift the labels 
from their nominal positions. For this the gnuplot backend would need to have 
the estimated location of the axis labels to be available even when the user 
has changed the position property.

The expect the result would render nicely. The only worry I have is when 
yticklabels are specified using a cell array of strings. Especially, if it has 
TeX content.

So as not to confuse anyone, I have no personal plans to look at 1-3, but have 
looked 4. It looks trivial to me.

Ben



reply via email to

[Prev in Thread] Current Thread [Next in Thread]