Fltk toolkit: how to force *non*-anti-aliased operation

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Fltk toolkit: how to force *non*-anti-aliased operation

Rose Merry
Hello!

Octave version 4.0.3 (Debian Stretch; sorry, didn't check latest version).

I do not want modern and beautiful anti-aliasing (AA). How to force all fltk graphics to be non-anti-aliased?

For gnuplot everything is already non-anti-aliased, out of the box. Font name and size can be changed using:
set(0,'defaultaxesfontname','terminus');
set(0,'defaultaxesfontsize',12);
set(0,'defaulttextfontname','terminus');
set(0,'defaulttextfontsize',12);
plot(1:N);
title(['wfevew']);

But when I do it in fltk, I get garbage (tried several sizes, that do work for gnuplot):
http://img12.lostpic.net/2018/02/10/f059025c75419074cb77ebe4cce4c6e7.png

Also, the blue plot line is AA-ed.

Thanks.

-----------------------------------------
Join us March 12-15 at CERN near Geneva
Switzerland for OctConf 2018.  More info:
https://wiki.octave.org/OctConf_2018
-----------------------------------------
Reply | Threaded
Open this post in threaded view
|

Re: Fltk toolkit: how to force *non*-anti-aliased operation

Pantxo
Rose Merry wrote

> Hello!
>
> Octave version 4.0.3 (Debian Stretch; sorry, didn't check latest version).
>
> I do not want modern and beautiful anti-aliasing (AA). How to force all
> fltk graphics to be non-anti-aliased?
>
> For gnuplot everything is already non-anti-aliased, out of the box. Font
> name and size can be changed using:
> set(0,'defaultaxesfontname','terminus');
> set(0,'defaultaxesfontsize',12);
> set(0,'defaulttextfontname','terminus');
> set(0,'defaulttextfontsize',12);
> plot(1:N);
> title(['wfevew']);
>
> But when I do it in fltk, I get garbage (tried several sizes, that do work
> for gnuplot):
> http://img12.lostpic.net/2018/02/10/f059025c75419074cb77ebe4cce4c6e7.png
>
> Also, the blue plot line is AA-ed.
>
> Thanks.
>
> -----------------------------------------
> Join us March 12-15 at CERN near Geneva
> Switzerland for OctConf 2018.  More info:
> https://wiki.octave.org/OctConf_2018
> -----------------------------------------

Hi,

Your example works for me in Octave 4.2, glyphs are rendered correctly. Is
"terminus" the only problematic font ?

In Octave 4.2+ the figure property "graphicssmoothing" controls wether
anti-aliasing is applied when rendering lines and polygons. As for text, it
is currently not possible, the text/axes property "textsmoothing" that
should control AA is not implemented.


Pantxo



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html


-----------------------------------------
Join us March 12-15 at CERN near Geneva
Switzerland for OctConf 2018.  More info:
https://wiki.octave.org/OctConf_2018
-----------------------------------------
Reply | Threaded
Open this post in threaded view
|

Re[2]: Fltk toolkit: how to force *non*-anti-aliased operation

Rose Merry
Thank you for the graphicssmoothing clarification! That's cleared (though I didn't try myself).

As to garbled glyphs.

Here's the output of octave for those lines:
>> set(0,'defaultaxesfontname','terminus');
>> set(0,'defaultaxesfontsize',16);
>> set(0,'defaulttextfontname','terminus');
>> set(0,'defaulttextfontsize',16);
>> plot(1:2);
warning: ft_render: unable to set font size to 10
warning: called from
    newplot at line 199 column 11
    plot at line 221 column 9
warning: ft_render: unable to set font size to 10
warning: ft_render: unable to set font size to 10
warning: ft_render: unable to set font size to 10
warning: ft_render: unable to set font size to 10
>> title(['wfevew']);
>>

Octave (old, 4.0.3) tries to set size to 10, independently of my size request, 12, or 16. In xfontsel this size, 10, is not offered.

As to other fonts. I can't understand how to properly search (what program and keyword to use) for non-AA fonts. "apt-cache show xfonts-terminus" doesn't show any keywords. "xfontsel" shows "clean" font (fixed-width; by zooming a screenshot, I verified it to be non-AA-ed), but in octave I get variable-width, AA-ed font instead (and no warnings). My "Terminator" terminal doesn't offer this "clean" font. (so, may be this is why I get garbled glyphs -- font just is not recognized by octave)

Could someone tell me please -- how to search for non-AA fonts for use with (fltk) Octave?

As an offtop, I noticed fltk uses *color* anti-aliasing in the user-interface. Something that (imho) should never be. Zoomed: http://img12.lostpic.net/2018/02/20/84db67fa61d53eeb9a92fdce014dfdd7.png (although, I'd never noticed it without zooming, so practically speaking -- looks fine)

-----------------------------------------
Join us March 12-15 at CERN near Geneva
Switzerland for OctConf 2018.  More info:
https://wiki.octave.org/OctConf_2018
-----------------------------------------