Skip to content

Commit

Permalink
fix: wasm build
Browse files Browse the repository at this point in the history
  • Loading branch information
iola1999 committed Nov 25, 2024
1 parent 5ff930a commit 5370450
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/fonts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ use wasm_bindgen::JsCast;
#[cfg(target_arch = "wasm32")]
use woff2::decode::{convert_woff2_to_ttf, is_woff2};

#[cfg(not(target_arch = "wasm32"))]
fn load_font_buffer(path: impl AsRef<std::path::Path>) -> Option<Vec<u8>> {
match std::fs::read(path.as_ref()) {
Ok(buffer) => Some(buffer),
Expand Down

0 comments on commit 5370450

Please sign in to comment.