bugGNU Octave - Bugs: bug #41308, Win 7: FLTK can't do FontSize 20...


bug #41308: Win 7: FLTK can't do FontSize 20 -- but 19 or 21 is fine

Submitted by:  Felipe G. Nievinski <fgnievinski>
Submitted on:  Wed 22 Jan 2014 05:51:52 PM UTC  
Category:  Plotting Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Other
Status:  Duplicate Assigned to:  None
Originator Name:  Open/Closed:  Closed
Release:  dev Operating System:  Microsoft Windows

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


( Jump to the original submission)

Mon 21 Nov 2016 03:26:50 AM UTC, comment #13: 

Closing as a duplicate of bug #49216 as suggested, much more discussion and analysis being done there.

Mike Miller <mtmiller>
Project Administrator
Sat 19 Nov 2016 11:13:24 AM UTC, comment #12: 

This might be a duplicate (or vice versa) of an issue mentioned in bug #49216 (commment #42). Under Windows OS texts with Calibri font look scrambled in qt plots, see example in .

Hartmut <hardy>
Sun 16 Feb 2014 09:37:18 PM UTC, comment #11: 

Summary of sub-issues so far:
- FLTK can't do certain font sizes (confirmed only on Win 7)
- FLTK and gnuplot default font type is serif and sans, respectively
- FLTK and gnuplot interpret font size inconsistently; consequently, default font size may be too small in FLTK.

Felipe G. Nievinski <fgnievinski>
Sun 16 Feb 2014 12:47:16 AM UTC, comment #10: 

OK, here's a new set of pngs.

tmp = 'fltk';  fs = 10; % in pixels
%tmp = 'gnuplot';  fs = 7.5; % in points
  plot (1:10, 'o-')
  set(gca(), 'FontSize',fs);

it seems the fltk font is serif (Times?) while gnuplot uses a sans serif (Arial?).

Felipe G. Nievinski <fgnievinski>
Sun 16 Feb 2014 12:14:57 AM UTC, comment #9: 

The freetype-based rendered is using anti-aliasing. Glyphs are rendered using FT_RENDER_MODE_NORMAL, which is anti-aliasing, as described here [1].

If you want to compare to gnuplot, you should make sure you use the same font and the same size in both cases. Note that at the moment, octave always interpret font size as being a pixel size, which usually ends up with smaller text on screen, because gnuplot will interpret is as a point size (and today's screens use dpi > 72).

[1] http://www.freetype.org/freetype2/docs/reference/ft2-base_interface.html#FT_Render_Mode

Michael Goffioul <goffioul>
Sat 15 Feb 2014 11:49:39 PM UTC, comment #8: 

I think the following issue is related: the fonts used in fltk -- whatever size -- don't seem anti-aliased, compared to gnuplot.

I could submit a separate bug report or maybe the current title could be generalized.

Felipe G. Nievinski <fgnievinski>
Thu 23 Jan 2014 04:29:42 PM UTC, comment #7: 

Anyone with access to Windows 8 to test there?  It is at least a good start that it is localized to certain Windows distributions.

Rik <rik5>
Project Administrator
Thu 23 Jan 2014 03:35:46 PM UTC, comment #6: 

OK I can confirm this on (native) Win7, with 3.8.0 and a 4.1.0+ from a week ago.

It struck me that the script you gave to reproduce the issue hangs for a while during, or after, the first subplot line when run from the editor with F9 (I can't assess the exact moment). Did you also see that?
But this behavior (delay) is not very well reproducable..... didn't happen anymore after two or three trials. The garbled font however is very reliably reproduced.

As this is dependent on Windows version, I'm afraid sorting this one out might be hard & time consuming. Do you have a workaround?

Can you copy a font over from XP and try again? maybe it is just a Windows font issue.

<title adapted / release set to "dev">

Philip Nienhuis <philipnienhuis>
Project Member
Wed 22 Jan 2014 10:56:15 PM UTC, comment #5: 

the problem remains with other text, rotated or not.
the original font name returned "*".
setting it to "arial", "helvetica", etc. didn't help.
this is Win 7, if that matters.

Felipe G. Nievinski <fgnievinski>
Wed 22 Jan 2014 10:34:27 PM UTC, comment #4: 

Can't reproduce the OP's problem with my 3.8.0 MXE-built octave on Windows XP.
Screenshot attached.

What font did you use, Felipe?

Philip Nienhuis <philipnienhuis>
Project Member
Wed 22 Jan 2014 09:44:34 PM UTC, comment #3: 

Another thing to test is whether the problem is with ylabel, or with any text in general.

For example, does the following work?

subplot (3,1,2);
ht = text (1, 0.5, "e", "fontsize", 20);
set (ht, "rotation", 90)

Rik <rik5>
Project Administrator
Wed 22 Jan 2014 09:16:16 PM UTC, comment #2: 

neither resizing the window nor changing the font name helped... let's wait and see if others can replicated.

Felipe G. Nievinski <fgnievinski>
Wed 22 Jan 2014 06:49:06 PM UTC, comment #1: 

This works for me on Linux and Windows.

What happens if you resize the window by dragging a corner?  This forces a redraw which might be the problem.

Also, it might be the font that is used has bad metrics for the 20 point size.  What happens if you execute the following?

subplot (3,1,2)
hl = get (gca, "ylabel");
get (hl, "fontname")
set (hl, "fontname", "arial")

Rik <rik5>
Project Administrator
Wed 22 Jan 2014 05:51:52 PM UTC, original submission:  

graphics_toolkit fltk
subplot(3,1,1), plot(NaN), ylabel('e', 'FontSize',19)
subplot(3,1,2), plot(NaN), ylabel('e', 'FontSize',20)
subplot(3,1,3), plot(NaN), ylabel('e', 'FontSize',21)

pls see screenshot attached.

Felipe G. Nievinski <fgnievinski>


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

Attach Files:

Attached Files
file #30568:  fltk2b.png added by fgnievinski (11KiB - image/png)
file #30569:  gnuplot2b.png added by fgnievinski (17KiB - image/png)
file #30563:  fltk2.png added by fgnievinski (11KiB - image/png)
file #30564:  gnuplot2.png added by fgnievinski (14KiB - image/png)
file #30343:  untitled.png added by fgnievinski (14KiB - image/png)


   bug dependencies.

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 hardy (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by fgnievinski (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.




    Follow 13 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-11-21 mtmiller StatusConfirmed => Duplicate
        Open/ClosedOpen => Closed
        Dependencies- => Depends on bugs #49216
    2014-02-16 fgnievinski Attached File- => Added fltk2b.png, #30568
        Attached File- => Added gnuplot2b.png, #30569
    2014-02-15 fgnievinski Attached File- => Added fltk2.png, #30563
        Attached File- => Added gnuplot2.png, #30564
    2014-01-23 philipnienhuis StatusWorks For Me => Confirmed
        Release3.8.0 => dev
        SummaryFLTK can\'t do FontSize 20 -- but 19 or 21 is fine => Win 7: FLTK can't do FontSize 20 -- but 19 or 21 is fine
    2014-01-22 philipnienhuis Attached File- => Added fontsize_19-20-21.png, #30351
    2014-01-22 rik5 StatusNone => Works For Me
    2014-01-22 fgnievinski Attached File- => Added untitled.png, #30343

    Back to the top

    Powered by Savane 3.5