...hence they can be plugged, yay. Also introduce a scoped_istream to
prevent leaking descriptors in case of exceptions. Once again, the
stream changes are purely on the interface level for the time being,
so there can be a slight performance hit when no cache is present. But
once the cache is built, everything should be fine, even faster than
it was before the changes. And isn't that the point of a cache?
...and the support for the sazanami-gothic.ttf font. Fixed SDL_ttf so
it works with this font. Not adding the font itself (it is about
7Mb!). Testers should add it manually in the font/ directory.
* Added the complete utf8_string to text_surface again
* split only if necessary e.g. on the first call to width or height
* update set_text to set w_ and h_ to -1
* text_cache works again at least I get alot of hits in the campaign
selection dialog if scrolling up and down
* Added operator== for text_chunk
* updated text_surface to store text_chunks instead of the str
* updated text_surface to render and measure ucs2_strings instead
of UTF-8
* moved the split to the constructor and set_text
* added string parameter to hash because we don't store the string anymore
* changed text_chunk to store utf8 and ucs2 versions of the text
* cleaned up split text and updated it to fill ucs2 values too
* minor changes to measure_ucs2_text_line
* Changed the text_chunk to contain a UTF-8 string instead of a UCS4
string
* Updated split text to convert UTF-8 to UCS4 to look up the subset id
and add UTF-8 strings to the text_chunk in the same loop.
* Changed some text_surface inspectors to be public.
* Changed text_surface::measure to use TTF_SizeUTF8
* Changed text_surface::get_surfaces to use TTF_RenderUTF8_Blended
* Changed text_surface::equal to text_surface::equals and let it use
operator==(const SDL_Color&, const SDL_Color&)
* Moved byte_size_from_utf8_first out of the anonymous namespace and
added a prototype in language hpp.
* Moved the invalid_utf8_exception to language.hpp
I think all the character encoding string conversion functions should
be moved to serialization/string_utils.
* Added the ability for texts to be displayed in multiple fonts, depending on
characters.
* Fixed a few strings missing from translations
* Update pot and po files
* Fixed a bug, occuring when scrollbars are too small to contain the buttons
and the grip, resulting in huge scrollbars.
The alpha setting of the surface was messed, let's always force it
(not sure about SDL_RLEACCEL though). I can't explain why it resulted
in this garbled display, and more importantly why it only happened
recently; so there may still be another problem lurking somewhere.
This code was indirectly included in at least 25 files: the 25 files
for which a dependency on string_utils.hpp has been added by a
consequence of its removal from animated.hpp. It should induce a small
compile time improvement.
Made wesnoth link statically to those SDL_ttf files
Added checking for libfreetype in the autotools scripts.
Warning: changes made to the autotools script! they work for me, but
need testing and reviewing!
The main reason for that is that SDL_ttf 2.0.6 still has fatal
memory-corruption bugs, fixed in CVS. This fix looks like to prevent manu
segfaults for some configurations using the French translation.
This fix may be reverted when SDL_ttf 2.0.7 is released (or not).