Rockbox

Tasklist

FS#4856 - UI font in keyboard screen & loadable keyboard layout

Attached to Project: Rockbox
Opened by Frank Dischner (phaedrus961) - Monday, 20 March 2006, 07:23 GMT
Task Type Patches
Category Font/charset
Status Closed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

I've created a patch that allows the user to customize the virtual keyboard. Basically, it takes a utf8 string and writes it to the screen line by line using the ui font and creates extra pages if needed. This allows the user to use any characters supported by their font in their keyboard layout.

To create a new layout, simply make a utf8 text file with the chars in the order you want and give it the extension 'kbd' (without quotes). Then just 'play' it from the file browser.

What's still needed:
1. A better default layout
2. A kbd file icon (it currently uses the font icon)
This task depends upon

Closed by  Marcoen Hirschberg (marcoen)
Thursday, 11 May 2006, 07:09 GMT
Reason for closing:  Accepted
Additional comments about closing:  already in cvs
Comment by Mikael Magnusson (mikaelh) - Monday, 20 March 2006, 20:48 GMT
I haven't looked carefully at the patch, but i have two thoughts. At line 421 (in the patch) you check if FONT_UI fits the screen, and otherwise you change to FONT_SYSFIXED, but it doesn't look like you check if that fits. And the other thing is, do you take doublewidth characters into account when doing the layout? I'd be interested in this for japanese input...
Comment by Frank Dischner (phaedrus961) - Monday, 20 March 2006, 21:52 GMT
I don't check if FONT_SYSFIXED fits the screen, because it always fits. However, there is at least one font that is too large to fit the recorder screen, thus the check for FONT_UI.

When drawing the layout it prints all chars using the max width of the font. So it should work with any chars that your font will display. Actually, it'll work with any chars, but you'll only see the ones that your font supports.
Comment by Frank Dischner (phaedrus961) - Thursday, 23 March 2006, 08:20 GMT
I've updated the patch with the following: better max width calculation (now uses the max width of the displayed chars) and korean input. To input korean, use a keyboard with the jamo characters (unicode u+3131 - u+3163) and simply select them as usual. The keyboard will 'automagically' join them into hangul syllables. Use cursor left/right to end a character without a trailing consonant.

I've also attached a premade korean kbd file for testing purposes (only includes jamo chars). Note: the only font that supports korean is unifont.

Comment by Frank Dischner (phaedrus961) - Thursday, 23 March 2006, 11:13 GMT
I changed the code to do in-place hangul combining. It now works very similar to Microsoft's korean IME.
Comment by Frank Dischner (phaedrus961) - Friday, 24 March 2006, 10:58 GMT
Updated patch changes the default keyboard to work the same as the original keyboard. Also, it no longer adds unnecessary blank lines between the keyboard and text.
Comment by Frank Dischner (phaedrus961) - Friday, 24 March 2006, 12:47 GMT
Korean input should now work like the koreans expect it to. Thanks to Jungti1234 for explaining it to me :)
Comment by JP (salival) - Thursday, 30 March 2006, 18:16 GMT
Would you consider to extend this in the direction of my feature request ( http://www.rockbox.org/tracker/task/4931 )?

Loading...