[HarfBuzz] How to perform full precision shaping (with no scaling and grid fitting)
Behdad Esfahbod
behdad at behdad.org
Wed Jul 11 16:02:16 PDT 2012
Hi,
I think I addressed the kerning issue. There are hinting issues outstanding
that I need to address later.
behdad
On 04/20/2012 09:16 AM, Petr Filipský wrote:
> Hi,
> I am trying to perform a shaping which is independent on a resulting device,
> so no scaling, no grid-fitting is desired.
>
> In order to disable the grid-fitting and get as high precision as possible I
> thought it was sufficient to work in the font design precision - to scale the
> font to some very high value (like the /UpEm/ value), i.e. using the following
> code:
>
> / hb_face_t* const face( hb_ft_face_create( ft_face, NULL ) );/
> / hb_font_t* font = hb_font_create( face );/
> / unsigned int const upem( hb_face_get_upem (face) );/
> / hb_font_set_scale( font, upem, upem );/
> /hb_ft_font_set_funcs( font );/
>
> But unfortunately it is not enough. The /hb_ft_get_glyph_h_kerning()/ function
> calls the /FT_Get_Kerning/ with kerning mode set to /FT_KERNING_DEFAULT/, and
> for example for /Arial font/ and /'T'/ and /'a'/ character pair (55 and 68
> glyph indices) it returns value -256 (instead of correct value -227). It if
> the scaling seems correct the function still performs some fitting. If i try
> to change the kerning mode to FT_KERNING_UNSCALED then I get the correct value
> (-227) but that is probably not a proper fix but just a hack.
>
> Is there an elegant and efficient way to disable both scaling and fitting and
> perform a device independent full precision shaping?
>
> Thank you very much.
>
> Kind regards,
> Petr
>
>
>
>
> _______________________________________________
> HarfBuzz mailing list
> HarfBuzz at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/harfbuzz
More information about the HarfBuzz
mailing list