dompdf / php-font-lib

A library to read, parse, export and make subsets of different types of font files.
GNU Lesser General Public License v2.1
1.73k stars 255 forks source link

CFF outlines not supported, resulting in "Call to a member function getGlyphIDs() on a non-object in /classes/Font_TrueType.php on line 194" #10

Open jameswilson opened 10 years ago

jameswilson commented 10 years ago

I've just updated to latest version from HEAD of both DOMPDF and php-font-lib, and am getting the following error, rendering a document with Unicode Japanese text, using the Hiragino Kaku Gothic font provided by Mac OSX.

Call to a member function getGlyphIDs() on a non-object in /classes/Font_TrueType.php on line 194

I can provide the font if it would be helpful.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/1304216-cff-outlines-not-supported-resulting-in-call-to-a-member-function-getglyphids-on-a-non-object-in-classes-font_truetype-php-on-line-194?utm_campaign=plugin&utm_content=tracker%2F317728&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F317728&utm_medium=issues&utm_source=github).
PhenX commented 10 years ago

This may be because this font has only Compact Font Format (CFF) outlines, instead of "glyf" ones, which this library doesn't handle (yet). I'm changing the title of this issue.

davelab6 commented 10 years ago

GitHub.com/Behdad/fonttools had recent python commits for dealing with cff. There its also a machine readable spec parser in Javascript by the pdf.js guy On Nov 1, 2013 12:59 PM, "Fabien Ménager" notifications@github.com wrote:

This may be because this font has only Compact Font Format (CFF) outlines, instead of "glyf" ones, which this library doesn't handle (yet). I'm changing the title of this issue.

— Reply to this email directly or view it on GitHubhttps://github.com/PhenX/php-font-lib/issues/10#issuecomment-27580897 .