Ticket #55626: patch-revert-lineheight.2.diff

File patch-revert-lineheight.2.diff, 3.4 KB (added by RJVB (René Bertin), 7 years ago)
  • ChangeLog

    commit bcc74f4dafee25ea89f1d3144646cba7e30f9908
    Author: Werner Lemberg <wl@gnu.org>
    Date:   Thu Mar 30 13:14:43 2017 +0200
    
        [truetype] Allow linear scaling for unhinted rendering (#50470).
        
        * src/truetype/ttdriver.c (tt_size_request): Revert change from
        2011-07-16; the intended metrics fix seems now to be implemented in
        a different way, making the patch unnecessary.  Note that this
        change was usually patched out by all major GNU/Linux distributions
        due to heavy side effects.
        
        * src/truetype/ttgload.c (compute_glyph_metrics, TT_Load_Glyph):
        Refer to the metrics of the `TT_Size' object.
    
    diff --git ChangeLog ChangeLog
    index f6de03c78e954a163969fc5fbdb4b0509e3da7c9..18555a6c4f62c5b69923c67076e09eca59b44541 100644
     
    17581758        glyph indices larger than `mapCount' as described in the
    17591759        specification.
    17601760
    1761 2017-03-30  Werner Lemberg  <wl@gnu.org>
     17612017-03-30  Werner Lemberg  <wl@gnu.org> REVERTED
    17621762
    17631763        [truetype] Allow linear scaling for unhinted rendering (#50470).
    17641764
  • src/truetype/ttdriver.c

    diff --git src/truetype/ttdriver.c src/truetype/ttdriver.c
    index a1653b241cabfc3b051b05c8fc7daf7d6d3010c7..0259de80ceb08f882433320db79c205e56c2a8e8 100644
     
    356356
    357357    if ( FT_IS_SCALABLE( size->face ) )
    358358    {
    359       error = tt_size_reset( ttsize, 0 );
     359      error                = tt_size_reset( ttsize, 0 );
     360      if ( !error ) ttsize->root.metrics = *ttsize->metrics;
    360361
    361362#ifdef TT_USE_BYTECODE_INTERPRETER
    362363      /* for the `MPS' bytecode instruction we need the point size */
  • src/truetype/ttgload.c

    diff --git src/truetype/ttgload.c src/truetype/ttgload.c
    index 5e102c615190dc02d73f0c37f9333f567e0b4c29..6cc1105749ae77bcc284be048bd4a5c34d78f793 100644
     
    20352035
    20362036    y_scale = 0x10000L;
    20372037    if ( ( loader->load_flags & FT_LOAD_NO_SCALE ) == 0 )
    2038       y_scale = size->metrics->y_scale;
     2038      y_scale = size->root.metrics.y_scale;
    20392039
    20402040    if ( glyph->format != FT_GLYPH_FORMAT_COMPOSITE )
    20412041      FT_Outline_Get_CBox( &glyph->outline, &bbox );
     
    20672067
    20682068
    20692069      widthp = tt_face_get_device_metrics( face,
    2070                                            size->metrics->x_ppem,
     2070                                           size->root.metrics.x_ppem,
    20712071                                           glyph_index );
    20722072
    20732073#ifdef TT_SUPPORT_SUBPIXEL_HINTING_INFINALITY
     
    26982698          if ( !glyph->metrics.horiAdvance && glyph->linearHoriAdvance )
    26992699            glyph->metrics.horiAdvance =
    27002700              FT_MulFix( glyph->linearHoriAdvance,
    2701                          size->metrics->x_scale );
     2701                         size->root.metrics.x_scale );
    27022702          if ( !glyph->metrics.vertAdvance && glyph->linearVertAdvance )
    27032703            glyph->metrics.vertAdvance =
    27042704              FT_MulFix( glyph->linearVertAdvance,
    2705                          size->metrics->y_scale );
     2705                         size->root.metrics.y_scale );
    27062706        }
    27072707
    27082708        return FT_Err_Ok;
     
    27982798    /* TrueType glyphs at all sizes using the bytecode interpreter. */
    27992799    /*                                                              */
    28002800    if ( !( load_flags & FT_LOAD_NO_SCALE ) &&
    2801          size->metrics->y_ppem < 24         )
     2801         size->root.metrics.y_ppem < 24         )
    28022802      glyph->outline.flags |= FT_OUTLINE_HIGH_PRECISION;
    28032803
    28042804  Exit: