On Tue, 31 May 2022 08:35:11 -0400
LM <lmemsm_AT_gmail.com> wrote:
Dear LM,
> On Mon, May 30, 2022 at 11:33 AM Laslo Hunhold <dev_AT_frign.de> wrote:
> > What functions do you need in the context of Tuxmath?
>
> From what I remember, it just needs to figure out where to do a clean
> break for text wrapping with internationalized strings. Don't believe
> it uses the other features of libunistring. I've personally been
> trying to avoid gettext and use a port/fork of BSD's Citrus Project (
> http://citrus.bsdclub.org/ ) for accessing the translated strings.
> Just need a way to break the strings up in the appropriate locations
> for wrapping text and displaying on screen. If I get that working, I
> can replace or at least offer an alternative to the libunistring
> dependency.
I pushed line-break-detection[0][1] just yesterday. The functions
size_t grapheme_next_line_break(const uint_least32_t *, size_t);
and
size_t grapheme_next_line_break_utf8(const char *, size_t);
should be just the ones you'll need, depending on your internal
representation. It will give you the respective next line break
opportunity.
After a bit of cleanup, refactoring and writing manuals for all
functions I'll tag a release.
With best regards
Laslo
[0]:
https://git.suckless.org/libgrapheme/commit/0aaf3fcc7bb84fe97b8d75c9d5d14305d54d4dfd.html
[1]:
https://git.suckless.org/libgrapheme/file/grapheme.h.html
Received on Fri Jun 17 2022 - 08:59:08 CEST