TextStyle::default()
ask system for known existing font family
Rather than assuming a specific family exists, try a set of specific names and if they fail, just grab any old font that the system reports as existing Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
parent
1fc9103b61
commit
31516b7863
4 changed files with 56 additions and 16 deletions
|
@ -343,6 +343,7 @@ pub enum RasterizationOptions {
|
|||
|
||||
pub trait FontSystem: Send + Sync {
|
||||
fn add_fonts(&self, fonts: &[Arc<Vec<u8>>]) -> anyhow::Result<()>;
|
||||
fn all_families(&self) -> Vec<String>;
|
||||
fn load_family(&self, name: &str, features: &FontFeatures) -> anyhow::Result<Vec<FontId>>;
|
||||
fn select_font(
|
||||
&self,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue