Skip to content

Commit

Permalink
Fix head.fontRevision computation (#545).
Browse files Browse the repository at this point in the history
  • Loading branch information
be5invis committed May 23, 2020
1 parent 4f286a4 commit 212749b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
3 changes: 2 additions & 1 deletion changes/3.1.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
* Added `v-underscore-above-baseline` (`cv99`) and redefined the `v-underscore-high` to the right-below-baseline variant (#515).
* Match styles of `1` and `7` in `ss##` variants (#539).
* Refine the width of `A` and `V`.
* Changed the layout of character variants sample image for better clarity.
* Changed the layout of character variants sample image for better clarity.
* Fix `head.fontRevision` computation (#545).
7 changes: 7 additions & 0 deletions meta/naming.ptl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import [fallback] from '../support/utils'
import 'semver' as semver

define COPYRIGHT 0
define FAMILY 1
Expand Down Expand Up @@ -186,6 +187,12 @@ export : define [assignFontNames para metrics font] : begin
bold : not : not isBold
italic : not : not (isItalic || isOblique)

define majorVersion : semver.major para.naming.version
define minorVersion : semver.minor para.naming.version
define patchVersion : semver.patch para.naming.version
if (minorVersion > 99 || patchVersion > 9) : throw : new Error "Version number overflow"
set font.head.fontRevision : majorVersion + (minorVersion * 10 + patchVersion) / 1000

if (para.diversityM == 1 && para.diversityF == 1 && para.diversityI == 1 && para.diversityII == 1) : begin
set font.OS_2.panose.3 9 # Monospaced
set font.post.isFixedPitch true
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "iosevka",
"version": "3.0.1",
"version": "3.1.0",
"main": "./generate.js",
"engines": {
"node": ">=12.16.0"
Expand Down

0 comments on commit 212749b

Please sign in to comment.