Map the target_pointer_width cfg's used for the opaque ffi interpreter
data structures to #ifdefs in CMake, to avoid that cbindgen generates
them multiple times without guard.
This is just a starting point, to be turned into a real Transform
element later, along with syntactic sugar to turn rotation, etc. into a
transform matrix in the generated output.
Our demos use some symbols such as the back arrow and the ugly style
uses a down arrow for the combo box. These symbols are not in Roboto and
also not in the default font font_kit gives us on macOS.
Therefore for WASM we switch over to DejaVu, which is bigger than
Roboto.
For macOS this patch implements rudimentary fallback list generation
using CTFontCopyDefaultCascadeListForLanguages. This needs further work
to respect the locale and correctly translate styles - eventually this
should go into font-kit.
A general aspect with the font fallback handling is that femtovg doesn't
support on-demand loading yet. Instead it uses owned_ttf_parser, so
every font will be read entirely off disk. That's why for macOS we trim
the list. We could perhaps do the analysis ourselves.
Linux and Windows are to follow.
Switch back to toml_edit for the Cargo.toml check, as that makes it easy
to also apply fixes -- the formatting is preserved.
This also removes the indirect serde_derive dependency that may be
causing problems on macOS sometimes.
Also, now that the cargo test doesn't trigger a build anymore, the use
of toml_edit here should not cause the problem mentioned in commit
ab89fcb69a anymore -- fingers crossed.
This reverts commit 0bb904e10a and
re-introduces the markdown table support extension. The resulting table
by default is too wide in the "responsive" read-the-docs theme, but with
a CSS tweak it becomes readable.
Markdown tables are much easier to deal with and this way we can also
include references within the tables.
Tear it out of the CMakeLists.txt and instead run it via
cargo xtask cppdocs
This allows the build_and_test step in the CI to only run cmake for the
library/header related bits and the docs_and_demos step to only generate
docs and not require a full host build of the library (as cargo xtask
cmake would otherwise do).
Currently the Qt backend still redirect everything to the GL backend,
but the goal is to use QPainter and QWindow
This also adds a "default" backend, whose goal is to select the proper
backend at compile time