2c0490a26e
stringwidth() and string() sometimes failed spuriously due to the wrong assumption that cachechars() will only fail when a different subfont is needed. in fact, cachechars() can fail for other reasons like when it resizes the fontcache (or fails todo so). theres also the case when loadchar() is unable to translate a character and returns 0. this case needs to be differentiated from such temporary conditions like fontcache resize or subfont load to stop the retry loop in string() and stringwidth(). now cachechars() returns -1 to indicate that it cannot proceed and we test this in string() and stringwidth() to skip over untranslatable characters to make progress instead of retrying. |
||
---|---|---|
.. | ||
doc | ||
games/lib | ||
include | ||
lib | ||
man | ||
src |