On Friday, 25 October 2024 at 12:21:14 UTC, IchorDev wrote:
On Friday, 25 October 2024 at 09:44:18 UTC, cookiewitch wrote:
On Thursday, 24 October 2024 at 12:02:00 UTC, IchorDev wrote:
Anyway, at this stage, how difficult is it to make a custom
Fluid backend? (e.g. SDL2 for input or a different renderer)
The backend API still isn't very polished. It's not difficult,
but it takes some time to prepare. I also regret choosing a
Raylib-like API rather than an event-based on. I want to
change that in a later update, probably 0.8.0 or 0.9.0.
I will check in again once that's done. :)
Also does this project have proper text layout support? I
noticed there’s a dependency on FreeType; but FreeType
doesn’t do layout, only rendering. I’m about to release
[BindBC-Pango](https://github.com/BindBC/bindbc-pango) if you
need a text layout engine. They’re absolutely imperative for
acceptable internationalisation support.
That is true, Fluid can only do the basic left-to-right text
layout right now. To be frank, it isn't even able to center or
right align text. So far I've opted for Freetype, because I'm
more familiar with APIs of its kind and I wanted to save some
of my time, but it might be about time I tried Pango. Thank
you for your work on the bindings, I'll check them out!
No problem! Only thing holding me from putting it on dub is
that its dependency BindBC-GLib has no README yet.
BindBC-Pango comes with an example that should adequately
demonstrate the basics of how to make use of it with FreeType's
renderer. If you want to make your own renderer, I've
translated enough of GObject's macros into string mixin
generators that you can sub-class Pango's base render class
like you would in C without any extra hassle [...]
Looking through Pango's documentation and code, [integrating it
with Fluid might be
tricky](https://git.samerion.com/Samerion/Fluid/issues/197). This
topic is also complex and there are things I don't understand
about Pango's approach that I can't find an explanation of. This
is probably something I'll have to spend a lot of time on to get
a proper grasp of.
I'd really appreciate it if there were some other, more
comprehensive learning resources. Do you know any?