Anyone have problems with opentype.js not displaying special characters?
Oliver Weiss (Walden Font Co.)
Posts: 213
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
Anyone have any ideas?
Example: https://www.waldenfont.com/tryit.asp?fontid=226
0
Comments
-
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.1 -
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).2 -
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.0
-
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.1 -
@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!
0
Categories
- All Categories
- 43 Introductions
- 3.7K Typeface Design
- 799 Font Technology
- 1K Technique and Theory
- 617 Type Business
- 444 Type Design Critiques
- 541 Type Design Software
- 30 Punchcutting
- 136 Lettering and Calligraphy
- 83 Technique and Theory
- 53 Lettering Critiques
- 483 Typography
- 301 History of Typography
- 114 Education
- 68 Resources
- 498 Announcements
- 79 Events
- 105 Job Postings
- 148 Type Releases
- 165 Miscellaneous News
- 269 About TypeDrawers
- 53 TypeDrawers Announcements
- 116 Suggestions and Bug Reports