summaryrefslogtreecommitdiffstats
path: root/native/src/renderer/null.rs
diff options
context:
space:
mode:
Diffstat (limited to 'native/src/renderer/null.rs')
-rw-r--r--native/src/renderer/null.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/native/src/renderer/null.rs b/native/src/renderer/null.rs
index 9376d540..150ee786 100644
--- a/native/src/renderer/null.rs
+++ b/native/src/renderer/null.rs
@@ -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!
@@ -40,14 +42,20 @@ impl Renderer for Null {
impl text::Renderer for Null {
type Font = Font;
- const ICON_FONT: Font = Font::Default;
+ const ICON_FONT: Font = Font::SansSerif;
const CHECKMARK_ICON: char = '0';
const ARROW_DOWN_ICON: char = '0';
+ fn default_font(&self) -> Self::Font {
+ Font::SansSerif
+ }
+
fn default_size(&self) -> f32 {
- 20.0
+ 16.0
}
+ fn load_font(&mut self, _font: Cow<'static, [u8]>) {}
+
fn measure(
&self,
_content: &str,