Menu

#2611 Cannot enable sans-serif fonts for "wxt" on high display scaling

None
open-upstream-bug
nobody
Windows 10 (3)
2023-03-30
2023-03-30
No

Running gnuplot 5.4p6 on Windows 10.

If I set the display scaling to 250% (or higher), I don't get sans-serif font in terminal "wxt".

I tried to set the font manually using

set term wxt font "Sans"

but this only triggered a message while plotting:
"warning: problem determining pango font metrics."

If I reduce the scaling below 250%, everything works as expected: "sans" font is used automatically, gnuplot issues no warnings.

More details and screenshots can be found here:
https://sourceforge.net/p/gnuplot/discussion/5925/thread/8bf27d79e9/?limit=25

Discussion

  • Daniel Dan K.

    Daniel Dan K. - 2023-03-30

    Screenshot showing plot window at 250% scaling

     
  • Tatsuro MATSUOKA

    To see errors or warnings from the pango, one should execute scipts or commands on gnuplot.exe but not on wgnuplot.exe (you perhaps did.)
    In case font size very big (e. g. canvas 3200, 2000, and font size 60) in the cairo based terminals (wxt, pangocairo etcs.) I noticed the following a pango warning.

    warning: problem determining pango font metrics
    

    or

    Pango-CRITICAL **: 10:37:00.302: pango_font_description_set_absolute_size: assertion 'size >= 0' failed
    

    and the plot was broken.

    If I execute setting the
    PANGOCAIRO_BACKEND
    environmental variable to fc
    The warning is disappeared and plot was good.

    The pangocairo with win32 (default on windows) backend seems to have problems at large scale or high resoution.

     

    Last edit: Tatsuro MATSUOKA 2023-03-31
  • Ethan Merritt

    Ethan Merritt - 2023-03-30
    • status: open --> open-upstream-bug
    • Group: -->
    • Priority: -->
     
  • Ethan Merritt

    Ethan Merritt - 2023-03-30

    My guess is that this is part of an on-going upstream problem with font handling by the pango, harfbuzz, and freetype libraries (they no longer play nicely with each other). Gnuplot problems are collateral damage. All I can suggest is to try different fonts, and maybe play with the "hinting" slider in the toolbox widget of the wxt terminal.

    Please see Tracker issues #2194 #2397 #2512

     

Log in to post a comment.