seek-oss-ci
released this
05 May 23:43
·
14 commits
to master
since this release
Minor Changes
-
#195
aa77cb2
Thanks @michaeltaranto! - Extract and exposepostscriptName
andfullName
from font metricsThe font metrics returned now include the
postscriptName
andfullName
properties as authored by the font creator.For example:
// Arial Regular metrics { "familyName": "Arial", "fullName": "Arial", "postscriptName": "ArialMT", ... } // Arial Bold metrics { "familyName": "Arial", "fullName": "Arial Bold", "postscriptName": "Arial-BoldMT", ... }
These values are particularly useful when constructing CSS
@font-face
declarations, as they can be used to specify local(<font-face-name>) sources.
MDN recommends using both “to assure proper matching across platforms”.@font-face { font-family: 'Web Font Fallback'; src: local('Arial Bold'), local('Arial-BoldMT'); font-weight: 700; ascent-override: 89.3502%; descent-override: 23.1683%; size-adjust: 108.3377%; }