Merge pull request #37 from Bobo1239/master
Fix compilation on non-macos
This commit is contained in:
commit
2b5dea3263
|
@ -19,7 +19,7 @@ optional = true
|
||||||
[dependencies.pathfinder_path_utils]
|
[dependencies.pathfinder_path_utils]
|
||||||
path = "../path-utils"
|
path = "../path-utils"
|
||||||
|
|
||||||
[target.'not(cfg(target_os = "macos"))'.dependencies]
|
[target.'cfg(not(target_os = "macos"))'.dependencies]
|
||||||
freetype-sys = "0.6"
|
freetype-sys = "0.6"
|
||||||
|
|
||||||
[target.'cfg(target_os = "macos")'.dependencies]
|
[target.'cfg(target_os = "macos")'.dependencies]
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
// option. This file may not be copied, modified, or distributed
|
// option. This file may not be copied, modified, or distributed
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
use FontKey;
|
use {FontKey, FontInstanceKey, GlyphDimensions, GlyphKey};
|
||||||
use app_units::Au;
|
use app_units::Au;
|
||||||
use euclid::{Point2D, Size2D};
|
use euclid::{Point2D, Size2D};
|
||||||
use freetype_sys::{FT_BBox, FT_Done_Face, FT_F26Dot6, FT_Face, FT_GLYPH_FORMAT_OUTLINE};
|
use freetype_sys::{FT_BBox, FT_Done_Face, FT_F26Dot6, FT_Face, FT_GLYPH_FORMAT_OUTLINE};
|
||||||
|
@ -23,7 +23,7 @@ use std::mem;
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
use outline::OutlineStream;
|
use self::outline::OutlineStream;
|
||||||
|
|
||||||
mod outline;
|
mod outline;
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ impl FontContext {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn add_font_from_memory(&mut self,
|
pub fn add_font_from_memory(&mut self,
|
||||||
font_key: &FontKey
|
font_key: &FontKey,
|
||||||
bytes: Arc<Vec<u8>>,
|
bytes: Arc<Vec<u8>>,
|
||||||
font_index: u32)
|
font_index: u32)
|
||||||
-> Result<(), ()> {
|
-> Result<(), ()> {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// pathfinder/font-renderer/src/outline.rs
|
// pathfinder/font-renderer/src/freetype/outline.rs
|
||||||
//
|
//
|
||||||
// Copyright © 2017 The Pathfinder Project Developers.
|
// Copyright © 2017 The Pathfinder Project Developers.
|
||||||
//
|
//
|
||||||
|
@ -10,8 +10,7 @@
|
||||||
|
|
||||||
use euclid::Point2D;
|
use euclid::Point2D;
|
||||||
use freetype_sys::{FT_Outline, FT_Vector};
|
use freetype_sys::{FT_Outline, FT_Vector};
|
||||||
|
use pathfinder_path_utils::PathCommand;
|
||||||
use PathCommand;
|
|
||||||
|
|
||||||
const FREETYPE_POINT_ON_CURVE: i8 = 0x01;
|
const FREETYPE_POINT_ON_CURVE: i8 = 0x01;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue