-
Notifications
You must be signed in to change notification settings - Fork 465
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
Issue with Glyph Mapping #39
Comments
Hello, |
hi, thanks for getting back on this. I was ment to say that calling font.charToGlyph('I') on the given font returns the first glyph (the no-glyph rectangle) with a glyph index of zero. |
Hi, Hmm this is really really weird. Yes, the call is done after the font is properly loaded. It works perfectly for all kind of glyphs except the uppercase I. Trying another font with the exact same code works as expected, so the code seems to be okay. I can really not explain myself what should be the case for this :( Btw., we're using your great library in our free Design Tool Gravit (http://www.quasado.com/gravit) for custom text rendering allowing us to apply any kind of vector effects to text shapes :) |
Ok, I am closing this. It seems that with the local version I do have it happens (I am using the latest one installed via bower). Doing the same with the online version works quite right. |
Using the free "Open Sans Regular Italic" TrueType font and requesting a glyph for the character "I" yields in a returned glyph code of zero which is surely wrong and returns the typical "no-char" rectangle. Using the glyph inspector of opentype.js however shows a number of "44" for the letter "I".
Having debugged seems that CmapEncoding.prototype.charToGlyphIndex returns zero but I couldn't figure why not having really understood what the code does.
The font file mentioned can be gathered from here: http://www.fontsquirrel.com/fonts/open-sans (Choose "Italic" in the style box, then download TTF)
The text was updated successfully, but these errors were encountered: