Skip to content

Commit

Permalink
feat: re-export PathSegment
Browse files Browse the repository at this point in the history
  • Loading branch information
zimond committed Sep 25, 2023
1 parent 8bd9ea5 commit 27d54ef
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/font.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,17 @@ pub struct FontKey {
pub family: String,
}

impl FontKey {
pub fn new_with_family(family: String) -> Self {
FontKey {
weight: 400,
italic: false,
stretch: 5,
family,
}
}
}

impl fmt::Display for FontKey {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(
Expand Down
1 change: 1 addition & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ pub use font::*;
pub use metrics::*;
#[cfg(feature = "ras")]
pub use ras::*;
pub use tiny_skia_path::PathSegment;

#[cfg_attr(wasm, wasm_bindgen)]
pub struct FontKit {
Expand Down

0 comments on commit 27d54ef

Please sign in to comment.