mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Qualify libstyle enums.
This commit is contained in:
parent
9068e62f2a
commit
d759b07299
5 changed files with 38 additions and 38 deletions
|
@ -130,7 +130,7 @@ impl FontHandleMethods for FontHandle {
|
|||
unsafe { (*self.face).style_flags & FT_STYLE_FLAG_ITALIC != 0 }
|
||||
}
|
||||
fn boldness(&self) -> font_weight::T {
|
||||
let default_weight = font_weight::Weight400;
|
||||
let default_weight = font_weight::T::Weight400;
|
||||
if unsafe { (*self.face).style_flags & FT_STYLE_FLAG_BOLD == 0 } {
|
||||
default_weight
|
||||
} else {
|
||||
|
@ -140,15 +140,15 @@ impl FontHandleMethods for FontHandle {
|
|||
if valid {
|
||||
let weight =(*os2).usWeightClass;
|
||||
match weight {
|
||||
1 | 100...199 => font_weight::Weight100,
|
||||
2 | 200...299 => font_weight::Weight200,
|
||||
3 | 300...399 => font_weight::Weight300,
|
||||
4 | 400...499 => font_weight::Weight400,
|
||||
5 | 500...599 => font_weight::Weight500,
|
||||
6 | 600...699 => font_weight::Weight600,
|
||||
7 | 700...799 => font_weight::Weight700,
|
||||
8 | 800...899 => font_weight::Weight800,
|
||||
9 | 900...999 => font_weight::Weight900,
|
||||
1 | 100...199 => font_weight::T::Weight100,
|
||||
2 | 200...299 => font_weight::T::Weight200,
|
||||
3 | 300...399 => font_weight::T::Weight300,
|
||||
4 | 400...499 => font_weight::T::Weight400,
|
||||
5 | 500...599 => font_weight::T::Weight500,
|
||||
6 | 600...699 => font_weight::T::Weight600,
|
||||
7 | 700...799 => font_weight::T::Weight700,
|
||||
8 | 800...899 => font_weight::T::Weight800,
|
||||
9 | 900...999 => font_weight::T::Weight900,
|
||||
_ => default_weight
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue