freetype-devel
[Top][All Lists]
Advanced

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

RE: [ft-devel] Glyph bitmap size question


From: Graham Asher
Subject: RE: [ft-devel] Glyph bitmap size question
Date: Thu, 15 Nov 2007 20:51:53 -0000

Mark,

point size is font design size in point units (~1/72in). Design size is a
notional size that is usually at least as tall as the distance from the top
of a normal ascender (e.g., of 'h') to the bottom of a descender (e.g., of
'g') but is not guaranteed to be equal to the metrics of any glyph. And
non-Latin fonts may not contain h's and g's.

The real definition of the design size of a typeface is recursive, or rather
leads to a regression: a 12pt typeface is a typeface that is designed to
harmonise with other 12pt typefaces.

You can guess with great confidence that (say) the letter 'H' is going to be
somewhat shorter than the design size of a typeface (and make sure that the
units are the same - if comparing the height of a glyph in pixels, convert
the design size to pixels) but there are no guarantees of the ratio between
these two dimensions - it depends on the 'cut of the font'.

I would like to gently suggest some heavy googling for typographic
terminology and custom and practice, and use of Wikipedia.... it's all out
there. Also, read The TeXBook by Donald Knuth, which explains typographic
terms very well.

Best regards,

Graham Asher


-----Original Message-----
From: Mark Jackson [mailto:address@hidden 
Sent: 15 November 2007 20:35
To: Graham Asher
Cc: address@hidden
Subject: Re: [ft-devel] Glyph bitmap size question

So how come (in my case) it's *more* than the point size ?

I understand that with a descender, the bitmap rows may be bigger than 
the point size, but I thought the point size was the height of a normal 
capital letter (or am I completely wrong !?!).

Does the DPI setting make a difference ?  Should I use 72 or 96dpi 
instead of 100 ?

Mark

Graham Asher wrote:
> Yes - the number of rows is the height of the glyph bitmap in pixels,
which
> is usually less than the point size and need never equal it.
>
> Graham
>
>
> -----Original Message-----
> From: address@hidden
> [mailto:address@hidden On
> Behalf Of Mark Jackson
> Sent: 15 November 2007 20:25
> To: address@hidden
> Subject: [ft-devel] Glyph bitmap size question
>
> When I render the letter 'R' (or any other capital letter with no 
> descenders) into a glyph using ...
>
> FT_Set_Char_Size(ftFace, 24 * 64, 0, 100, 0);   // set 24 point size @ 
> 100dpi
> ftSlot = ftFace->glyph;
> FT_Load_Char(ftFace, text[n], FT_LOAD_RENDER);
> nRows = ftSlot->bitmaps.rows;
>
> should I expect nRows to equal the point size, i.e. 24 ?
>
> If not, why not ?  Am I missing some crucial way in which the fonts are 
> rendered ?
>
>   





reply via email to

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