File tree 2 files changed +19
-0
lines changed
2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,19 @@ openV2.then(font => {
19
19
if ( ! isCollection ( font ) ) {
20
20
const { xAvgCharWidth, fsSelection } = font [ "OS/2" ] ;
21
21
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
22
35
}
23
36
} ) ;
24
37
Original file line number Diff line number Diff line change @@ -46,6 +46,9 @@ export interface Font {
46
46
/** an array of all OpenType feature tags (or mapped AAT tags) supported by the font */
47
47
availableFeatures : string [ ] ;
48
48
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
+
49
52
/**
50
53
* Returns an array of strings that map to the given glyph id.
51
54
*/
@@ -314,6 +317,9 @@ export interface Os2Table {
314
317
underscore : boolean ;
315
318
useTypoMetrics : boolean ;
316
319
wws : boolean ;
320
+ bold : boolean ;
321
+ regular : boolean ;
322
+ oblique : boolean ;
317
323
} ;
318
324
fsType : {
319
325
bitmapOnly : boolean ;
You can’t perform that action at this time.
0 commit comments