The attached patch contains the following changes:- Rename is_diac to diacs, since this variable is used as a counter- Split long lines- Simplify loop that writes skipped diacritics

I've tested with Hebrew text that contains diacritics, and it works for me. I would like to commit this soon - Amr, is that ok? I must have your full name for the credits, and to fulfill Rockbox requirements for contributing code (see docs/CONTRIBUTING).

One last thing: I would like you to explain (better have it written as a comment in the code itself) how did you get into the number 32?Does this number valid for *all targets*, and for *all fonts* ?I suggest you put a macro instead, with a formula that contains the defines this number is derived from, e.g.#define GLYPH_BITS_LENGTH (BLAH_BLAH * MAX_FOO / 8)

I've returned to the non-simple loop of writing skipped diacritics to avoid segmentation fault that happens in special cases when diacs = -1 from a previous decrement causing entering the loop where it shouldn't

Also a comment of the formula has been added : font.height * font.maxwidth / 8 , but I don't know how to make it a macro calculated by the preprocessor while height and maxwidth can be obtained only in runtime, as they are font-dependent…,

I calculated it manually with debugf() by trying out different fonts where height,maxwidth values range from the lowest (8,6) to max (16,16) for GNU_Unifont…, hence I based the hardcoded value on 16 * 16 / 8 = 32 … I hope I could find some generic value , but there is no stated restriction on font size http://www.rockbox.org/wiki/FontFormat