Your presentation on LibreOffice code

Jan-Marek Glogowski glogow at fbihome.de
Mon Mar 16 11:02:19 UTC 2020


Hi Arvind,

Am 15.03.20 um 17:15 schrieb Arvind Kumar:

[some text about modifying the key handling in gtk3]

I don't think you're on the right track. In theory you should be able to
create a keyboard mapping with your special characters, so the keypress
is translated to the correct key code. If you want to generate single
glyphs from multiple keystrokes, then you should have a look into input
method handling (IM), like ibus or fcitx, which is normally used to type
complex-glyph based languages, like Chinese.

OTOH, since you're using Private Use Area (PUA) codes, this won't work
well, if other software doesn't use your font, as PUAs - per definition
- can't have fallbacks in other fonts, as they are font specific. But it
should work just fine with any LO document type, if you select your
font, which already shows up in LO.

> The other problem I had when I hard coded the value of nGlyphIndex is
> that the cursor does not move all the way to the end of the glyph but is
> in the center of the glyph so that the next keystroke results in an
> overlap of the right half of the glyph with the left half of the next
> glyph. This is the case only with the glyph in the font file I
> generated. Note that I have used my fontfile with other programs written
> using Gtk+ and they work fine.

Hard to say, if this is a general problem of your font or a bug in LO or
just caused by your changes to the VCL gtk3 plugin key handling code in LO.

If you have some other working example document, like a UTF-8 encoded
text file, which you know is displayed correctly in some Gtk
application, than you could copy and paste that text into Writer and
then select your font. That should already work, without any code changes.

If not, please open a bug report at https://bugs.documentfoundation.org/

> Any ideas would be appreciated.

Quoting your old mail:

> This is needed for some Indian languages.

Maybe try contact either people from unicode.org or icu-project.org?
They should eventually be able to assign some code point ranges for your
language / glyphs, so other programs can also represent your glyphs
correctly. I have no idea, how the unicode people work, but especially
if you have an actively used language, that would be my way to go.

HTH

Jan-Marek


More information about the LibreOffice mailing list