Author Topic: [fixed] r4287 + 3.7.1: Composing special character "ę" (alt+e) not possible  (Read 894 times)

filux

  • MegaGlest Team
  • Draco Rider
  • ********
  • Posts: 310
  • was OpenSuse x64, is Debian testing x64
    • View Profile
Doesn't work (alt+e) letter.
This problem noticed carolinus  ;) in in-game chat.

In Polish exist "ę" letter as combination (alt+e), and a lot of words contain this letter.

When someone write a word, the letters are just not visible, and the words looks as someone wrote them with a broken keyboard.  :(
E.g. "proszę cię większy" => "prosz ci wikszy"

Problem is spotted in polish language but I believe it might be a more general problem, and in other languages with that combination might occur too. :look:


Edit (tomreyn, 2013-05-18): clarified subject
« Last Edit: 5 June 2013, 13:54:20 by tomreyn »

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
Please provide the character codes displayed on the keyboard configuration menu (top left) when you press these characters there. Thanks.
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

filux

  • MegaGlest Team
  • Draco Rider
  • ********
  • Posts: 310
  • was OpenSuse x64, is Debian testing x64
    • View Profile
Code: [Select]
[img]http://imgius.com/photos/20130519136890800175776.png[/img]
and original page down button have:
"... [281][281][0][4096]"
« Last Edit: 27 September 2016, 20:37:00 by filux »

tomreyn

  • Local Moderator
  • Airship
  • ********
  • Posts: 2,764
    • View Profile
    • MegaGlest - the free and open source cross platform 3D real-time strategy game
There's no need to change any key assignments, you can immediately press keys as soon as you entered the keyboard configuration menu, and their scancodes will play.

The actual issue you seem to be running into here is just that the default font does not support displaying this character. Try using a custom font where you know it supports this character. Something like this (copied from chinese.lng) in ~/.megaglest/data/lang/polish.lng should work:
Code: [Select]
MEGAGLEST_FONT=$APPLICATIONDATAPATH/data/core/fonts/wqy-zenhei.ttc
MEGAGLEST_FONT_FAMILY=WenQuanYi Zen Hei:style=Regular
atibox: Ryzen 1800X (8 cores @3.6GHz), 32 GB RAM, MSI Radeon RX 580 Gaming X 8G, PCI subsystem ID [1462:3417], (Radeon RX 580 chipset, POLARIS10) @3440x1440; latest stable Ubuntu release, (open source) radeon (amdgpu) / mesa video driver
atibox (old): Core2Quad Q9400 (4 cores @2.66GHz), 8 GB RAM, XFX HD-467X-DDF2, PCI subsystem ID [1682:2931], (Radeon HD 4670, RV730 XT) @1680x1050; latest stable Ubuntu release, (open source) radeon / mesa video driver
notebook: HP envy13d020ng
internet access: VDSL2+

· · · How YOU can contribute to MG · Latest development snapshot · How to build yourself · Megapack techtree · Currently hosted MG games · · ·

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
in data/lang folder there is polish.lng

There are two entries:

MEGAGLEST_FONT=$APPLICATIONDATAPATH/data/core/fonts/LinBiolinum_RB.ttf
MEGAGLEST_FONT_FAMILY=Linux Biolinum O:style=Bold

These represent the font used to display characters for polish. Find a better font that supports all polish characters and let us know and we will change it for next release.

Thanks

filux

  • MegaGlest Team
  • Draco Rider
  • ********
  • Posts: 310
  • was OpenSuse x64, is Debian testing x64
    • View Profile
In the original font file that letter exists, but nevertheless I tested your suggestion. :)

...and - Still doesn't working.

Tested on: LinLibertine_RB.otf, DejaVuSansMono.ttf (from game),
and: Cantarell-Bold.otf, arial.ttf (from linux)

Then tested the same fonts by starting the game with the parameter "--use-font=...", then with parameter "--enable-legacyfonts", then (the last test was) with changed "ISO639-1=pl" to "ISO639-2=pol".
The result is still negative.

It looks to me as the game couldn't connect existing letter from font file with a properly working keyboard shortcut.  :(

For end, I attaching the entire configuration (original) of fonts because these variables are so many that this problem can hide somewhere here too. For example, somewhere in that mysterious "*-*-*-*-"   ;).
Code: [Select]
; Font configuration for FTGL
; Before using an alternative font, please verify license compatibility
ISO639-1=pl
NativeLanguageName=język polski, polszczyzna
MEGAGLEST_FONT=$APPLICATIONDATAPATH/data/core/fonts/LinBiolinum_RB.ttf
MEGAGLEST_FONT_FAMILY=Linux Biolinum O:style=Bold
FONT_SCALE_SIZE=$USE_DEFAULT_LANGUAGE_VALUE
FONT_SCALE_CENTERH_FACTOR=$USE_DEFAULT_LANGUAGE_VALUE
FONT_BASE_SIZE=$USE_DEFAULT_LANGUAGE_VALUE
FONT_CHARCOUNT=$USE_DEFAULT_LANGUAGE_VALUE
FONT_CHARSET=$USE_DEFAULT_LANGUAGE_VALUE
FONT_HEIGHT_TEXT=yW
FONT_MULTIBYTE=0
FONT_RIGHTTOLEFT=0
FONT_TYPENAME=Times New Roman

FontDisplayBaseSize=$USE_DEFAULT_LANGUAGE_VALUE
FontDisplayPostfix=-*-*-*-*-*-*-*
FontDisplayPrefix=-*-arial-*-r-*-*-
FontDisplaySmallBaseSize=$USE_DEFAULT_LANGUAGE_VALUE
FontMenuNormalBaseSize=$USE_DEFAULT_LANGUAGE_VALUE
FontMenuNormalPostfix=-*-*-*-*-*-*-*
FontMenuNormalPrefix=-*-arial-*-r-*-*-
FontMenuBigBaseSize=$USE_DEFAULT_LANGUAGE_VALUE
FontMenuBigPostfix=-*-*-*-*-*-*-*
FontMenuBigPrefix=-*-arial-*-r-*-*-
FontMenuVeryBigBaseSize=$USE_DEFAULT_LANGUAGE_VALUE
FontConsoleBaseSize=$USE_DEFAULT_LANGUAGE_VALUE
FontConsolePostfix=-*-*-*-*-*-*-*
FontConsolePrefix=-*-arial-*-r-*-*-

GunChleoc

  • Horseman
  • ****
  • Posts: 202
    • View Profile
    • Fòram na Gàidhlig
I have a similar problem with à, è etc for Gaelic, where an extra = is added. So, instead of "ù", I get "=ù". Maybe this is a general bug for characters where you need 2 keypresses? German äöü are fine, for which I only need to press 1 key.

filux

  • MegaGlest Team
  • Draco Rider
  • ********
  • Posts: 310
  • was OpenSuse x64, is Debian testing x64
    • View Profile
In Polish doesn't work only that one letter "ę" (alt+e).

I checked and I see that your language also uses a font: LinBiolinum_RB.ttf
and I see that the file contains required letters for you.
That looks as a very similar issue.


filux

  • MegaGlest Team
  • Draco Rider
  • ********
  • Posts: 310
  • was OpenSuse x64, is Debian testing x64
    • View Profile
I found the reason for not displaying this letter. :)

Intuition did not disappoint me in the beginning  ;D.
All because of that letter uses a reserved and prohibited name: "pagedown"

If inside a file: .../source/shared_lib/sources/platform/sdl/window.cpp
I'll blocked tests execution on this name, which looks like this:
Code: [Select]
bool isAllowedInputTextKey(wchar_t &key) {
bool result = (...
//key != SDLK_PAGEDOWN &&
...);
...
bool isAllowedInputTextKey(SDLKey key) {
bool result = (...
//key != SDLK_PAGEDOWN &&
...);
line 1040 and 1100

... then letter works with both combinations (alt + e) and (alt + pagedown)  :look:.

This is not a solution, but I think it is already near. ;)

Code: [Select]
[img]http://imgius.com/photos/20130605137037697186757.png[/img]
« Last Edit: 27 September 2016, 20:37:56 by filux »

softcoder

  • MegaGlest Team
  • Battle Machine
  • ********
  • Posts: 2,239
    • View Profile
Fixed in svn rev#: 4384

Each lng file can now have its own special keys allowed, i added this so far for polish, it can be a comma delimited list

; Special Key strokes allowed for this language and font (comma delimited)
ALLOWED_SPECIAL_KEYS=page down

A list of allowed names seperated by commas can be found on the SDL keycode page: http://sdl.beuc.net/sdl.wiki/SDLKey

Thanks

filux

  • MegaGlest Team
  • Draco Rider
  • ********
  • Posts: 310
  • was OpenSuse x64, is Debian testing x64
    • View Profile
It is fixed for Polish language  :).

Now working with both combinations (alt + e) and (alt + pagedown) [with pagedown shouldn't] exactly as after my changes.

... but I'll add my thoughts about that:
In Polish that looks to good solution but I think in the future in the other language may prove to will need to use some important names (e.g. enter/return, alt+enter) and can arise conflicts. Maybe is it better to force a change this name of a key to not prohibited, so that the two combinations work independently?  - If it is possible of course.

Big thx for fix :).

GunChleoc

  • Horseman
  • ****
  • Posts: 202
    • View Profile
    • Fòram na Gàidhlig
This didn't fix it for accents, so that's a different bug. I'll have a look if there's already a bug report / open a new onw.

 

anything