Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17625

Could anyone help with UTF-8 line breaking in C?

$
0
0

C, not C++. Just want to say that upfront.

So, we maintain an old libre open source game called Project: Starfighter, originally developed by Parallel Realities in 2003. As you might imagine, it didn't originally support Unicode; we added unicode support (or more specifically UTF-8 support) in later.

Unfortunately it seems one aspect of the Unicode system we implemented is broken: line wrapping. We thought we had this solved with the Pango library (the only one we could find), which reports where line breaks can be made… but it reports on a grapheme cluster level, not at a code …


Viewing all articles
Browse latest Browse all 17625

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>