freetype-devel
[Top][All Lists]
Advanced

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

Re: [Devel] Getting accurate advances


From: Werner LEMBERG
Subject: Re: [Devel] Getting accurate advances
Date: Mon, 17 Nov 2003 16:53:10 +0100 (CET)

> Other similar code (producing rounded x_scale values) can be found
> at ftobjs.c line 2081

Do you mean this (y components omitted)?

  FT_Set_Pixel_Sizes( FT_Face  face,
                      FT_UInt  pixel_width,  
                      FT_UInt  pixel_height )
  {
    ...
    metrics->x_ppem = (FT_UShort)pixel_width;

    if ( face->face_flags & FT_FACE_FLAG_SCALABLE )
    {
      metrics->x_scale = FT_DivFix( metrics->x_ppem << 6,
                                    face->units_per_EM );

      ft_recompute_scaled_metrics( face, metrics );
    }
    ...

Isn't this already correct?  Here, x_ppem is indeed an integer value.

> pfrdrivr.c line 102,

Probably yes, but I have no idea how PFR fonts work.

> and ttdriver.c line 224.

Mhm, rather no.  This code modifies the x_scale value for the hinting
engine only, as far as I can see.  It doesn't influence
linearHoriAdvance.


    Werner



reply via email to

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