[Bug 219608] print/freetype2 produces incorrect line spacing for some fonts

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon Jun 5 18:25:05 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=219608

--- Comment #12 from lightside <lightside at gmx.com> ---
(In reply to comment #11)
> I tries the two line patch, but the excess spacing problem returned.
> Looks like !error test fails and the latest patch is an effective noop.
Strange, because it works in my case.

I may recommend to close all mate-terminal instances and open it again for
test. Possible, that previous libfreetype2.so library used from memory. Compare
with some screenshot from 2.7.1 version for the same mate-terminal profile, for
example.

As about the "if ( !error )" check, it used before access to
ttsize->metrics->x_ppem in 2.8 version, for example:
http://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/src/truetype/ttdriver.c?h=VER-2-8#n357
-8<--
    if ( FT_IS_SCALABLE( size->face ) )
    {
      error = tt_size_reset( ttsize, 0 );

#ifdef TT_USE_BYTECODE_INTERPRETER
      /* for the `MPS' bytecode instruction we need the point size */
      if ( !error )
      {
        FT_UInt  resolution =
                   ttsize->metrics->x_ppem > ttsize->metrics->y_ppem
                     ? req->horiResolution
                     : req->vertResolution;
-->8-

The 2.7.1 doesn't have such check:
http://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/src/truetype/ttdriver.c?h=VER-2-7-1#n355
-8<--
    if ( FT_IS_SCALABLE( size->face ) )
    {
      error = tt_size_reset( ttsize );
      ttsize->root.metrics = ttsize->metrics;

#ifdef TT_USE_BYTECODE_INTERPRETER
      /* for the `MPS' bytecode instruction we need the point size */
      {
        FT_UInt  resolution = ttsize->metrics.x_ppem > ttsize->metrics.y_ppem
                                ? req->horiResolution
                                : req->vertResolution;
-->8-

The alternative method is to check for "if ( ttsize->metrics )", which also
worked.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-gnome mailing list