bugThe FreeType Project - Bugs: bug #58646, t1_decoder_parse_metrics does not...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #58646: t1_decoder_parse_metrics does not handle op_callsubr

Submitter:  Tor Andersson <ccxvii>
Submitted:  Tue 23 Jun 2020 09:37:25 AM UTC
   
 
Severity:  3 - Normal Item Group:  Incorrect behaviour
Status:  Fixed Privacy:  Public
Assigned to:  wl Open/Closed:  Closed
Planned Release:  2.10.3

Mon 06 Jul 2020 07:22:04 AM UTC, comment #1: 

Fixed in git.  Thanks for the report, and please test.

Werner LEMBERG <wl>
Group administrator
Tue 23 Jun 2020 09:37:25 AM UTC, original submission:  

Related to bug 57519. I've found another type 1 font where the optimized fast path metrics decoder fails. This time the font uses not only 'div' to calculate the metrics for the 'hsbw' operator, it calls a subroutine that contains the 'hsbw' operator.

Here's some disassembly from the offending Type1 font:

dup 518 {
        27 27881 61 div
        hsbw
        -4 35 hstem
        229 30 hstem
        404 31 hstem
        214 436 rmoveto
        return
        } NP

/e {
        518 callsubr
        517 callsubr
        }ND

Some of the characters in this font have their metrics reported correctly, but for example 'e' is reported having 0 width.

I'm currently using a workaround in MuPDF by #define T1_CONFIG_OPTION_OLD_ENGINE 1 but this is not a good long term solution since Linux distributions always link to the common Freetype system library which exposes this bug.

Tor Andersson <ccxvii>

 

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

Attached Files
file #49355:  BXAAAA+ecrm0900.pfb added by ccxvii (47KiB - application/x-font-type1)

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-07-06 wl Item GroupNone Incorrect behaviour
        StatusNone Fixed
        Assigned toNone wl
        Open/ClosedOpen Closed
        Planned ReleaseNone 2.10.3
    2020-06-23 ccxvii Attached File- Added BXAAAA+ecrm0900.pfb, #49355

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code