bugThe FreeType Project - Bugs: bug #46489, CFF: Add support for missing...

 
 

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

bug #46489: CFF: Add support for missing opcodes in new engine

Submitter:  Werner LEMBERG <wl>
Submitted:  Sat 21 Nov 2015 05:48:22 AM UTC
Votes: 50
 
Severity:  3 - Normal Item Group:  Wishlist
Status:  Fixed Privacy:  Public
Assigned to:  wl Open/Closed:  Closed
Planned Release:  2.8

Mon 20 Feb 2017 09:04:13 AM UTC, comment #5: 

The new CFF engine now supports the `random' operator also.

Control of the pseudo-number generation is possible with a new CFF driver property `random-seed'; using the new `FT_Face_Properties' function, this can also be set per face.

All other missing opcodes are also implemented since some time.

Werner LEMBERG <wl>
Group administrator
Sat 28 Nov 2015 02:01:38 AM UTC, comment #4: 

Would it be worth splitting up this issue into one for adding the operator support back in (with an UNSUPPORTED_OPCODE_ERROR for the random operator?), and a separate issue for dealing with implementing proper support for random?

That way 99% of interesting charstring programming will be supported again, even if that last opcode needs more work.

Pomax <pomax>
Wed 25 Nov 2015 03:17:29 PM UTC, comment #3: 

Yes, this is another possible solution.  I have to think about it.

Werner LEMBERG <wl>
Group administrator
Wed 25 Nov 2015 03:09:50 PM UTC, comment #2: 

Another option is to accept glyphs with the "random" without generating an error code, but treat the "random" opcode as if it's simply the numeral 1, so that the glyph doesn't cause any errors, but simply always looks the same

(I believe this is what tx does for checking glyphs in otf files as well, although it might use a different value).

Pomax <pomax>
Wed 25 Nov 2015 07:10:09 AM UTC, comment #1: 

Some ideas.

- By default FreeType will not accept glyphs that contain the `random' operator, returning a new error code.
- A new load flag will override that behaviour.
- To get deterministic behaviour of the `random' operator, a variant of `FT_Load_Glyph' will be added that accepts and returns a seed value.

Werner LEMBERG <wl>
Group administrator
Sat 21 Nov 2015 05:48:22 AM UTC, original submission:  

Currently, the new CFF engine contributed by Adobe lacks support of the following opcodes:

and  or  not  eq
abs  add  sub  div  mul  neg  sqrt
drop  put  get
ifelse
random
dup  exch  index  roll

Note that it is rather straightforward to add the missing support to FreeType.  Unfortunately, this doesn't solve the lack of support on Windows...

Werner LEMBERG <wl>
Group administrator

 

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

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by pomax (Posted a comment)
  • -email is unavailable- added by pomax (Voted in favor of this item)
  • -email is unavailable- added by wl (Submitted the item)
  •  

    There are 50 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 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-02-20 wl StatusConfirmed Fixed
        Open/ClosedOpen Closed
        Planned ReleaseNone 2.8
    2015-11-21 pomax Carbon-Copy- Added pomax

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code