Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix fontkit CI #241

Merged
merged 2 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 8 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,11 @@ jobs:
name: Linux
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
override: true
uses: dtolnay/rust-toolchain@stable
- name: Install
run: |
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections;
Expand All @@ -42,35 +38,27 @@ jobs:

ci-macos:
name: macOS
runs-on: macos-12
runs-on: macos-14
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
override: true
uses: dtolnay/rust-toolchain@stable
- name: Build
run: cargo build
- name: Tests
run: cargo test

ci-win:
name: Windows
runs-on: windows-2019
runs-on: windows-2022
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
override: true
uses: dtolnay/rust-toolchain@stable
- name: Build
run: cargo build
- name: Tests
Expand Down
3 changes: 3 additions & 0 deletions src/loaders/freetype.rs
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,9 @@ impl Font {
}

let outline = &(*(*self.freetype_face).glyph).outline;
if outline.n_contours == 0 {
return Ok(());
}
let contours = slice::from_raw_parts(outline.contours, outline.n_contours as usize);
let point_positions = slice::from_raw_parts(outline.points, outline.n_points as usize);
let point_tags = slice::from_raw_parts(outline.tags, outline.n_points as usize);
Expand Down