Add font-family to Text style in iced_web

This commit is contained in:
Héctor Ramón Jiménez 2020-02-06 05:03:11 +01:00
parent ad500441af
commit f719ba3f4e
2 changed files with 7 additions and 2 deletions

View file

@ -133,12 +133,16 @@ impl<'a, Message> Widget<Message> for Text {
let style = bumpalo::format!(
in bump,
"width: {}; height: {}; font-size: {}px; color: {}; text-align: {}",
"width: {}; height: {}; font-size: {}px; color: {}; text-align: {}; font-family: {}",
width,
height,
self.size.unwrap_or(20),
color,
text_align
text_align,
match self.font {
Font::Default => "inherit",
Font::External { name, .. } => name,
}
);
// TODO: Complete styling