Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Pierre Arnaud <pierre.arnaud <at> opac.ch>
Subject: Re: Announcing Proximus Report Builder
Newsgroups: gmane.comp.graphics.agg
Date: Thursday 28th June 2007 18:13:19 UTC (over 10 years ago)
On Thursday, June 28, 2007 7:45 PM [GMT+1=CET],
Stephan Assmus  wrote:

> So basically, I get to chose between blurry text or a couple of
> whitespaces that are one pixel too large or too small? I think I go
> with the wrong whitespaces. :-) I don't understand why rounding
> errors would be a problem. Basically, it is a problem of "matching"
> the tweaked layout to the theoretically perfect layout. I don't see a
> reason why the final remaining error would not be less than one
> pixel. Maybe I am missing something, but I can't see it just now.

Assume that you output a glyph for the letter "i" which is exactly
2.4 pixel wide. If you grid-fit it using the hinter, you'd probably
get a 2 pixel wide shape. Assume that a space measure 4 pixels.

Now, imagine you display "iiiiiiiiii" (ten times the "i" glyph).
This would produce a word which occupies 20 pixels on screen, yet
the typographic position should move by 24 pixels. You end up adding
4 pixels to the following space, which doubles its size. This will
look strange on the screen.

Worse, if the "i" glyph measures 2.6 pixels, and the hinter decides
to grid-fit it to occupy 3 pixels, you'll occupy 30 pixels on screen
whereas the typographic position only advanced by 26 pixels. This
time, you get a -4 pixel error which completely eats away the space.

Another approach would be to position the "i" glyphs by rounding
their typographic position, which would lead us to use the following
x coordinates in the 2.4 pixel wide case :

x = 0 ----> 0   error =  0      width=2
x = 2.4 --> 2   error = -0.4    width=3
x = 4.8 --> 5   error = +0.2    width=2
x = 7.2 --> 7   error = -0.2    width=3
x = 9.6 --> 10  error = +0.4    width=2

The result is ugly :

.*.*..*.*..*
............
.*.*..*.*..*
.*.*..*.*..*
.*.*..*.*..*
.*.*..*.*..*

You get the idea... The "i" glyphs appear at irregular intervals.

These considerations made me choose the blurry output.

Pierre


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
 
CD: 3ms