FS#9595 - Correct thai font display

Attached to Project: Rockbox
Opened by Phinitnun Chanasabaeng (crackerizer) - Monday, 01 December 2008, 15:47 GMT
Task Type Patches
Category User Interface
Status Unconfirmed
Assigned To No-one
Operating System All players
Severity Low
Priority Normal
Reported Version Daily build (which?)
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No


This patch will correct how thai vowels and tonal makers display.
   patch (4.5 KiB)
This task depends upon

Comment by Rafaël Carré (funman) - Tuesday, 02 December 2008, 16:33 GMT
you should use only 1 > and 1 < comparison for the thai vowels when they are next to each other:

+ if(*ucs == 0xe47 || *ucs == 0xe48 || *ucs == 0xe49 || *ucs == 0xe4a ||
+ *ucs == 0xe4b || *ucs == 0xe4c || *ucs == 0xe4d || *ucs == 0xe4e)

should become

if(*ucs >= 0xe47 && *ucs <= 0xe4e)
Comment by Phinitnun Chanasabaeng (crackerizer) - Tuesday, 02 December 2008, 16:51 GMT
Thank you for your comment. Here is the updated patch.
   patch (3.9 KiB)
Comment by freeMAN (freeMANsiam) - Monday, 29 December 2008, 21:21 GMT Comment by Jonas Häggqvist (rasher) - Tuesday, 30 December 2008, 02:49 GMT
A few things:
a) Rockbox is C89 - no mixing code with variable declarations.
b) This patch seems prone to bitrot, since you have the same code in 3 places. Would it be possible to centralise it?
Comment by Phinitnun Chanasabaeng (crackerizer) - Tuesday, 30 December 2008, 03:26 GMT
Jonas, thank you for your comment. This is a very dirty patch. I think adding somethings beyond this would be a new feature rather than a patch. I have been thinking about adding the complex text layout support to rockbox but my time doesn't allow me to :).

About the C89, as I'm not a programmer by nature, I don't know much about it. But I would look at it to standardize myself.

Thank you for your suggestion. :)