Skip to content

Commit

Permalink
Implement Font Fallback (#24)
Browse files Browse the repository at this point in the history
This switches the text engine to `cosmic-text` which provides font
fallback so characters that are not supported by the selected / default
font are supported by choosing an appropriate font that the operating
system provides.

Additionally this improves the CI a bit.
  • Loading branch information
CryZe authored Apr 7, 2023
1 parent c8f70da commit 0ea3105
Show file tree
Hide file tree
Showing 5 changed files with 298 additions and 82 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/before_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ main() {

if [ "$OS_NAME" = "ubuntu-latest" ]; then
mkdir -p $stage/obs-livesplit-one/bin/$PLUGIN_BITS
cp target/$TARGET/release/libobs_livesplit_one.so $stage/obs-livesplit-one/bin/$PLUGIN_BITS/libobs-livesplit-one.so
cp target/$TARGET/max-opt/libobs_livesplit_one.so $stage/obs-livesplit-one/bin/$PLUGIN_BITS/libobs-livesplit-one.so
elif [ "$OS_NAME" = "macOS-latest" ]; then
cp target/$TARGET/release/libobs_livesplit_one.dylib $stage/obs-livesplit-one.so
cp target/$TARGET/max-opt/libobs_livesplit_one.dylib $stage/obs-livesplit-one.so
elif [ "$OS_NAME" = "windows-latest" ]; then
cp target/$TARGET/release/obs_livesplit_one.dll $stage/obs-livesplit-one.dll
cp target/$TARGET/max-opt/obs_livesplit_one.dll $stage/obs-livesplit-one.dll
fi

cd $stage
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_shared.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ main() {
local release_flag=""
local target_folder="debug"
if [ "$IS_DEPLOY" = "true" ]; then
release_flag="--release"
target_folder="release"
release_flag="--profile max-opt"
target_folder="max-opt"
fi

if [ -z "$FEATURES" ]; then
Expand Down
24 changes: 10 additions & 14 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ on:
tags:
- '*'

env:
CARGO_TERM_COLOR: always
# The colors mess with the problem matcher.
# env:
# CARGO_TERM_COLOR: always

jobs:
build:
Expand All @@ -36,30 +37,28 @@ jobs:
- label: Windows aarch64
target: aarch64-pc-windows-msvc
os: windows-latest
features: font-loading
cross: skip
install_target: true

- label: Windows i686
target: i686-pc-windows-msvc
os: windows-latest
features: font-loading
cross: skip
install_target: true
bits: 32bit

- label: Windows x86_64
target: x86_64-pc-windows-msvc
os: windows-latest
features: font-loading,auto-splitting
features: auto-splitting
cross: skip

- label: Windows x86_64-v3
target: x86_64-pc-windows-msvc
target_rename: x86_64_v3-pc-windows-msvc
rust_flags: -C target-cpu=x86-64-v3
os: windows-latest
features: font-loading,auto-splitting
features: auto-splitting
cross: skip

- label: Linux arm Hardware Float
Expand Down Expand Up @@ -88,36 +87,34 @@ jobs:
- label: Linux x86_64
target: x86_64-unknown-linux-gnu
os: ubuntu-latest
features: font-loading,auto-splitting
cross: skip
features: auto-splitting

- label: Linux x86_64-v3
target: x86_64-unknown-linux-gnu
target_rename: x86_64_v3-unknown-linux-gnu
rust_flags: -C target-cpu=x86-64-v3
os: ubuntu-latest
features: font-loading,auto-splitting
cross: skip
features: auto-splitting

- label: macOS aarch64
target: aarch64-apple-darwin
os: macOS-latest
features: font-loading,auto-splitting
features: auto-splitting
cross: skip
install_target: true

- label: macOS x86_64
target: x86_64-apple-darwin
os: macOS-latest
features: font-loading,auto-splitting
features: auto-splitting
cross: skip

- label: macOS x86_64-v3
target: x86_64-apple-darwin
target_rename: x86_64_v3-apple-darwin
rust_flags: -C target-cpu=x86-64-v3
os: macOS-latest
features: font-loading,auto-splitting
features: auto-splitting
cross: skip

steps:
Expand Down Expand Up @@ -154,7 +151,6 @@ jobs:
key: ${{ matrix.target }}

- name: Build Shared Library
if: matrix.dylib == ''
run: sh .github/workflows/build_shared.sh
env:
TARGET: ${{ matrix.target }}
Expand Down
Loading

0 comments on commit 0ea3105

Please sign in to comment.