зеркало из https://github.com/mozilla/gecko-dev.git
servo: Introduce FontLibrary
Source-Repo: https://github.com/servo/servo Source-Revision: cfefc42c25f9e6c784d96bed24eba700fbcc9428
This commit is contained in:
Родитель
57bea928f7
Коммит
4d549f04d1
|
@ -66,12 +66,14 @@ mod platform {
|
|||
mod text {
|
||||
export glyph;
|
||||
export text_run;
|
||||
export font_library;
|
||||
export font;
|
||||
export shaper;
|
||||
|
||||
mod glyph;
|
||||
mod text_run;
|
||||
mod font;
|
||||
mod font_library;
|
||||
mod shaper;
|
||||
mod native_font {
|
||||
#[cfg(target_os = "macos")]
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
export FontLibrary;
|
||||
|
||||
import font::Font;
|
||||
|
||||
class FontLibrary {
|
||||
let bogus: int;
|
||||
|
||||
new() { self.bogus = 0; }
|
||||
|
||||
fn get_font() -> @Font {
|
||||
let f = Font(font::test_font_bin());
|
||||
ret @f;
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn should_get_fonts() {
|
||||
let lib = FontLibrary();
|
||||
lib.get_font();
|
||||
}
|
Загрузка…
Ссылка в новой задаче