mirror of
https://github.com/servo/servo.git
synced 2025-09-29 16:19:14 +01:00
fonts: Add more types to fonts_traits
(#38898)
This is necessary so that `constellation_traits` can get these types via a dependency on `fonts_traits`. This will allow sending IPC channels to shared workers so that they can have access to a shared `FontContext` from `script`. Testing: This just moves code between crates, so is covered by existing tests. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
parent
0b5bcfbf17
commit
3a97d4eed2
22 changed files with 495 additions and 446 deletions
|
@ -6,16 +6,16 @@ use std::collections::HashMap;
|
|||
use std::ops::Deref;
|
||||
use std::sync::Arc;
|
||||
|
||||
use fonts_traits::{
|
||||
FontDescriptor, FontIdentifier, FontTemplate, FontTemplateRef, FontTemplateRefMethods,
|
||||
IsOblique, LowercaseFontFamilyName,
|
||||
};
|
||||
use log::warn;
|
||||
use malloc_size_of_derive::MallocSizeOf;
|
||||
use parking_lot::RwLock;
|
||||
use style::stylesheets::DocumentStyleSheet;
|
||||
use style::values::computed::{FontStyle, FontWeight};
|
||||
|
||||
use crate::font::FontDescriptor;
|
||||
use crate::font_template::{FontTemplate, FontTemplateRef, FontTemplateRefMethods, IsOblique};
|
||||
use crate::system_font_service::{FontIdentifier, LowercaseFontFamilyName};
|
||||
|
||||
#[derive(Default, MallocSizeOf)]
|
||||
pub struct FontStore {
|
||||
pub(crate) families: HashMap<LowercaseFontFamilyName, FontTemplates>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue