ref: 76cff0a21df473177e256b2d107343a244eb69d8
parent: c6eb8a200dff35d17ddae7d4de934afae968987b
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Sat Jul 13 13:51:07 EDT 2024
store Fixed and F2DOT14 as double
--- a/otf.rkt
+++ b/otf.rkt
@@ -36,12 +36,12 @@
(mktype Version16Dot16 32 u32int (cons "%d.%d" (λ (v) (~a v ">>16, " v "&0xffff"))))
(mktype Fixed
32
- float
+ double
"%g"
(λ (b index [offset #f]) (~a "(" ((type-parse int32) b index offset) ")/65536.0f")))
(mktype F2DOT14
16
- float
+ double
"%g"
(λ (b index [offset #f])
(define x (~a ((type-parse int16) b index offset)))
--- a/plan9/otf.h
+++ b/plan9/otf.h
@@ -401,7 +401,7 @@
struct TableHead {
// u16int majorVersion;
// u16int minorVersion;
- // float fontRevision;
+ // double fontRevision;
// u32int checksumAdjustment;
// u32int magicNumber;
u16int flags;
@@ -482,7 +482,7 @@
struct TablePost {
// u32int version;
- float italicAngle;
+ double italicAngle;
s16int underlinePosition;
s16int underlineThickness;
u32int isFixedPitch;
@@ -1192,9 +1192,9 @@
struct VariationAxisRecord {
u32int axisTag;
- float minValue;
- float defaultValue;
- float maxValue;
+ double minValue;
+ double defaultValue;
+ double maxValue;
u16int flags;
u16int axisNameID;
};
@@ -1203,7 +1203,7 @@
void print_VariationAxisRecord(Otfile *f, int indent, Otf *o, VariationAxisRecord *v);
struct UserTuple {
- float *coordinates;
+ double *coordinates;
};
int read_UserTuple(Otf *o, UserTuple *v);
@@ -1243,9 +1243,9 @@
void print_TableFvar(Otfile *f, int indent, Otf *o, TableFvar *v);
struct RegionAxisCoordinates {
- float startCoord;
- float peakCoord;
- float endCoord;
+ double startCoord;
+ double peakCoord;
+ double endCoord;
};
int read_RegionAxisCoordinates(Otf *o, RegionAxisCoordinates *v);
@@ -1410,7 +1410,7 @@
void print_TableGasp(Otfile *f, int indent, Otf *o, TableGasp *v);
struct Tuple {
- float *coordinates;
+ double *coordinates;
};
int read_Tuple(Otf *o, Tuple *v);
@@ -1471,8 +1471,8 @@
void print_TableGvar(Otfile *f, int indent, Otf *o, TableGvar *v);
struct AxisValueMap {
- float fromCoordinate;
- float toCoordinate;
+ double fromCoordinate;
+ double toCoordinate;
};
int read_AxisValueMap(Otf *o, AxisValueMap *v);