Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Linux font config on Windows platform #247

Merged
merged 2 commits into from Apr 30, 2016
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

@@ -1,2 +1,3 @@
Cargo.lock
target/

@@ -34,29 +34,17 @@ mod util;
mod platform {
#[cfg(target_os="macos")]
pub use platform::macos::font;
#[cfg(any(target_os="linux", target_os="android"))]
#[cfg(any(target_os="linux", target_os="android", target_os = "windows"))]
pub use platform::linux::font;

#[cfg(target_os="macos")]
pub mod macos {
pub mod font;
}
#[cfg(any(target_os="linux", target_os="android"))]
#[cfg(any(target_os="linux", target_os="android", target_os = "windows"))]
pub mod linux {
pub mod font;
}
// Temporary solution to pass building on Windows
#[cfg(target_os = "windows")]
pub mod font {
pub struct FontContext;
impl FontContext {
pub fn new() -> FontContext {
FontContext
}
}
pub struct RasterizedGlyph;
impl RasterizedGlyph {}
}
}

pub mod renderer;
@@ -302,7 +302,6 @@ impl ResourceCache {
});
}

#[cfg(not(target_os = "windows"))]
pub fn raster_pending_glyphs(&mut self,
thread_pool: &mut scoped_threadpool::Pool,
frame_id: FrameId) {
@@ -354,13 +353,6 @@ impl ResourceCache {
}
}

#[cfg(target_os = "windows")]
pub fn raster_pending_glyphs(&mut self,
thread_pool: &mut scoped_threadpool::Pool,
frame_id: FrameId) {
return
}

pub fn add_draw_list(&mut self, items: Vec<DisplayItem>, pipeline_id: PipelineId)
-> DrawListId {
self.draw_lists.insert(DrawList::new(items, pipeline_id))
@@ -446,7 +438,6 @@ impl ResourceCache {
}
}

#[cfg(not(target_os = "windows"))]
fn run_raster_jobs(thread_pool: &mut scoped_threadpool::Pool,
pending_raster_jobs: &mut Vec<GlyphRasterJob>,
font_templates: &HashMap<FontKey, FontTemplate, BuildHasherDefault<FnvHasher>>,
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.