mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Add font-style descriptor in @font-face
This commit is contained in:
parent
5405fb0d73
commit
8767b0d7cc
2 changed files with 24 additions and 0 deletions
|
@ -9,6 +9,7 @@
|
|||
#![deny(missing_docs)]
|
||||
|
||||
use computed_values::font_family::FamilyName;
|
||||
#[cfg(feature = "gecko")] use computed_values::font_style;
|
||||
use cssparser::{AtRuleParser, DeclarationListParser, DeclarationParser, Parser};
|
||||
use parser::{ParserContext, log_css_error, Parse};
|
||||
use std::fmt;
|
||||
|
@ -282,6 +283,22 @@ macro_rules! font_face_descriptors {
|
|||
}
|
||||
|
||||
/// css-name rust_identifier: Type = initial_value,
|
||||
#[cfg(feature = "gecko")]
|
||||
font_face_descriptors! {
|
||||
mandatory descriptors = [
|
||||
/// The specified url.
|
||||
"font-family" family: FamilyName = FamilyName(atom!("")),
|
||||
|
||||
/// The format hints specified with the `format()` function.
|
||||
"src" sources: Vec<Source> = Vec::new(),
|
||||
]
|
||||
optional descriptors = [
|
||||
/// The style of this font face
|
||||
"font-style" style: font_style::T = font_style::T::normal,
|
||||
]
|
||||
}
|
||||
|
||||
#[cfg(feature = "servo")]
|
||||
font_face_descriptors! {
|
||||
mandatory descriptors = [
|
||||
/// The specified url.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue