Implement font::load command in iced_native

This commit is contained in:
Héctor Ramón Jiménez 2023-02-04 11:12:15 +01:00
parent b29de28d1f
commit 238154af4a
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
14 changed files with 384 additions and 241 deletions

View file

@ -2,6 +2,8 @@ use crate::renderer::{self, Renderer};
use crate::text::{self, Text};
use crate::{Background, Font, Point, Rectangle, Size, Theme, Vector};
use std::borrow::Cow;
/// A renderer that does nothing.
///
/// It can be useful if you are writing tests!
@ -52,6 +54,8 @@ impl text::Renderer for Null {
16.0
}
fn load_font(&mut self, _font: Cow<'static, [u8]>) {}
fn measure(
&self,
_content: &str,