freetype-devel
[Top][All Lists]
Advanced

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

[ft-devel] truetype metrics resize request question


From: Steven Chu
Subject: [ft-devel] truetype metrics resize request question
Date: Sun, 10 Jul 2011 08:32:29 -0500

I've been working on a bug for webkit related to an odd behavior with the Ahem font in the Qt framework.  I tracked it down to Qt either receiving incorrect descent/ascent values from FT_Size_Metrics or using the Freetype library incorrectly.

When using FT_Set_Char_Size(face, width, height, h_res, v_res), should face->size->metrics have the proper values for all font types afterwards or is it necessary for Qt to handle knowing truetype fonts use ((TT_Size)face->size)->root.metrics instead?


If face->size->metrics is supposed to have proper values after calling FT_Set_Char_Size, then there is a bug in either ttdriver.c or ttobjs.c.

ttdriver.c line 248:
    if ( FT_IS_SCALABLE( size->face ) )
      error = tt_size_reset( ttsize );
will need to copy ttsize->metrics over to ttsize->root.metrics

or

ttobjs.c line 1057:
    metrics = &size->metrics;
will need to be
    metrics = &size->root.metrics;

are some potential fixes.

Thanks,
Steve

reply via email to

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