get-font-info
v0.3.0
Published
Get font information
Downloads
332
Readme
Font Info
Reads font information from file.
interface FontInfo {
family: string;
familylang: string;
style: string;
stylelang: string;
fullname: string;
fullnamelang: string;
file: string;
outline: boolean;
scalable: boolean;
lang: string;
capability: string;
fontformat: string;
decorative: boolean;
postscriptname: string;
color: boolean;
symbol: boolean;
variable: boolean;
}
Requirements
This package depends on fc-scan
. Make sure you have it installed in your system.
Installation
npm i get-font-info
Usage
import getFontInfo from "get-font-info";
const font = await getFontInfo("./Inter-Regular.otf");
console.log({ font });