Initial work of ESM transformation
This commit is contained in:
parent
2472c9cff2
commit
b8205a63aa
303 changed files with 1959 additions and 2450 deletions
17
font-src/gen/empty-font.mjs
Normal file
17
font-src/gen/empty-font.mjs
Normal file
|
@ -0,0 +1,17 @@
|
|||
import { Ot } from "ot-builder";
|
||||
|
||||
export const CreateEmptyFont = function (argv) {
|
||||
let font = {
|
||||
head: new Ot.Head.Table(),
|
||||
hhea: new Ot.MetricHead.Hhea(),
|
||||
os2: new Ot.Os2.Table(4),
|
||||
post: new Ot.Post.Table(argv.featureControl.exportGlyphNames ? 2 : 3, 0),
|
||||
maxp: Ot.Maxp.Table.TrueType(),
|
||||
name: new Ot.Name.Table()
|
||||
};
|
||||
if (process.env.SOURCE_DATE_EPOCH) {
|
||||
font.head.created = new Date(process.env.SOURCE_DATE_EPOCH * 1000);
|
||||
font.head.modified = new Date(process.env.SOURCE_DATE_EPOCH * 1000);
|
||||
}
|
||||
return font;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue