Overhaul Font type to allow font family selection
This commit is contained in:
parent
a7580e0696
commit
b29de28d1f
25 changed files with 147 additions and 256 deletions
|
|
@ -57,7 +57,7 @@ impl Hit {
|
|||
/// A renderer capable of measuring and drawing [`Text`].
|
||||
pub trait Renderer: crate::Renderer {
|
||||
/// The font type used.
|
||||
type Font: Default + Clone;
|
||||
type Font: Copy;
|
||||
|
||||
/// The icon font of the backend.
|
||||
const ICON_FONT: Self::Font;
|
||||
|
|
@ -72,6 +72,9 @@ pub trait Renderer: crate::Renderer {
|
|||
/// [`ICON_FONT`]: Self::ICON_FONT
|
||||
const ARROW_DOWN_ICON: char;
|
||||
|
||||
/// Returns the default [`Font`].
|
||||
fn default_font(&self) -> Self::Font;
|
||||
|
||||
/// Returns the default size of [`Text`].
|
||||
fn default_size(&self) -> f32;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue