rendering issue for fonts with limited character sets

Bug #1307065 reported by Nick Aschenbach
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
typeface.js
New
Undecided
Unassigned

Bug Description

I ran into an issue when using a font I converted from DaFont (http://www.dafont.com/bold-pressing.font). The issue shows up when I try to use characters that don't exist with the typeface. In this case, the typeface does not contain any lower case characters. This is with version 0.15 of typeface.js. The converted font and code is attached to this report.

These code changes fixed the issue for me:

Replace line ~133:

return this.renderGlyph(ctx, face, this.fallbackCharacter, style);

with

return;

Reason: Got into infinite recursive loop

---

Add

line ~133:

if(!glyph) continue;

Reason: Glyph isn't defined

Thanks for your cool library. I enjoyed using it.

Revision history for this message
Nick Aschenbach (dril1) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.