File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,19 @@ openV2.then(font => {
1919 if ( ! isCollection ( font ) ) {
2020 const { xAvgCharWidth, fsSelection } = font [ "OS/2" ] ;
2121 const isNegative = fsSelection . negative ;
22+ fsSelection . bold ; // $ExpectType boolean
23+ }
24+ } ) ;
25+
26+ // -----------------------
27+ // API: Font.variationAxes
28+ // -----------------------
29+ openV2 . then ( font => {
30+ if ( ! isCollection ( font ) ) {
31+ font . variationAxes . wght ?. name ; // $ExpectType string | undefined
32+ font . variationAxes . wght ?. min ; // $ExpectType number | undefined
33+ font . variationAxes . wght ?. default ; // $ExpectType number | undefined
34+ font . variationAxes . wght ?. max ; // $ExpectType number | undefined
2235 }
2336} ) ;
2437
Original file line number Diff line number Diff line change @@ -46,6 +46,9 @@ export interface Font {
4646 /** an array of all OpenType feature tags (or mapped AAT tags) supported by the font */
4747 availableFeatures : string [ ] ;
4848
49+ /** An object describing the available axes in a variable font. Keys are 4 letter axis tags. */
50+ variationAxes : Partial < Record < string , { name : string ; min : number ; default : number ; max : number } > > ;
51+
4952 /**
5053 * Returns an array of strings that map to the given glyph id.
5154 */
@@ -314,6 +317,9 @@ export interface Os2Table {
314317 underscore : boolean ;
315318 useTypoMetrics : boolean ;
316319 wws : boolean ;
320+ bold : boolean ;
321+ regular : boolean ;
322+ oblique : boolean ;
317323 } ;
318324 fsType : {
319325 bitmapOnly : boolean ;
You can’t perform that action at this time.
0 commit comments