Skip to content

Commit

Permalink
Migrate away from a deprecated Direct2D method.
Browse files Browse the repository at this point in the history
  • Loading branch information
xStrom committed Oct 18, 2024
1 parent 51504f5 commit 75019f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion piet-direct2d/src/text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ fn resolve_family_name(family: &FontFamily) -> &str {
impl LoadedFontsInner {
fn add(&mut self, font_data: &[u8]) -> Result<FontFamily, Error> {
let font_data: Arc<Vec<u8>> = Arc::new(font_data.to_owned());
let font_file = FontFile::new_from_data(font_data).ok_or(Error::FontLoadingFailed)?;
let font_file = FontFile::new_from_buffer(font_data).ok_or(Error::FontLoadingFailed)?;
let collection_loader = CustomFontCollectionLoaderImpl::new(&[font_file.clone()]);
let collection = FontCollection::from_loader(collection_loader);
let mut families = collection.families_iter();
Expand Down

0 comments on commit 75019f9

Please sign in to comment.