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
|
@ -13,7 +13,10 @@ use app_units::Au;
|
|||
use base::id::WebViewId;
|
||||
use compositing_traits::CrossProcessCompositorApi;
|
||||
use fnv::FnvHasher;
|
||||
use fonts_traits::StylesheetWebFontLoadFinishedCallback;
|
||||
use fonts_traits::{
|
||||
CSSFontFaceDescriptors, FontDescriptor, FontIdentifier, FontTemplate, FontTemplateRef,
|
||||
FontTemplateRefMethods, StylesheetWebFontLoadFinishedCallback,
|
||||
};
|
||||
use log::{debug, trace};
|
||||
use malloc_size_of_derive::MallocSizeOf;
|
||||
use net_traits::request::{Destination, Referrer, RequestBuilder};
|
||||
|
@ -35,13 +38,9 @@ use style::values::computed::font::{FamilyName, FontFamilyNameSyntax, SingleFont
|
|||
use url::Url;
|
||||
use webrender_api::{FontInstanceFlags, FontInstanceKey, FontKey, FontVariation};
|
||||
|
||||
use crate::font::{
|
||||
Font, FontDescriptor, FontFamilyDescriptor, FontGroup, FontRef, FontSearchScope,
|
||||
};
|
||||
use crate::font::{Font, FontFamilyDescriptor, FontGroup, FontRef, FontSearchScope};
|
||||
use crate::font_store::CrossThreadFontStore;
|
||||
use crate::font_template::{FontTemplate, FontTemplateRef, FontTemplateRefMethods};
|
||||
use crate::platform::font::PlatformFont;
|
||||
use crate::system_font_service::{CSSFontFaceDescriptors, FontIdentifier};
|
||||
use crate::{FontData, LowercaseFontFamilyName, PlatformFontMethods, SystemFontServiceProxy};
|
||||
|
||||
static SMALL_CAPS_SCALE_FACTOR: f32 = 0.8; // Matches FireFox (see gfxFont.h)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue