mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Implement normal for FontSettings
This commit is contained in:
parent
e4cfff8364
commit
dcdc384122
3 changed files with 8 additions and 16 deletions
|
@ -196,6 +196,14 @@ pub enum FontSettings<T> {
|
|||
Tag(Vec<FontSettingTag<T>>)
|
||||
}
|
||||
|
||||
impl <T> FontSettings<T> {
|
||||
#[inline]
|
||||
/// Default value of font settings as `normal`
|
||||
pub fn normal() -> Self {
|
||||
FontSettings::Normal
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Parse> Parse for FontSettings<T> {
|
||||
/// <https://www.w3.org/TR/css-fonts-3/#propdef-font-feature-settings>
|
||||
fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>) -> Result<Self, ParseError<'i>> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue