Skip to content
This repository has been archived by the owner on Jul 3, 2019. It is now read-only.
This repository has been archived by the owner on Jul 3, 2019. It is now read-only.

stream.readFloat16 should use little endian representation #2445

Open
@demurgos

Description

I think that there is an issue with readFloat16, it uses big endian representation for the underlying bytes instead of little endian.
This is only used for font alignment zone data parsing (which Shumway does not seem to support).

The endianness is not specified, but:

  • Float32 and Float64 are little-endian
  • When testing font alignment parsing zone data parsing on multiple files, little-endian seems to produce better values (between 0.1 and 3) while big-endian returns odd values or even NaN.

var ui16 = this.view.getUint16(this.pos, false);

(the littleEndian should be true instead of false)

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