freetype-devel
[Top][All Lists]
Advanced

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

Re: [ttf2pt1-devel] Re: FreeType front-end in ttf2pt1 - a new snapshot


From: Werner LEMBERG
Subject: Re: [ttf2pt1-devel] Re: FreeType front-end in ttf2pt1 - a new snapshot
Date: Wed, 11 Oct 2000 19:14:46 +0200 (CEST)

[I've CC'ed the devel list; the latest version of the ttf2pt1
converter (TTF->PS) now contains FreeType support.]

> > May I ask that you give us a list of what you need, what disturbs
> > you, what fails, etc.?
> 
> One of the things that still fails is that FT_Glyph_Get_CBox()
> ignores the flag FT_LOAD_NO_SCALE used when loading the glyph.  Also
> apparently the fixed point arithmetic in it has a bug, shifting
> right by extra 6 bits. So to get things properly scaled I have to
> use
> 
>   FT_Set_Char_Size(face,  0, face->units_per_EM<<6, 1<<6, 1<<6)
> 
> (note that both point size and resolution are shifted by 6 bits).

It's a bug in the documentation (I've fixed it right now).  Here a
small example how to get the CBox in FUnits:

  (void)FT_Init_FreeType(&library);
  (void)FT_New_Face(library, "pala.ttf", 0, &face);
  (void)FT_Load_Glyph(face, 788, FT_LOAD_NO_SCALE);
  (void)FT_Get_Glyph(face->glyph, &glyph);
  (void)FT_Glyph_Get_CBox(glyph, ft_glyph_bbox_unscaled, &cbox);

ft_glyph_bbox_pixels should only be used for scaled glyphs (this info
is missing); for unscaled glyphs, 0 is the right value.  I've
introduced a new enum `ft_glyph_bbox_unscaled = 0'.
  
> The Type1 loader by some reason finds the Unicode encoding
> which just can't be in a plain Type1 font.

Please give more details.

> The FT_Get_Sfnt_Name() call is not compiled in by default (and I'm 
> not sure how to compile it at all).

This is an omission in the makefile.  Also fixed.

> Also I think it would be good if some other typical variables such
> as version string or copyright notice would be accessible in a
> format-indepent way, without using *Sfnt*.

Indeed.  The very question is whether FreeType should do that or a
library on top of FreeType.


    Werner



reply via email to

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