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 23, 2023
1 parent 8bd9ea5 commit 5d92b70
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/font.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,14 @@ pub struct FontKey {
pub family: String,
}

impl FontKey {
pub fn new_with_family(family: String) -> Self {
let mut key = FontKey::default();
key.family = family;
key
}
}

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 5d92b70

Please sign in to comment.