Empty _table object
EhsanParsania opened this issue · 0 comments
EhsanParsania commented
When I try to read the _table object that includes the fontFamily and fontSubfamily and some other information, the _table object is empty until I write this line const obtain_tableObject = font.familyName
, it triggers like a function and then I can see the _table object is full with data
const fontBuffer = await Parse.Cloud.httpRequest({ url: fontUrl, followRedirects: true })
.then(response => response.buffer);
const font = fontkit.create(fontBuffer);
const obtain_tableObject = font.familyName; // WARNING: This line is necessary to be, otherwise "_table" will be empty
let fontFamily = font._tables.name.records.fontFamily.en
let fontSubfamily = font._tables.name.records.fontSubfamily.en