Update of patch #1140 (project wesnoth):
Status: None => In Progress
_______________________________________________________
Follow-up Comment #3:
(this is also a reply to an e-mail)
Thanks for indicating where to show the bug and sorry, I should check Chinese
first, it's the most translated language. And all works fine.
I tested performance and, even if I still think that we can make it 10x
faster, it's irrelevant. Because the operation takes less than 1ms, and the
main bottleneck here is when SDL_ttf first draw the text (after that it's
cached) which is much slower and make the tiny time used for word wrapping
even more insignificant. We can also remove these 'inline' because even if
the compiler don't ignore them, there are useless. So, in short, forget
performance, let's make it readable.
In your mail, you mentioned something that I completely missed: these ranges
of characters are organized by language. If you are familiar enough with
these unicode ranges, can you add comment to indicate these separations?
Because I bet that another dev passing there will also not see this and will
'simplify' it.
Finlay, for your redundancy of is_cjk_char in help, one possible solution is
to declare is_cjk_char in the font namespace off marked-up_text.hpp like we
do for is_format_char (I even suggest to add it near this function, because
they are somehow similar).
About adding a global CJK flag when using such laguague, I am less sure now
that it is a good idea, because we often have a mix of untranslated English
strings and CJK strings. So we will need to also check if each string is
translated or not. Maybe not hard but it make your solution look simpler.
Plus, I believe that you actually support the case of several languages mixed
in one string, which a global CJK flag will not.
_______________________________________________________
Reply to this item at:
<http://gna.org/patch/?1140>
_______________________________________________
Message sent via/by Gna!
http://gna.org/
_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs