freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft] Vert advance on line break


From: Mickey Gabel
Subject: Re: [ft] Vert advance on line break
Date: Fri, 30 Jan 2009 09:38:02 +0200
User-agent: Thunderbird 2.0.0.19 (Windows/20081209)

Werner LEMBERG wrote:
* Distance (scaled distance) between two successive baselines should
be face->size->metrics->height.  This is the nominal height of the
line, in 26.6 format, and _is scaled_ to the current size of the
face.  The unscaled (font units) value is in face->size->height.

Yes, in case you are not interested to produce a customized layout for
typesetting purposes.

* line gap = height - (ascender - descender)

Yes.  `descender' is negative in the above formula if it is below the
baseline.

* The line gap is the space between the lines, where "nothing" is
* written (except with strange fonts, etc).

Yes.

* The "physical" height of the line (the area where most letters
would be expected) is (ascent - descent).

If the global ascender and descender values are set correctly, this is
always true.

Conclusion:
If I want an "exact" space of, say, 1.5 lines between each two lines
(no matter what the font design says) then I should ignore the FT2
height and use the following:

  my line gap               = (ascender - descender) * 1.5
  my height (baseline diff) = (ascender - descender) + my line gap

Exactly.  On the other hand, you might assume that a 10pt font (this
is, whatever the font returns if you select 10pt as the rendering
size) really fits into 10pt vertically -- at least more or less.  In
case this is not true it is arguable that the font is buggy.  Under
this assumption you have the choice of selecting a baseline distance
independently of the font.  TeX, for example, uses this approach; it
applies a factor 1.2 by default to get the baseline distance; for good
typography it is often useful to increase this factor up to 20%.  So
you could say:

  baseline diff = document font size
                  * default baseline factor (1.2)
                  * document specific adjustment (1 .. 1.2 normally)


    Werner


Thank you.
It might be a good idea to write some of the above in the glyph conventions or tutorial docs.

I know that technically the docs already say most of that, but I think it might be in a too "compressed" form since it looks like I am not the only one who didn't get it.

Actually this is becoming quite interesting. Are there any good sources on the internet, and also books regarding digital typography that you would recommend? A "for further reading" list might be nice. I bet a lot of things written in the books are actually quite different in practice :)

Mickey





reply via email to

[Prev in Thread] Current Thread [Next in Thread]