bugThe FreeType Project - Bugs: bug #49829, Linear metrics incorrect on...

 
 

bug #49829: Linear metrics incorrect on non-default variations.

Submitted by:  bungeman <bungeman>
Submitted on:  Mon 12 Dec 2016 04:03:37 PM UTC  
 
Severity: 3 - NormalItem Group: Incorrect behaviour
Status: FixedPrivacy: Public
Assigned to: Werner LEMBERG <wl>Open/Closed: Closed
Planned Release: 2.7.1

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 20 Dec 2016 11:46:19 AM UTC, comment #1:

Fixed in git, thanks.

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Mon 12 Dec 2016 04:03:37 PM UTC, original submission:

This report started at https://bugs.chromium.org/p/skia/issues/detail?id=5917 , see for previous discussion and history.

It appears that a non-default variation glyph which changes its advance widths (by varying the phantom points) returns linear metrics (linearHoriAdvance and linearVertAdvance) of the default variation (from the hmtx table). Instead, the linear metrics for such a glyph should be calculated from the phantom points after applying variations but before applying hinting (unless there is an HVAR table, in which case it seems it should 'win').

A quick and dirty patch is attached (based on ffd8f6223607e9d61de33467fcd113f2a15dae36 '[cff] Code shuffling.') which returns the expected linear metrics when using such a glyph. While I believe this patch covers all the cases (simple, complex, and whitespace glyphs), it probably overrides the previously calculated values too often (and has comments to this effect). It may be better to organize such a change differently, but this at least illustrates the desired behavior in this case.

bungeman <bungeman>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by wl (Posted a comment)
  • -unavailable- added by bungeman (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 20 Dec 2016 11:46:19 AM UTCwlStatusNone=>Fixed
      Assigned toNone=>wl
      Open/ClosedOpen=>Closed
      Planned ReleaseNone=>2.7.1
    Mon 12 Dec 2016 04:03:37 PM UTCbungemanAttached File-=>Added 0001-Quick-hack-fix-for-variation-font-linear-metrics.patch, #39203

    Back to the top


    Powered by Savane 3.1-cleanup1