Introduce a FamilyName type, like FontFamily but not a generic family.

This commit is contained in:
Simon Sapin 2017-02-02 18:30:36 +01:00
parent 44f6c60d91
commit 52aa2431a9
3 changed files with 35 additions and 15 deletions

View file

@ -4,7 +4,7 @@
use gfx::font_cache_thread::FontCacheThread;
use ipc_channel::ipc;
use style::computed_values::font_family::FontFamily;
use style::computed_values::font_family::{FontFamily, FamilyName};
use style::font_face::{FontFaceRule, Source};
#[test]
@ -12,8 +12,8 @@ fn test_local_web_font() {
let (inp_chan, _) = ipc::channel().unwrap();
let (out_chan, out_receiver) = ipc::channel().unwrap();
let font_cache_thread = FontCacheThread::new(inp_chan, None);
let family_name = FontFamily::FamilyName(From::from("test family"));
let variant_name = FontFamily::FamilyName(From::from("test font face"));
let family_name = FontFamily::FamilyName(FamilyName(From::from("test family")));
let variant_name = FontFamily::FamilyName(FamilyName(From::from("test font face")));
let font_face_rule = FontFaceRule {
family: family_name.clone(),
sources: vec![Source::Local(variant_name)],