View Single Post
Old 11-02-2018, 05:18 PM   #46
sherman
Guru
sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.
 
Posts: 875
Karma: 2676800
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
Quote:
Originally Posted by frostschutz View Post
found some bugs:

- font size 256pt is understood as 0pt (integer overflow)?
Um, yeah. Silly me wasn't expecting anyone to want a larger font size. That's an easy one to fix.

Quote:
- characters missing when using UTF-8 (string length miscalculation)?
Can you provide a test string, and let me know what characters are missing? Are they missing on a line break by any chance?

Quote:
xyzäöü1234567890 leaves out 890 presumably because 3 umlauts. is worse for CJK characters presumably because 3-4-byte chars instead of 2-byte-chars.
This may be due to string normalization. I may have to look into normalizing the string, or specifying that the caller needs to do it first (It's perfectly valid unicode to store the base character and umlauts as separate codepoints. Normalization combines them to one codepoint). We are using a utf-8 parser, and never assuming max 2 byte characters, so I don't THINK that's the problem.

Otherwise great! I will try to find a way to use this in my FlashCard mod.[/QUOTE]
Thanks for testing. I'm afraid I'm an english only speaker, so it's helpful to get reports from people trying to use different languages!
sherman is offline   Reply With Quote