Anyone have problems with opentype.js not displaying special characters?

I'm using opentype.js on my website behind my "try it out" feature. A site visitor just alerted me that he can't type any special characters. Umlaute, Paragraph marks, etc. don't render. However, I have one font on there that has a lot of variations. Typing an Umlaut there does render a character, though the wrong one. Charset on the page is UTF-8. The format of the font is openType ttf, and it works fine on my machine. I've gone through the opentype.js documentation and haven't found anything illuminating. 

Anyone have any ideas? 

Example: https://www.waldenfont.com/tryit.asp?fontid=226


  • Options
    John HudsonJohn Hudson Posts: 2,977
    Confirmed the error: this is what I get when I input the o with diaraesis.

    That’s evidence of an character-to-glyph mapping error. If the character is correctly encoded in the font and displays properly elsewhere, then opentype.js could either be incorrectly handling the initial cmap table lookup or performing an erroneous glyph substitution.
  • Options
    This is the first time I've seen a type tester that renders raster images on the client side. Why do it this way instead of simply using live text with web fonts like most foundries do?

    Also the answer to your problem is, surprisingly, that your Unicode values in your .ttf font binary (oldkirkItalic.ttf) are all scrambled. The problem has nothing to do with your type tester. For example, this font has a circumflex glyph in codepoint 00EB (ë – Latin Small Letter E with Diaeresis).
  • Options
    Thanks, Justin! I set this up several years ago - I'm sure there are better solutions available today. Regarding the font, you're quite right – I had created it in Fontlab 5. When I opened it in Fontlab 7 today, there were about thirty strange characters with odd encodings at the top. Not sure what happened there, but clearly I need to re-generate the fonts I use on my website. 
  • Options
    Well, there really aren't many good options for type testers you can simply plug into your website. There are a few, but all the ones I know of are platform-specific, too old, or unfinished. Most foundries build their own, from what I've seen.

    I'm working on an open source plug-and-play type tester that will be available sometime in the future, but no ETA unless someone wants to help with funding it. I think it would be very useful to have a tool like this for small DIY foundries and indie type designers who want to set up a simple shop.
  • Options
    @Justin Penner That's a great resource, thanks for sharing. You should drop it in https://typedrawers.com/discussion/4309/online-specimen-generators#latest as well!

Sign In or Register to comment.