Commit graph

83 commits

Author SHA1 Message Date
Simon Hausmann
3f6bbaf53a Make it possible to use the C++ headers without CMake
Detect the pointer size solely via the pre-processor
2021-03-31 08:42:54 +02:00
Simon Hausmann
272a87ccf1 Fix C++ build
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.
2021-03-25 09:37:34 +01:00
Simon Hausmann
715c9f407e Don't require a license for Qt .ui files 2021-03-23 17:33:39 +01:00
Simon Hausmann
2b21e7f827 Add support for showing doxygen warnings
By using the --show-warnings option
2021-03-23 12:56:24 +01:00
Olivier Goffart
bd6cace54c Test and fix C++ invokation of callback 2021-03-22 14:30:00 +01:00
Simon Hausmann
d6c109d456 Don't crash when encounting the spin_on conditionaly dependency
I need to see if this is correct, but meanwhile this should fix the CI
2021-03-19 17:30:44 +01:00
Simon Hausmann
9a8c6bf9f7 Move the string_to_slice helper into sixtyfps_string.h for easier editing 2021-03-19 14:16:30 +01:00
Simon Hausmann
3bb4b87bc7 Use a free-standing function for the string_view to slice conversion 2021-03-19 13:13:08 +01:00
Simon Hausmann
0c21008861 Add internal convenience API to construct a C++ slice from a string view 2021-03-19 12:54:22 +01:00
Olivier Goffart
dbf06f73cc Link the C++ lib against the interpreter 2021-03-17 11:44:45 +01:00
Olivier Goffart
e7cbc716ed Generate a header file for the interpreter API 2021-03-17 11:26:44 +01:00
Olivier Goffart
0e351de1a6 Create a new crate to expose the C++ 2021-03-16 16:34:02 +01:00
Olivier Goffart
6f88d78303 Rename Resource to ImageReference in the runtime 2021-03-11 10:06:23 +01:00
Simon Hausmann
391d0152f0 Add Color::brighter/darker functions
These are exposed in .60 as well as in Rust and C++ and implemented by
converting to HSV color space and adjusting the brightness (value).
2021-02-24 10:49:27 +01:00
Simon Hausmann
508adb838a Fix missing license headers 2021-02-22 11:17:39 +01:00
Simon Hausmann
500919745e Add an internal Rotate element
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.
2021-02-12 17:31:06 +01:00
Simon Hausmann
2dd5ea61bb Add support for Path.fill-rule
For some reason it's not working with the Qt renderer though
2021-02-10 14:08:32 +01:00
Simon Hausmann
7982325da4 Change Rectangle::background's type to be a brush
This also introduces the brush type in the compiler and generators. At the
moment only conversion from Color is implemented.
2021-02-03 12:49:44 +01:00
Olivier Goffart
54c979d9e6 Make it so that you don't need to run xtask through cargo 2021-02-02 08:39:06 +01:00
Olivier Goffart
09ce4142a5 Some reorganization of the testdriver 2021-02-01 18:13:19 +01:00
Olivier Goffart
efd6a5479c don't make xtask depends on the test driver lib 2021-02-01 18:13:08 +01:00
Simon Hausmann
de67b865dc Implement basic font fallbacks for WASM and macOS
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.
2021-01-14 08:53:14 +01:00
Simon Hausmann
e74159f993 Fix license header check 2021-01-14 08:53:13 +01:00
Olivier Goffart
16f5a03c14 Run cargo fmt 2020-12-18 10:29:15 +01:00
Olivier Goffart
0d2d48be4f Rename "signal" to "callback" 2020-12-18 09:51:01 +01:00
Olivier Goffart
c77109d257 Fix the extension of the npm package 2020-12-09 16:15:08 +01:00
Olivier Goffart
05b33968ad Fix license check 2020-12-08 16:51:21 +01:00
Simon Hausmann
1591049c64 Fix license check after moving files around 2020-11-27 16:00:03 +01:00
Simon Hausmann
a4807d03ce Fix license check 2020-11-27 14:51:52 +01:00
Olivier Goffart
5b93fe4b7c Fix license check 2020-11-13 14:28:35 +01:00
Simon Hausmann
b782038aad Avoid including the tarball for npm
Don't include the package inside itself if it's there.
2020-10-22 13:22:26 +02:00
Simon Hausmann
008455a106 Include a license file in the node source package 2020-10-22 13:14:56 +02:00
Olivier Goffart
2f2e76cfd5 Missing license header 2020-10-22 11:54:59 +02:00
Simon Hausmann
f3d87f00a6 Added a little xtask to create a source package in one go
This is a wrapper around `npm pack` that temporarily edits the relative
paths out of `Cargo.toml` to make the package work outside of the git
repo.
2020-10-22 10:58:20 +02:00
Olivier Goffart
eb73f987e0 Update cargo-metadata dependency 2020-10-21 08:58:48 +02:00
Olivier Goffart
4d4aa81007 Revert the commit than pins aho-corasick version
This reverts commit 0c8a31211e.

aho-corasick 0.7.14
2020-10-13 07:57:02 +02:00
Olivier Goffart
1138c9dbed Normalize the spelling of SixtyFPS 2020-10-13 07:48:55 +02:00
Simon Hausmann
0c8a31211e Work around build failure on macOS
I keep running into https://github.com/BurntSushi/aho-corasick/issues/64
on macOS, so pin aho-corasick to 0.7.4.
2020-10-12 14:46:21 +02:00
Olivier Goffart
ce3fa5e7cf Fix license header check 2020-10-07 11:51:55 +02:00
Olivier Goffart
8b02568b4b Refactor the cmake C++ build 2020-10-07 11:40:34 +02:00
Simon Hausmann
c39674ae4a Fix license header check 2020-10-06 22:03:11 +02:00
Simon Hausmann
958f6d2d3c Fix license header check again
After renaming the webpack config files
2020-10-05 16:52:23 +02:00
Simon Hausmann
79150a9b20 Apply the same license (check) as for .js files 2020-10-05 16:06:14 +02:00
Simon Hausmann
30f2be7a22 Fix license check 2020-10-05 15:26:29 +02:00
Simon Hausmann
5695e251b7 Fix wasm builds
We're running into https://github.com/parcel-bundler/parcel/issues/1573
so switch back to webpack.
2020-10-05 11:29:40 +02:00
Simon Hausmann
7c4ec36442 Rework Cargo.toml license checking
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.
2020-09-07 20:38:04 +02:00
Olivier Goffart
5682b7c989 The rust.yaml file was renamed 2020-09-07 14:25:00 +02:00
Simon Hausmann
800b9d5b15 Fix license header check for css/html templates for C++ docs 2020-09-04 11:50:45 +02:00
Simon Hausmann
f4958abba5 Simplify C++ docs build directory setup
Symlink the _static directory instead.
2020-09-04 11:30:51 +02:00
Simon Hausmann
4fbb24e804 Print a message of success when the license check completes 2020-09-02 17:19:47 +02:00