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

TypeError: Cannot read property 'points' of null #36

Closed
defue opened this issue May 4, 2016 · 1 comment
Closed

TypeError: Cannot read property 'points' of null #36

defue opened this issue May 4, 2016 · 1 comment

Comments

@defue
Copy link
Contributor

defue commented May 4, 2016

Code:

var fontkit = require('fontkit');
var font = fontkit.openSync('duality.ttf');
var run = font.layout('%');
var bbox = run.glyphs[0].bbox

Error:

/home/user/fontkit/node_modules/fontkit/src/glyph/TTFGlyph.js:268
          ref1 = glyph.points;
                      ^

TypeError: Cannot read property 'points' of null
    at TTFGlyph._getContours (/home/user/fontkit/node_modules/fontkit/src/glyph/TTFGlyph.js:268:23)
    at TTFGlyph._getPath (/home/user/fontkit/node_modules/fontkit/src/glyph/TTFGlyph.js:313:23)
    at TTFGlyph.path (/home/user/fontkit/node_modules/fontkit/src/glyph/Glyph.js:86:66)
    at TTFGlyph.Glyph._getBBox (/home/user/fontkit/node_modules/fontkit/src/glyph/Glyph.js:33:18)
    at TTFGlyph.bbox (/home/user/fontkit/node_modules/fontkit/src/glyph/Glyph.js:82:66)
    at Object.<anonymous> (/home/user/fontkit/test.js:4:25)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:

10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)

The duality.ttf font is attached.
duality.ttf.zip
Fontkit v1.3.0

@liborm85
Copy link
Contributor

Tested with version 1.8.0, works ok.

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

3 participants