From 062c7ac0baab58c01e0ba5f423fd581ea6f50759 Mon Sep 17 00:00:00 2001 From: Patrick Rhodes Martin Date: Sat, 4 Feb 2023 22:10:38 -0800 Subject: [PATCH] Added types for closure compiler. --- externs/opentype.js | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/externs/opentype.js b/externs/opentype.js index 6d900d6b..75141c65 100644 --- a/externs/opentype.js +++ b/externs/opentype.js @@ -156,6 +156,32 @@ opentype.Font.prototype.drawMetrics = function(ctx, text, x, y, fontSize, option */ opentype.Font.prototype.getEnglishName = function(name) {}; +/** + * @typedef {{ + fontFamily: Object, + fontSubfamily: Object, + fullName: Object, + // postScriptName may not contain any whitespace + postScriptName: Object, + designer: Object, + designerURL: Object, + manufacturer: Object, + manufacturerURL: Object, + license: Object, + licenseURL: Object, + version: Object, + description: Object, + copyright: Object, + trademark: Object + };} + */ +var NamePlatform; + +/** + * @type {{unicode: ?NamePlatform, macintosh: ?NamePlatform, windows: ?NamePlatform}} + */ +opentype.Font.prototype.names = {}; + /** * Validate */