WIP: Allow specifying font features in the editor
This just lays the foundation for threading through a `fonts::Features` struct, but it's not used yet.
This commit is contained in:
parent
3464961aa4
commit
b2c733baab
17 changed files with 167 additions and 44 deletions
|
@ -9,7 +9,10 @@ pub mod current {
|
|||
|
||||
use crate::{
|
||||
executor,
|
||||
fonts::{FontId, GlyphId, Metrics as FontMetrics, Properties as FontProperties},
|
||||
fonts::{
|
||||
Features as FontFeatures, FontId, GlyphId, Metrics as FontMetrics,
|
||||
Properties as FontProperties,
|
||||
},
|
||||
geometry::{
|
||||
rect::{RectF, RectI},
|
||||
vector::Vector2F,
|
||||
|
@ -335,7 +338,7 @@ pub enum RasterizationOptions {
|
|||
|
||||
pub trait FontSystem: Send + Sync {
|
||||
fn add_fonts(&self, fonts: &[Arc<Vec<u8>>]) -> anyhow::Result<()>;
|
||||
fn load_family(&self, name: &str) -> anyhow::Result<Vec<FontId>>;
|
||||
fn load_family(&self, name: &str, features: &FontFeatures) -> anyhow::Result<Vec<FontId>>;
|
||||
fn select_font(
|
||||
&self,
|
||||
font_ids: &[FontId],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue