mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Add string_cache override for geckolib based on gecko atoms.
The work in these patches is based on Ms2ger's gecko-atom crate.
This commit is contained in:
parent
825f610dec
commit
b521c293dc
25 changed files with 5153 additions and 185 deletions
|
@ -133,11 +133,11 @@ struct FontCache {
|
|||
fn populate_generic_fonts() -> HashMap<FontFamily, LowercaseString> {
|
||||
let mut generic_fonts = HashMap::with_capacity(5);
|
||||
|
||||
append_map(&mut generic_fonts, FontFamily::Serif, "Times New Roman");
|
||||
append_map(&mut generic_fonts, FontFamily::SansSerif, SANS_SERIF_FONT_FAMILY);
|
||||
append_map(&mut generic_fonts, FontFamily::Cursive, "Apple Chancery");
|
||||
append_map(&mut generic_fonts, FontFamily::Fantasy, "Papyrus");
|
||||
append_map(&mut generic_fonts, FontFamily::Monospace, "Menlo");
|
||||
append_map(&mut generic_fonts, FontFamily::Generic(atom!("serif")), "Times New Roman");
|
||||
append_map(&mut generic_fonts, FontFamily::Generic(atom!("sans-serif")), SANS_SERIF_FONT_FAMILY);
|
||||
append_map(&mut generic_fonts, FontFamily::Generic(atom!("cursive")), "Apple Chancery");
|
||||
append_map(&mut generic_fonts, FontFamily::Generic(atom!("fantasy")), "Papyrus");
|
||||
append_map(&mut generic_fonts, FontFamily::Generic(atom!("monospace")), "Menlo");
|
||||
|
||||
fn append_map(generic_fonts: &mut HashMap<FontFamily, LowercaseString>,
|
||||
font_family: FontFamily,
|
||||
|
|
|
@ -72,6 +72,7 @@ extern crate simd;
|
|||
|
||||
extern crate skia;
|
||||
extern crate smallvec;
|
||||
#[macro_use]
|
||||
extern crate string_cache;
|
||||
extern crate style;
|
||||
extern crate style_traits;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue