cosmic-text/src/font
Mohammad AlSaleh 329941c4a6 Try harder to succeed at fall-backing to a Monospace font
A combination of some ideas:

 * Try all Monospace fonts before giving up.
 * Relax exact weight restriction on font matching when trying Monospace
   fall-back. Try smaller weights if needed.
 * Make the fall-back try order weight-offset aware, AND script-aware.
 * And finally, add the option to adjust the font size of glyphs using
   fall-back Monospace fonts, so the width of them matches the default
   font width.

   For my use-case, the current fall-back attempt always fails with
   Arabic script. And none of the Arabic-supporting Monospace fonts in
   my system also support medium weight. So, if my default font is set
   to medium weight, script-aware fall-back alone will still not work.

Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
2024-01-17 13:31:03 -07:00
..
fallback Try harder to succeed at fall-backing to a Monospace font 2024-01-17 13:31:03 -07:00
mod.rs Try harder to succeed at fall-backing to a Monospace font 2024-01-17 13:31:03 -07:00
system.rs Try harder to succeed at fall-backing to a Monospace font 2024-01-17 13:31:03 -07:00