freetype-devel
[Top][All Lists]
Advanced

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

Re: Freetype BETA6 documentation for the FT_BitmapGlyphRec struct...


From: David Turner
Subject: Re: Freetype BETA6 documentation for the FT_BitmapGlyphRec struct...
Date: Fri, 26 May 2000 09:54:19 +0200

Hi Paul,

> 
> Small Freetype BETA6 comment:
> 
> The documentation for the FT_BitmapGlyphRec struct omits
> the description of what 'left' and 'top' are (see copy below).
> 
I have updated the documentation in the source code. Basically,
"left" and "top" are the left-side and top-side bearing for the
bitmap, expressed in integer pixels, with positive values for
upwards Y coordinates..

But you probably already figured this by a small test on your own :-)
Thanks for the report anyway,

Cheers,

- David

> I bumped into this because I am looking for a way to tell the
> ascender, descender, and height values for a rendered
> 'FT_GlyphRec'. I could take the values from the face struct
> and convert them, but I need the values to be exactly in line
> with the rendered glyph and am not sure that doing a conversion
> of face data would yield pixel perfect results.
> 
> Paul
> 
>  /***********************************************************************
>   *
>   * <Struct>
>   *    FT_BitmapGlyphRec
>   *
>   * <Description>
>   *    A structure used to describe a bitmap glyph image..
>   *    Note that the FT_BitmapGlyph type is a pointer to FT_BitmapGlyphRec
>   *
>   * <Field>
>   *    metrics  :: the corresponding glyph metrics
>   *    bitmap   :: a descriptor for the bitmap.
>   *
>   * <Note>
>   *    the "width" and "height" fields of the metrics are expressed in
>   *    26.6 sub-pixels. However, the width and height in pixels can be
>   *    read directly from "bitmap.width" and "bitmap.height"
>   *
>   *    this structure is used for both monochrome and anti-aliased
>   *    bitmaps (the bitmap descriptor contains field describing the
>   *    format of the pixel buffer)
>   *
>   *    the corresponding pixel buffer is always owned by the BitmapGlyph
>   *    and is thus creatde and destroyed with it..
>   *
>   ***********************************************************************/
> 
>   typedef struct FT_BitmapGlyphRec_
>   {
>     FT_GlyphRec  metrics;
>     FT_Int       left;
>     FT_Int       top;
>     FT_Bitmap    bitmap;
> 
>   } FT_BitmapGlyphRec_, *FT_BitmapGlyph;



reply via email to

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