Skip to content

Commit

Permalink
Briefly explain DirectWrite script fallback workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
xorgy committed Sep 30, 2024
1 parent 3ffe71f commit 49fa8d0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fontique/src/backend/dwrite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ impl SystemFonts {
}

pub fn fallback(&mut self, key: impl Into<FallbackKey>) -> Option<FamilyId> {
// DirectWrite does not have a function to get the default font for a script and locale pair
// so here we provide a sample of the intended script instead.
let key = key.into();
let text = key.script().sample()?;
let locale = key.locale();
Expand Down

0 comments on commit 49fa8d0

Please sign in to comment.