[rrd-developers] Re: --no-antialiasing and LINEx patches [was: Unsigned chars and optind]

Tobias Oetiker oetiker at ee.ethz.ch
Mon May 2 22:00:18 MEST 2005


> Thanks for fixing this, as well as the other issues.
> I have a suggestion for the new LINEx-code though: Currently it
> accepts whatever sscanf( "%lf" ) accepts, which is a bit too liberal.
> For example, "LINEinf" appears to eat memory like crazy.
>
> See attachment linewidth.patch for a suggested change. I used isnan()
> and isinf() since those should be the most compatible ones. Allowing
> width = 0 is probably a good thing (error message and code disagreed
> in previous version), even though it doesn't make much sense for PNG
> it has a special meaning for EPS (thinnest possible line).

I have included this patch ...


> > not for the graphics as fahr as I know.
> OK, maybe a future version of libart will allow non-anti-aliased
> graphics.

:-)

>
> > The fonts on the other hand could be drawn
> > non antialiased if freetype was called appropriately ... I will be
> > glad to accept a patch wich adds an appropriate option to rrdgraph
> I've attached a patch that adds --no-antialiasing/-B. It's my first
> non-trival patch to rrdtool, so I might have screwed something up. In
> particular, I saw no solution except adding an extra argument to the
> gfx_*text*-functions. Perhaps they should use a single
> textoptions-struct (specifying font, size, tabwidth and so on) to make
> future patches cleaner?

Yes, on the other hand in this case I guess there is no need to
have different antialiasing propperties on a single canvas, I would
rather like to see this added as a property of the canvas, and
while we are at it, why not add a more generic option where once
can select how freetype should render the font ...
--font-render-mode={normal,light,mono}

this would fight the option explosion

> In rrd_gfx.c, gfx_save_png(), I think:
>    font_alpha = *(bit->bitmap.buffer + iy * bit->bitmap.width + ix);
> should be changed to
>    font_alpha = *(bit->bitmap.buffer + iy * bit->bitmap.pitch + ix);
> (However, this change is not included in the patch.)

fixed this in svn ...

> The patch doesn't update the documentation, I wasn't sure how to do
> that (is .pod the source for both .txt and .html?). I'm not sure about
> the option name either, perhaps it ought to reflect the fact that it
> only disables anti-aliasing for the text?

you have to update the *.pod files ...

> Finally, I should also say that using freetype's (patent-free)
> "auto-hinting" created readable but extremely ugly output for me.
> Should the documentation to --no-antialiasing mention that enabling
> freetype's bytecode interpreter (if allowed by ones jurisdiction)
> makes the output look better? (Of course, this applies to anti-aliased
> output as well, but smoothing makes it less apparent.)
>
> Please test the patch it and see if it works!

using currrent versions of freetype I have stopped using the
bytecode interpreter because the output looks so good ... but if
you can provide a patch for

--font-hinter={none,bytecode,auto}

I will be glad to include it too ... (with documentation)

cheers
tobi


> -- Attached file removed by Ecartis and put at URL below --
> -- Type: text/plain
> -- Size: 509 bytes
> -- URL : http://lists.ee.ethz.ch/p/linewidth.patch
>
>
> -- Attached file removed by Ecartis and put at URL below --
> -- Type: text/plain
> -- Size: 13k (13876 bytes)
> -- URL : http://lists.ee.ethz.ch/p/noantialiasing.patch
>
>
> --
> Unsubscribe mailto:rrd-developers-request at list.ee.ethz.ch?subject=unsubscribe
> Help        mailto:rrd-developers-request at list.ee.ethz.ch?subject=help
> Archive     http://lists.ee.ethz.ch/rrd-developers
> WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi
>

-- 
 ______    __   _
/_  __/_  / /  (_) Oetiker @ ISG.EE, ETL F24.2, ETH, CH-8092 Zurich
 / // _ \/ _ \/ /  System Manager, Time Lord, Coder, Designer, Coach
/_/ \.__/_.__/_/   http://people.ee.ethz.ch/oetiker +41(0)44-632-5286

--
Unsubscribe mailto:rrd-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:rrd-developers-request at list.ee.ethz.ch?subject=help
Archive     http://lists.ee.ethz.ch/rrd-developers
WebAdmin    http://lists.ee.ethz.ch/lsg2.cgi



More information about the rrd-developers mailing list