WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
This repository was archived by the owner on Oct 5, 2023. It is now read-only.
This repository was archived by the owner on Oct 5, 2023. It is now read-only.

Wrong encoding in EOT's 255SHORT for large negative numbers #101

@behdad

Description

@behdad

Code here:
https://github.com/googlei18n/sfntly/blob/master/java/src/com/google/typography/font/tools/conversion/eot/GlyfEncoder.java#L185

The "spec" is here:
https://www.w3.org/Submission/MTX/#id_255SHORT

Note how in the spec, a wordCode-encoded short does NOT get a flipSignCode before it. The short is encoded as is in two's-complement.

Eg. to encode the number -984, currently we encode: FA FD 03 D8

FA – flipsignCode (250 decimal)
FD – WordCode (253 decimal)
03 D8 – Value (984 decimal)

Correct encoding is FD FC 28
FD – WordCode (253 decimal)
FC 28 – Value (-984 decimal)

(Reported to me by Microsoft.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions