tidy and warning fixes

This commit is contained in:
Vladimir Vukicevic 2016-11-10 16:07:14 -05:00
parent 8a5baee83b
commit 473df194fc
3 changed files with 10 additions and 20 deletions

View file

@ -34,14 +34,11 @@ extern crate bitflags;
extern crate euclid;
extern crate fnv;
// Platforms that use Freetype/Fontconfig library dependencies
#[cfg(any(target_os = "linux", target_os = "android"))]
extern crate fontconfig;
extern crate fontsan;
#[cfg(any(target_os = "linux", target_os = "android"))]
extern crate freetype;
extern crate fontsan;
extern crate gfx_traits;
// Eventually we would like the shaper to be pluggable, as many operating systems have their own

View file

@ -7,16 +7,16 @@
// renderer moves to a sandboxed process.
use app_units::Au;
use dwrote::{Font, FontFace};
use dwrote::{FontWeight, FontStretch, FontStyle};
use font::{FontHandleMethods, FontMetrics, FontTableMethods};
use font::{FontTableTag, FractionalPixel};
use platform::font_template::{FontTemplateData};
use platform::windows::font_list::{font_from_atom};
use platform::windows::font_context::{FontContextHandle};
use platform::font_template::FontTemplateData;
use platform::windows::font_context::FontContextHandle;
use platform::windows::font_list::font_from_atom;
use std::sync::Arc;
use style::computed_values::{font_stretch, font_weight};
use text::glyph::GlyphId;
use dwrote::{Font, FontFace};
use dwrote::{FontWeight, FontStretch, FontStyle};
// 1em = 12pt = 16px, assuming 72 points per inch and 96 px per inch
fn pt_to_px(pt: f64) -> f64 { pt / 72. * 96. }

View file

@ -2,17 +2,10 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use app_units::Au;
use servo_atoms::Atom;
use serde;
use serde::{Deserialize, Deserializer, Serialize, Serializer};
use std::collections::HashMap;
use std::io;
use std::ops::Deref;
use std::sync::Mutex;
use webrender_traits::NativeFontHandle;
use dwrote::{Font};
use platform::windows::font_list::{descriptor_from_atom, font_from_atom};
use servo_atoms::Atom;
use std::io;
use webrender_traits::NativeFontHandle;
#[derive(Deserialize, Serialize, Debug)]
pub struct FontTemplateData {