mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-27 07:59:51 +00:00

This is a "it's known to be broken, so let's rip it out and put in a minimal replacement" change. Updated raw pointers to smart pointers just because, updated the docs a bit, and ended up with a big change. Fixes the most visible part of #5194, where Chinese needed DroidSansFallbackFull to be loaded before DroidSansJapanese. The removed code in `char_block_map::insert` and `char_block_map::compress` had a bug that triggered when one font had a contiguous range of codepoints that was a superset of several ranges in another font - this meant it treated the first font containing U+4E00 as having the whole CJK Unified Ideographs block. Remove the now-unused font codepoints WML. There is no schema change for this, it seems the data/hardwired/fonts.cfg file isn't checked by the validation. Optimise calling set_font_list with the same list (but possibly reordered), by reusing the already-loaded fonts.