mirror of
https://github.com/servo/servo.git
synced 2025-08-02 20:20:14 +01:00
Introduce FontLibrary
This commit is contained in:
parent
6154066619
commit
cfefc42c25
2 changed files with 22 additions and 0 deletions
|
@ -66,12 +66,14 @@ mod platform {
|
||||||
mod text {
|
mod text {
|
||||||
export glyph;
|
export glyph;
|
||||||
export text_run;
|
export text_run;
|
||||||
|
export font_library;
|
||||||
export font;
|
export font;
|
||||||
export shaper;
|
export shaper;
|
||||||
|
|
||||||
mod glyph;
|
mod glyph;
|
||||||
mod text_run;
|
mod text_run;
|
||||||
mod font;
|
mod font;
|
||||||
|
mod font_library;
|
||||||
mod shaper;
|
mod shaper;
|
||||||
mod native_font {
|
mod native_font {
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
|
|
20
src/servo/text/font_library.rs
Normal file
20
src/servo/text/font_library.rs
Normal file
|
@ -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();
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue