Closed ivantacca closed 2 years ago
That can happen if a string is in a non-standard (ie non Unicode) encoding. If you install iconv-lite, it should be able to decode it.
Thanks @devongovett,
Actually it seems that even just .toString()
does the trick.
May I ask if this is made on purpose or a sort of exception we get from the library on certain fonts?
If the text is in a non-standard encoding, then it may end up as a buffer if it is unable to be decoded. On my system, your example works and returns a string.
Hi, I am trying to read the
familyName
of every font in my library, and I noticed that the result is not always a string.Take this as an example:
The code above is giving the following output
And this is happening for several font files, while the result for others is the actual family name.
Am I doing something wrong?