Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty _table object #333

Open
EhsanParsania opened this issue Apr 15, 2024 · 0 comments
Open

Empty _table object #333

EhsanParsania opened this issue Apr 15, 2024 · 0 comments

Comments

@EhsanParsania
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant