Home   Archive   Permalink



R3 GUI

I am learning "Cross Platform App Development with Rebol 3 Saphir",in example of "Tiny Note Editor", I can input English,but can't input Chinese ,Can you help me? thank you!

posted by:   ttkk1024       13-Oct-2013/20:06:11-7:00



Here is the conversation in AltME so far about this topic:
    
Nick, The main problem is with font selection here...
    
Android uses the DroidSans.ttf as system font with smaller set of characters(ie not including chinese). If the character is not found, it tries to lookup the character in DroidSansFallback.ttf with much large character set.
In R3-GUI we are using only the DroidSans.ttf since that font fallback feature is not part of REBOL. (we may add low-level generic support for such cases later)
So the easiest solution for now is rebuild R3-GUI with different default Android font or patch the "one-file" R3-GUI release directly.
    
To change the default R3-GUI fonts you need to look into the gui-object.r3 source file and replace the "Droid<something>.ttf" definitions with the "DroidSansFallback.ttf" (or any other preffered chinese font), then rebuild the R3-GUI.
Simmilarly, to patch the r3-gui.r3 fle just search and replace the occurences of the "Droid<something>.ttf" filename to enable chinese characters.
    
Nick, Cyphre. Changing the font can only help showing the Chinese characters, but not help the input. In CJK (China, Japan, Korea), we use IME (Input Editor Editor) to input the local characters. R3 for windows doesn't support IME, but R3-Android does support IME.
    
IME = Input Method Editor
    
Jerry, right Windows version doesn't have support for IME at the moment but there is a stub function in the View api for that so it can be added.

posted by:   Nick       15-Oct-2013/12:53:10-7:00



Nick,thank you!

posted by:   ttkk1024       16-Oct-2013/3:56:51-7:00