mirror of
https://github.com/servo/servo.git
synced 2025-08-11 08:25:32 +01:00
Enabled use of FontFamily enum type and replaced plain string parameters with enum
This commit is contained in:
parent
2a3a7a73b5
commit
d942bfb474
5 changed files with 122 additions and 89 deletions
|
@ -208,8 +208,7 @@ impl FontContext {
|
|||
}
|
||||
|
||||
if !cache_hit {
|
||||
let font_template = self.font_cache_task.find_font_template(family.name()
|
||||
.to_owned(),
|
||||
let font_template = self.font_cache_task.find_font_template(family.clone(),
|
||||
desc.clone());
|
||||
match font_template {
|
||||
Some(font_template) => {
|
||||
|
@ -340,4 +339,3 @@ impl Hash for LayoutFontGroupCacheKey {
|
|||
pub fn invalidate_font_caches() {
|
||||
FONT_CACHE_EPOCH.fetch_add(1, Ordering::SeqCst);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue