Skip to content

Commit

Permalink
More WIP vfb
Browse files Browse the repository at this point in the history
  • Loading branch information
simoncozens committed Apr 13, 2024
1 parent 1b86517 commit 7d0b6db
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/babelfont/convertors/fontlab/vfb.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,20 @@
"Background Bitmap",
"Glyph Origin",
"Glyph Anchors Supplemental",
"Links",
]
names = {
"description": "description",
"License": "license",
"LicenseURL": "licenseURL",
"License URL": "licenseURL",
"designer": "designer",
"designerURL": "designerURL",
"manufacturer": "manufacturer",
"manufacturerURL": "manufacturerURL",
"copyright": "copyright",
"sgn": "familyName",
"tfn": "familyName",
"versionFull": "version",
}


Expand All @@ -62,15 +64,23 @@ def _load(self):
if name == "psn":
# Postscript name, hey we don't have that.
pass
elif name == "version full":
self.font.version = tuple(int(x) for x in data.split("."))
elif name in names:
if data:
setattr(
self.font.names, names[name], I18NDictionary.with_default(data)
)
elif name == "ffn": # Full family name?
pass
elif name == "upm":
self.font.upm = int(data)
elif name == "versionMajor":
self.font.version = (int(data), self.font.version[1])
elif name == "versionMinor":
self.font.version = (self.font.version[0], int(data))
elif name == "vendorID":
self.font.customOpenTypeValues.append(
OTValue("OS/2", "achVendID", data)
)
elif name == "Glyph":
self.current_glyph = Glyph(name=data["name"])
self.font.glyphs.append(self.current_glyph)
Expand Down

0 comments on commit 7d0b6db

Please sign in to comment.