On Tue, May 03, 2005 at 00:34:36 +0200, Tobias Oetiker wrote: > the threshold bit sound cool ... > > the LCD bit might be a bit over the top :-) > > regarding the propperties ... you can make them properties of the > canvas like zoom for example ... the canvas gets passed to every > funtion already ... so you can take the information from there ... I've attached a new patch which adds -R/--font-render-mode {normal,light,mono} and -B/--font-smoothing-threshold size. Guess we'll save "lcd" for later ;) --font-render-mode=mono is included, even though it is effectively the same as --font-smoothing-threshold=inf. A canvas pointer had to be added to gfx_string_create() and gfx-get_text_width_libart(), but it's still a major improvement over the last version which changed functions all over. I also added a font size parameter to gfx_string_create; the font size can be extracted from the FT_Face object, but this requires knowledge of the resolution, which isn't stored in FT_Face. Currently, the resolution is hardcoded to 100 times the zoom (which is stored in the canvas), but it seemed cleaner to just add another parameter. --font-render-mode=light doesn't seem to be any different from "normal" when using the bytecode hinter, but maybe this is not the case for auto hinting. I changed FT_LOAD_DEFAULT in the call to FT_Load_Glyph() to FT_LOAD_TARGET_NORMAL in the default case, FT_LOAD_TARGET_LIGHT for "light" and FT_LOAD_TARGET_MONO for "mono". Hopefully this is the correct way, the freetype documentation is a bit confusing. Please test and see if it works. > You mean you would enable the bytecode hinter by default if one has > an bytecode enabled freetype ? The question is what happens to > normal fonts which do not come with handcrafted hinting > information, I guess there the autohinter might do a better job ... I had a look at the freetype docs, and it seems as if the only suitable option would be FT_LOAD_FORCE_AUTOHINT, but the documentation says that one "shouldn't need this in a typical application, since it is mostly used to experiment with its algorithm". As it is now (as well as before the patch), rrdtool never bothers about what hinting is used, it just accepts whatever the user compiled freetype with. Thus, implementing FT_LOAD_FORCE_AUTOHINT would be an entirely different patch. -- Attached file removed by Ecartis and put at URL below -- -- Type: text/plain -- Size: 10k (10969 bytes) -- URL : http://lists.ee.ethz.ch/p/fontsmoothing.patch -- Unsubscribe mailto:rrd-developers-request@list.ee.ethz.ch?subject=unsubscribe Help mailto:rrd-developers-request@list.ee.ethz.ch?subject=help Archive http://lists.ee.ethz.ch/rrd-developers WebAdmin http://lists.ee.ethz.ch/lsg2.cgi