mirror of
https://github.com/rive-app/rive-cpp.git
synced 2026-01-18 21:21:17 +01:00
Adds runtime and editor support for setting feature flags on a Font. The biggest change to the font engine is that the feature options are now stored on the Font object itself instead of hard-coded during shaping. This is nice as it requires no extra data to be piped through for individual run styling. It also means that we generalized the concept of creating a variable font as configuring a version of the font (see withOptions replacing makeVariation) so that variable axis and feature settings are treated as options to a Font configuration. This also allows us to track existing variations and options on the configured Font such that any further call to "withOptions" on that already configured Font will propagate previous changes if not overridden. This fortuitously also fixes an issue the modifiers were exhibiting where a variation set on the TextStyle that wasn't part of the modifier set would be lost. Diffs= 31d9a5424 Feature options on Fonts (#5479) Co-authored-by: Luigi Rosso <luigi-rosso@users.noreply.github.com>
35 lines
1.0 KiB
Bash
35 lines
1.0 KiB
Bash
#!/bin/bash
|
|
|
|
unameOut="$(uname -s)"
|
|
case "${unameOut}" in
|
|
Linux*) MACHINE=linux ;;
|
|
Darwin*) MACHINE=mac ;;
|
|
CYGWIN*) MACHINE=cygwin ;;
|
|
MINGW*) MACHINE=mingw ;;
|
|
*) MACHINE="UNKNOWN:${unameOut}" ;;
|
|
esac
|
|
|
|
# check if use has already installed premake5
|
|
if ! command -v premake5 &>/dev/null; then
|
|
# no premake found in path
|
|
if [[ ! -f "bin/premake5" ]]; then
|
|
mkdir -p bin
|
|
pushd bin
|
|
echo Downloading Premake5
|
|
if [ "$MACHINE" = 'mac' ]; then
|
|
PREMAKE_URL=https://github.com/premake/premake-core/releases/download/v5.0.0-beta2/premake-5.0.0-beta2-macosx.tar.gz
|
|
else
|
|
PREMAKE_URL=https://github.com/premake/premake-core/releases/download/v5.0.0-beta2/premake-5.0.0-beta2-linux.tar.gz
|
|
fi
|
|
curl $PREMAKE_URL -L -o premake.tar.gz
|
|
# Export premake5 into bin
|
|
tar -xvf premake.tar.gz 2>/dev/null
|
|
# Delete downloaded archive
|
|
rm premake.tar.gz
|
|
popd
|
|
fi
|
|
export PREMAKE=$PWD/bin/premake5
|
|
else
|
|
export PREMAKE=premake5
|
|
fi
|