Closed bobh0303 closed 4 years ago
TBD:
VERSION=getversion(path_to_ufo)
or, more simply, VERSION=path_to_ufo
. openTypeNameVersion
key). Maybe if BUILDLABEL is not in wscript, extract it from the same UFO as above.Introducing getufoinfo(path_to_ufo)
which reads the UFO and extracts useful information from it, setting variables in the wscript accordingly. The variables set are: VERSION and BUILDLABEL (which is always set even if the value is empty).
Applied in commit b82e6e0c
I just tried this and had two problems. I set the following in Regular UFO lib.plist
openTypeNameVersion
= Version 1.026; Beta
versionMajor
= 1
versionMinor
= 26
And I put the following in the wscript
, above the style-iteration:
getufoinfo('source/' + FAMILY + '-Regular' + '.ufo')
(Note that the version in the Bold UFO was different than the Regular, but the resulting Bold ttf had the same version as the Regular ttf, so I am convinced that the getufoinfo
did pull at least Major & Minor from the Regular UFO.)
The problems:
Version 1.026; dev-30cedfM
and the release fonts Version 1.026
-- no sign of Beta
Harmattan--dev-nnnnnnnn.zip
and Harmattan-.zip
-- no sign of the version.The core issue is fixed in that the parser was not handling the ; in the version string. It now allows it and outputs it.
There is currently no expectation that smith release will transfer the 'Beta' into the version string or release .zip filename. This would need further discussion to be changed.
Hrmph. This is tricky. getufoinfo() needs to be called before a package is created, which happens pretty much whenever you make anything new like a font or ftmltest. So getufoinfo() should be the first function you call in your wscript. Unfortunately, I don't know how to delay needing things like BUILDLABEL until after getufoinfo() is called.
In reviewing our prior discussions, I think we decided there would be no semicolons in version strings.
The name table version string is text that can contain numbers, letters, and punctuation. We recommend that this string have three parts, separated by spaces, in the form "Version M.mpp extrainfo"
As far as I can tell, we did decide that the "Beta" would go in the file name for development builds.
VERSION = Release version string e.g. "x.yyy alpha2" BUILD_VERSION = Build version string e.g. git sha, but with no identifying adornment For a development build and if BUILD_VERSION is not blank: .zip and .exe archive filename is fontname-VERSION-dev-BUILD_VERSION
We decided that there will no longer be semicolons in the version string. ttfsetver will have an option added so that no semicolon is placed between the version number and description. Smith will be modified to use the option when calling ttfsetver
Currently release builds (where version=VERSION for the Font object) do not contain the BUILDLABEL (e.g. 'beta1') in the font version or the zip file name. Development builds do contain it prepended to the SHA (returned by getversion()). We decided this is acceptable pending testing that this behavior can be overridden for development builds by setting BUILDVERSION=BUILDLABEL in the wscript to support a build that contains the BUILDLABEL with no SHA in the version string and zip file name.
All now documented in Workflow 110 Font Metadata, section About Alpha and Beta releases.
Per TM2018 discussion: for UFO-based font projects, VERSION should not be hard-coded in the wscript, but rather should be obtained from one of the UFOs. The resulting version should be applied to TTFs and WOFFs.
FTLS-385 and Font Workflow 200 Build