v.1.8.1 Fix metrics to specify CozetteVector as monospace

This commit is contained in:
Slavfox 2020-05-27 10:52:37 +02:00
parent b989b0092d
commit c6595485e6
3 changed files with 22 additions and 7 deletions

View file

@ -9,6 +9,14 @@ The format is based on [Keep a Changelog], and this project adheres to
Nothing!
## [1.8.1]
### Changed
- `isFixedPitch` is now being set to 1 for CozetteVector, and the OS/2
`panose` table specifies proportion as monospace which should hopefully fix
the font not being detected as monospace under Windows and kitty-term.
## [1.8.0+zipbuild]
### Added

View file

@ -4,7 +4,7 @@ FullName: Cozette
FamilyName: Cozette
Weight: Medium
Copyright: (c) 2020 Slavfox
Version: 1.080
Version: 1.081
ItalicAngle: 0
UnderlinePosition: -100
UnderlineWidth: 50
@ -22,7 +22,7 @@ OS2Version: 1
OS2_WeightWidthSlopeOnly: 0
OS2_UseTypoMetrics: 0
CreationTime: -2082812035
ModificationTime: 1586169290
ModificationTime: 1590569378
PfmFamily: 49
TTFWeight: 500
TTFWidth: 5
@ -11588,7 +11588,7 @@ Flags: W
LayerCount: 2
EndChar
EndChars
BitmapFont: 13 1643 10 3 1
BitmapFont: 13 1644 10 3 1
BDFStartProperties: 42
FONT 1 "-slavfox-Cozette-Medium-R-Normal--13-120-75-75-M-60-ISO10646-1"
COMMENT 0 "(c) 2020 Slavfox"
@ -11610,7 +11610,7 @@ FONTNAME_REGISTRY 16 ""
FONT_NAME 16 "Cozette"
FACE_NAME 16 "Cozette"
COPYRIGHT 16 "(c) 2020 Slavfox"
FONT_VERSION 16 "1.080"
FONT_VERSION 16 "1.081"
FONT_ASCENT 18 10
FONT_DESCENT 18 3
UNDERLINE_POSITION 18 -19

View file

@ -1,6 +1,6 @@
from pathlib import Path
from fontTools.fontBuilder import FontBuilder # type: ignore
from fontTools.fontBuilder import FontBuilder, _panoseDefaults # type: ignore
from cozette_builder.bdffont import BdfFont
@ -90,7 +90,14 @@ class TTFBuilder:
self.fb.setupHorizontalHeader(ascent=ascent, descent=-descent)
self.fb.setupNameTable(namestrings)
self.fb.setupOS2(
sTypoAscender=ascent, usWinAscent=ascent, usWinDescent=descent
sTypoAscender=ascent,
usWinAscent=ascent,
usWinDescent=descent,
panose={
**_panoseDefaults,
"bFamilyType": 2, # Text and display
"bProportion": 9 # Monospace
}
)
self.fb.setupPost()
self.fb.setupPost(isFixedPitch=1)
self.fb.save(output_path)