fcft-3.0 #689

Open
dnkl wants to merge 38 commits from fcft-3 into master
dnkl commented 2 months ago
Owner

(note: you need to build against the 3.0-dev branch in fcft)

This PR implements all changes necessary for the upcoming fcft-3.0 release.

  • layout tags removed from fcft_grapheme_rasterize()
  • wchar_t -> char32_t transition

The last point is the big one. I decided to update foot to use char32_t instead of wchar_t, for pretty much the same reasons fcft (plus, fcft's APIs now use char32_t...).

Now, there aren't really any corresponding c32*() functions to replace with wchar ones. What we have is c32rtomb() and mbrtoc32(), allowing us to convert one codepoint at a time. That's it. No c32len() or similar.

For this reason, I've added a c32 abstraction layer that implements the various string functions used throughout foot. For the time being, most are wrappers around the wcs*() equivalents. The only ones that aren't, are the conversion functions, which are implemented by means of c32rtomb() and mbrto32().

I've added compile time checks that verify:

a) that wchar_t and char32_t have the same size
b) that both use UTF-32

The last point is, in general, not true on FreeBSD. However, they do use UTF-32 in UTF-8 locales.

The idea is to be able replace these, if necessary, or when appropriate APIs become available. Note: we could start using an external Unicode library, but I decided not to.

(note: you need to build against the 3.0-dev branch in fcft) This PR implements all changes necessary for the upcoming fcft-3.0 release. * layout tags removed from `fcft_grapheme_rasterize()` * `wchar_t` -> `char32_t` transition The last point is the big one. I decided to update foot to use `char32_t` instead of `wchar_t`, for pretty much the same reasons [fcft](https://codeberg.org/dnkl/fcft/pulls/35) (plus, fcft's APIs now use `char32_t`...). Now, there aren't really any corresponding `c32*()` functions to replace with wchar ones. What we have is `c32rtomb()` and `mbrtoc32()`, allowing us to convert one codepoint at a time. That's it. No `c32len()` or similar. For this reason, I've added a c32 abstraction layer that implements the various string functions used throughout foot. **For the time being, most are wrappers around the `wcs*()` equivalents**. The only ones that aren't, are the conversion functions, which are implemented by means of `c32rtomb()` and `mbrto32()`. I've added **compile time** checks that verify: a) that `wchar_t` and `char32_t` have the same size b) that both use UTF-32 The last point is, in general, **not** true on FreeBSD. However, they **do** use UTF-32 **in UTF-8 locales**. The idea is to be able replace these, if necessary, or when appropriate APIs become available. Note: we _could_ start using an external Unicode library, but I decided not to.
dnkl added the
refactor
label 2 months ago
dnkl added this to the 1.9.0 milestone 2 months ago
dnkl force-pushed fcft-3 from 4b683ef4d1 to 6a47a68ed8 2 months ago
dnkl removed this from the 1.9.0 milestone 2 months ago
dnkl force-pushed fcft-3 from 6a47a68ed8 to 80b42275bf 2 months ago
dnkl force-pushed fcft-3 from 80b42275bf to 9030b4e75d 2 months ago
dnkl force-pushed fcft-3 from 9030b4e75d to 7f9d69ed38 2 months ago
dnkl force-pushed fcft-3 from 7f9d69ed38 to 33f2604eac 2 months ago
dnkl force-pushed fcft-3 from 33f2604eac to 0cc758e937 2 months ago
dnkl force-pushed fcft-3 from 72cca34526 to b698659e7f 2 months ago
dnkl force-pushed fcft-3 from b698659e7f to 2a62dadfa6 2 months ago
dnkl force-pushed fcft-3 from 50c2e164f1 to 83add2f0dc 2 months ago
dnkl force-pushed fcft-3 from 83add2f0dc to d30a078994 2 months ago
dnkl force-pushed fcft-3 from d30a078994 to 1c94d08ecf 2 months ago
dnkl force-pushed fcft-3 from 1c94d08ecf to e68b6ec6e1 1 month ago
dnkl force-pushed fcft-3 from e68b6ec6e1 to e81ff08583 1 month ago
dnkl force-pushed fcft-3 from e81ff08583 to 73c7b66c67 4 weeks ago
dnkl force-pushed fcft-3 from 73c7b66c67 to 9ddae4b631 4 weeks ago
dnkl force-pushed fcft-3 from 9ddae4b631 to 09ae116af1 4 weeks ago
dnkl force-pushed fcft-3 from 09ae116af1 to fa0c82eda6 3 weeks ago
dnkl force-pushed fcft-3 from fa0c82eda6 to 5764742374 3 weeks ago
dnkl added 1 commit 3 weeks ago
ab2bbc3dff
ci: use fcft 3.0-dev branch
dnkl force-pushed fcft-3 from ab2bbc3dff to b4c117ed84 1 week ago
dnkl force-pushed fcft-3 from b4c117ed84 to f1d3608f1a 6 days ago
dnkl added 1 commit 6 days ago
98dd1d1cf7
ci: explicitly use fcft-3.0-dev branch
All checks were successful
continuous-integration/woodpecker the build was successful
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
Sign in to join this conversation.
Loading…
There is no content yet.