How can I add a glyph to a TrueType font?
I seem to recall, there are guys on this forum who know about Fontforge -- don't recall who, or if they are still around.
Anyway, although I'm posting in the EasyOS section, this is a generic question that could apply to any pup.
We use gettext to translate application text-strings for non-English users. We have the MoManager tool to help with creating .mo translation files. Here is an example English text, followed by a French translation:
Code: Select all
Exited from init script early, nothing yet mounted.
Sortie anticipée du script d'initialisation, rien n'est encore monté.
That single-quote character in the French translation is ASCII ', a single byte, hex 27. It is also known as a "neutral apostrophe", as it isn't slanted:
https://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
A lot of languages use this neutral apostrophe. A problem is, depending on how the text is implemented in the app, the neutral apostrophe might have to be escaped. For example, in a script:
Code: Select all
VAR1='Sortie anticipée du script d'\''initialisation, rien n'\''est encore monté.'
The same problem can occur with the neutral double-quote character, it may need to be escaped.
I am wondering if I am over-thinking this, perhaps in practice it is not such a problem. Anyway, the need to escape the ' and " characters can be completely avoided by having two extra characters (glyphs) in a truetype font that are multibyte and look exactly the same as the ' and " characters.
Then, we would completely eliminate any need to escape them.
So, the question I am posing, for the truetype fonts that we are using in our pup, would it be easy to use a tool like Fontforge to duplicate ' and " as multibye characters and add them to the font?
That is, they are different glyphs, just look the same as the single-byte ASCII characters.
A clarification: UTF-8 recognizes the 8-bit (one byte) ASCII characters, including ' and ". The above link shows the neutral apostrophe as U+0027, multibyte, but that would be for UTF-16. In UTF-8, the character is only the one-byte ASCII.
Most of my GTK themes use DejaVu Sans, so I would start with editing that font.