- From: Scott Kellum via GitHub <sysbot+gh@w3.org>
- Date: Wed, 27 Feb 2019 22:11:47 +0000
- To: public-css-archive@w3.org
I would like to see something like this:
```js
element.font
```
would return
```js
info: {
postScriptName: 'my font italic',
fullName: 'my font italic',
familyName: 'my font',
style: 'italic',
kind: 'opentype',
language: 'English',
version: '6.0.2',
copyright: 'copyright 2019 Acme Inc.'
},
metric: {
ascender: 80,
capHeight: 76,
xHight: 60,
baseline: 24,
descender: 7
},
setting: {
smcp: true,
c2sc: true,
hist: true,
tnum: true,
frac: true,
swsh: true,
ss01: true,
ss02: true,
ss03: true,
ss04: true
},
variant: {
wght: {
min: 200,
max: 800
},
opsz: {
min: 8,
max: 72
}
}
}
```
This allows me to either query the whole object, or target a specific value
```js
element.font.variant.wght.min
```
I also added font info and metrics, because it seemed like a good thing to throw in there as well.
--
GitHub Notification of comment by scottkellum
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/520#issuecomment-468051517 using your GitHub account
Received on Wednesday, 27 February 2019 22:11:48 UTC