inkstitch
inkstitch copied to clipboard
Lettering tool sometimes doesn't recognize apostrophes
If I type something with an apostrophe (as in je t'aime) directly in the dialog box of Lettering, the apostrophe is not recognized and ignored. My friends from the French group have solved this problem by typing in some editor first and then cut and paste in the dialog box, and then it is recognized.
Originally posted by @claudinepeyrat06 in https://github.com/inkstitch/inkstitch/issues/1312#issuecomment-932484273
I think that I understand the problem now : If I come extremly close to the screen I can see something strange: If I type directly in the lettering interface text area, the character is first straight : ', then turn into a slanted character: ’ (the slanted character is not on my keyboard). If I type first in an editor and cut and paste into the Lettering interface text area, it stays straight.
I suppose that it is the single quote versus apostrophe
The same magical trick happens with " and «, and is much easier to see....
I'm afraid we have two different characters, and we need two different layers with distinct names even if they contain the same information (as probably there should be a slight difference).
The transformation that happens (or not ) into the text area is still weird to me .....
I think that transformation is the system trying to guess whether you want an apostrophe or a right single-quote. Maybe we can disable that guessing.
In any case, if you type in a character that is not in the font, Ink/Stitch should pick a default placeholder character. That's configured in font.json. Some fonts use a rectangle to signify that a character doesn't exist in that font.
I kept trying to understand, and after some reading came to the same conclusion. Yes, it is the system guessing. And the reason why a cut/paste from a editor works is that this particular editor also is guessing and substituting but the other way around and add some kind of sugar to forbid the system substitution.
The single quote is a very recent introduction in french printing, and besides typographers I'm not sure a lot of French people are aware of the existence of two distinct characters.
French language heavily use apostrophe, as it is the sign for elision , same as English I guess.
If you can disable the system guessing, it's great. But I wonder wether a better solution would not be to maintain a dictionary of list of acceptable substitution(s) for some given character (to use only if the character is not defined in the font) and use the missing glyph only as last effort, as:
-
some system substitutions are very welcome like to type  I actually type ^ then A and I see the substitution happen in the text area.
-
if you cut/paste your text in the text area , you don't know exactly what you get (at least I don't know :=)
-
if é is not part of the character set, I'd rather receive an e than the missing glyph (a lot of similar cases)
-
I wonder if it could not also be useful for some character specific to a language, when a subsitution by one or a combination of two more common characters is possible (I read something about that, but the details did not stay in my memory)).
But I don't know if an acceptable substition is national or international...
Any way, typography is fascinating, I need at least two more lifes to begin to understand some of the details.....
It was and remains a detail, but I feel good that what was a mystery to me, is no more a mystery.
I am new to InkStitch and have the same problem with apostrophes and quote marks missing when using the lettering tool.
In this case I am trying to use Dejavu Serif and cannot type That'll because the apostrophe is missing. I have the same problem in several other lettering fonts. It seems to be included in the glyphs of the font. Is this a bug or user error :)
Any ideas for getting around it? Do I need to copy and paste from a text font and covert from a fill to a satin stitch?
Thanks
Problem is there are several glyphs looking very similar, but corresponding to different unicode. single quote, curved single quote, apostrophe are different unicode but glyphs are very similar. One of these, and only one is in Deja Vu font. Plus depending of the keyboard you are using, your "apostrophe" key is sending some unicode. Plus a lot of editor change that for you (including the editor in the lettering window). In more recent fonts there are usually more than one apostrophe to help.
The whatever glyph that looks like an apostrophe in DejaVu is a very simple satin column. You could simply draw a straight line and use Tools : Satin to convert it to satin column, then add a center overlay and you are all set.
When the apostrophe is missing I use the comma and I move it a little.
One solution maybe to have a window appear with the characters available for a particular font.
- if é is not part of the character set, I'd rather receive an e than the missing glyph (a lot of similar cases)
This could be done by converting to NFKC form see https://docs.python.org/3/howto/unicode.html and https://dencode.com/en/string/unicode-normalization and then removing non ascii characters, but probably just having an option to see the available characters in the GUI would solve this problem and allow the user to apply their best judgement.