nanogui: how is the baseline value defined?


Previous by date: 18 Jul 2005 18:39:31 +0100 how is the baseline value defined?, Alexander Stohr
Next by date: 18 Jul 2005 18:39:31 +0100 Re: how is the baseline value defined?, Paul Bartholomew
Previous in thread: 18 Jul 2005 18:39:31 +0100 how is the baseline value defined?, Alexander Stohr
Next in thread: 18 Jul 2005 18:39:31 +0100 Re: how is the baseline value defined?, Paul Bartholomew

Subject: Re: [nanogui] how is the baseline value defined?
From: "Greg Haerr" ####@####.####
Date: 18 Jul 2005 18:39:31 +0100
Message-Id: <097e01c58bb6$9ba99c60$6401a8c0@winXP>

: sometimes it looks like the baseline value
: is measured from the bottom border of the
: bounding box and sometimes it looks like
: the measurement takes place from the top
: border of the bounding box. it depends on
: the current font. (sometimes it even looks
: like the whole text gets aligned to the 
: bottom border of a box with the given height
: when creating the font, regardless of the
: size of the selected font.)

The baseline value is supposed to be measured
from the top of the bounding box, and thus is
the same as ascent.  The descent, which is
not kept internally for MWCFONTs, is
measured from the baseline.  Thus, the height
of the font is equal to the baseline + descent,
or descent = height - ascent, since we
only keep height and ascent in the MWCFONT
structure.  For non-core fonts, this same
measurement applies, and an overriden gettextbits
or gettextsize would return the height and baseline
values.

The entire mechanism is meant to match X11's font
spec, although this was changed after the initial design
so its not completely implemented.

Regards,

Greg

Previous by date: 18 Jul 2005 18:39:31 +0100 how is the baseline value defined?, Alexander Stohr
Next by date: 18 Jul 2005 18:39:31 +0100 Re: how is the baseline value defined?, Paul Bartholomew
Previous in thread: 18 Jul 2005 18:39:31 +0100 how is the baseline value defined?, Alexander Stohr
Next in thread: 18 Jul 2005 18:39:31 +0100 Re: how is the baseline value defined?, Paul Bartholomew


Powered by ezmlm-browse 0.20.