bugGNU Octave - Bugs: bug #44512, text extent property has 0 width...

 
 

bug #44512: text extent property has 0 width and height when Octave built without Freetype

Submitter:  jpap <jpap>
Submitted:  Wed 11 Mar 2015 06:59:32 PM UTC
   
 
Category:  Plotting with gnuplot Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Wont Fix Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 3.8.2 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Fri 13 Mar 2015 08:15:06 AM UTC, comment #7: 

I can confirm that we are using freetype/fontconfig to compute the extent of text objects whether in fltk where it's relevant, or in gnuplot where we have no better option.

Marking this bug as "wont fix".

Pantxo Diribarne <pantxo>
Group Member
Fri 13 Mar 2015 04:04:43 AM UTC, comment #6: 

I can confirm the same as the reporter when I get the text extent in an Octave built without any Freetype or Fontconfig:


octave:1> plot (1:10);
octave:2> h = text (2, 2, "Hello, world");
octave:3> get (h, "extent")
ans =

   2.00000   2.00000   0.00000   0.00000


So this agrees with the bug as reported, updating the title to reflect that (and OS to any).

And doubtful that anything could be done about this, right?

Mike Miller <mtmiller>
Group Member
Thu 12 Mar 2015 04:27:53 PM UTC, comment #5: 

It is a known issue ... at least by me :-), sorry. I have made extensive use of text extent while implementing the annotation function, and texts are often misplaced when using gnuplot on linux also. I didn't ever meet 0 width and height though.


When I run the original example with fltk or gnuplot I obtain the very same extent, which I didn't expect. Over all, resizing the figure doesn't do anything on gnuplot while it expectedly changes the extent on fltk (font size doesn't change while the axes scale changes).

I didn't look into the relevant code but my guess is that we are using freetype to compute the extent in both cases.

@jpap: do you have fltk (and thus freetype/fontconfig) installed? If so can you test the example in fltk?


Pantxo Diribarne <pantxo>
Group Member
Thu 12 Mar 2015 03:55:58 PM UTC, comment #4: 

Pantxo,

I'm using the default terminal (GNUTERM env is empty).

When I explicitly set GNUTERM to one of {"qt", "x11", "wxt", "aqua"}, I get the exact same result, with both extent width and height equal zero.  (I have gnuterm compiled to support all of these terminals.)

If this is a known problem on OS X, is there a bug report tracking it?  (I couldn't find one through Bugs | Search.)

I'd love to see this fixed!

jpap <jpap>
Thu 12 Mar 2015 11:57:11 AM UTC, comment #3: 

Yes, it also works for me on Linux with Gnuplot with either GNUTERM=qt or GNUTERM=x11.

Mike Miller <mtmiller>
Group Member
Thu 12 Mar 2015 11:18:49 AM UTC, comment #2: 

using the script of the original submmission, with mxe-octave
4.0.0-rc1 in Win7, with gnuplot, the answer is

ans =

   2.00000   1.92989   0.22120   0.14023


Avinoam Kalma <avinoam>
Group Member
Thu 12 Mar 2015 06:49:10 AM UTC, comment #1: 

Hi,

Thanks for your bug report. The extent property is known to not work properly with gnuplot toolkit. As it may also depend on the terminal, the following returns

getenv ("GNUTERM")


Pantxo Diribarne <pantxo>
Group Member
Wed 11 Mar 2015 06:59:32 PM UTC, original submission:  

I'm always returned zero width/height for a text extent that's added to a plot.

Script included below to demonstrate.


figure(1), clf;
plot(1:5);
h = text(2,2, 'jpap');
get(h, 'extent')
ans =

   2   2   0   0


Judging by #33163, it looks like the extent used to work.

I'm using gnuplot 4.6p6.

jpap <jpap>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by avinoam (Posted a comment)
  • -email is unavailable- added by pantxo (Posted a comment)
  • -email is unavailable- added by jpap (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-03-14 mtmiller Open/ClosedOpen Closed
    2015-03-13 pantxo Item GroupRegression Incorrect Result
        StatusConfirmed Wont Fix
    2015-03-13 mtmiller StatusNone Confirmed
        Operating SystemMac OS Any
        Summarytext extent (on plot) is gives 0 width and height text extent property has 0 width and height when Octave built without Freetype

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code