diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2018-11-01 17:23:56 +0100 |
---|---|---|
committer | Simon Sapin <simon.sapin@exyr.org> | 2018-11-06 15:26:02 +0100 |
commit | 76e59a46d3aff701b2e8dfbaf047f6d5c3edcced (patch) | |
tree | ee36ca9b3f981d01184871fe72fbc31347086e92 /components/gfx/platform | |
parent | 45f7199eee82c66637ec68287eafa40a651001c4 (diff) | |
download | servo-76e59a46d3aff701b2e8dfbaf047f6d5c3edcced.tar.gz servo-76e59a46d3aff701b2e8dfbaf047f6d5c3edcced.zip |
Sort `use` statements
Diffstat (limited to 'components/gfx/platform')
-rw-r--r-- | components/gfx/platform/freetype/android/font_list.rs | 2 | ||||
-rw-r--r-- | components/gfx/platform/freetype/font.rs | 8 | ||||
-rw-r--r-- | components/gfx/platform/freetype/font_list.rs | 2 | ||||
-rw-r--r-- | components/gfx/platform/macos/font.rs | 2 | ||||
-rw-r--r-- | components/gfx/platform/windows/font.rs | 8 | ||||
-rw-r--r-- | components/gfx/platform/windows/font_list.rs | 2 |
6 files changed, 12 insertions, 12 deletions
diff --git a/components/gfx/platform/freetype/android/font_list.rs b/components/gfx/platform/freetype/android/font_list.rs index 940283c55c5..ef4a0612f24 100644 --- a/components/gfx/platform/freetype/android/font_list.rs +++ b/components/gfx/platform/freetype/android/font_list.rs @@ -2,11 +2,11 @@ * 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 crate::text::util::is_cjk; use std::cell::RefCell; use std::fs::File; use std::io::{self, Read}; use std::path::Path; -use crate::text::util::is_cjk; use ucd::{Codepoint, UnicodeBlock}; use xml5ever::Attribute; use xml5ever::driver::parse_document; diff --git a/components/gfx/platform/freetype/font.rs b/components/gfx/platform/freetype/font.rs index b3762b26fe7..4ce38aa96d5 100644 --- a/components/gfx/platform/freetype/font.rs +++ b/components/gfx/platform/freetype/font.rs @@ -5,6 +5,10 @@ use app_units::Au; use crate::font::{FontHandleMethods, FontMetrics, FontTableMethods}; use crate::font::{FontTableTag, FractionalPixel, GPOS, GSUB, KERN}; +use crate::platform::font_context::FontContextHandle; +use crate::platform::font_template::FontTemplateData; +use crate::text::glyph::GlyphId; +use crate::text::util::fixed_to_float; use freetype::freetype::{FT_Done_Face, FT_New_Face, FT_New_Memory_Face}; use freetype::freetype::{FT_F26Dot6, FT_Face, FT_FaceRec}; use freetype::freetype::{FT_Get_Char_Index, FT_Get_Postscript_Name}; @@ -16,8 +20,6 @@ use freetype::freetype::{FT_SizeRec, FT_Size_Metrics, FT_UInt, FT_Vector}; use freetype::freetype::FT_Sfnt_Tag; use freetype::succeeded; use freetype::tt_os2::TT_OS2; -use crate::platform::font_context::FontContextHandle; -use crate::platform::font_template::FontTemplateData; use servo_atoms::Atom; use std::{mem, ptr}; use std::ffi::CString; @@ -27,8 +29,6 @@ use style::computed_values::font_stretch::T as FontStretch; use style::computed_values::font_weight::T as FontWeight; use style::values::computed::font::FontStyle; use super::c_str_to_string; -use crate::text::glyph::GlyphId; -use crate::text::util::fixed_to_float; // This constant is not present in the freetype // bindings due to bindgen not handling the way diff --git a/components/gfx/platform/freetype/font_list.rs b/components/gfx/platform/freetype/font_list.rs index 378f2f1944c..71b7e9bc4e0 100644 --- a/components/gfx/platform/freetype/font_list.rs +++ b/components/gfx/platform/freetype/font_list.rs @@ -2,6 +2,7 @@ * 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 crate::text::util::is_cjk; use fontconfig::fontconfig::{FcChar8, FcResultMatch, FcSetSystem}; use fontconfig::fontconfig::{FcConfigGetCurrent, FcConfigGetFonts, FcConfigSubstitute}; use fontconfig::fontconfig::{FcDefaultSubstitute, FcFontMatch, FcNameParse, FcPatternGetString}; @@ -13,7 +14,6 @@ use libc::{c_char, c_int}; use std::ffi::CString; use std::ptr; use super::c_str_to_string; -use crate::text::util::is_cjk; static FC_FAMILY: &'static [u8] = b"family\0"; static FC_FILE: &'static [u8] = b"file\0"; diff --git a/components/gfx/platform/macos/font.rs b/components/gfx/platform/macos/font.rs index 6e0bb05c1ef..b9570da0760 100644 --- a/components/gfx/platform/macos/font.rs +++ b/components/gfx/platform/macos/font.rs @@ -17,12 +17,12 @@ use crate::font::{FontHandleMethods, FontMetrics, FontTableMethods, FontTableTag use crate::font::{GPOS, GSUB, KERN}; use crate::platform::font_template::FontTemplateData; use crate::platform::macos::font_context::FontContextHandle; +use crate::text::glyph::GlyphId; use servo_atoms::Atom; use std::{fmt, ptr}; use std::ops::Range; use std::sync::Arc; use style::values::computed::font::{FontStretch, FontStyle, FontWeight}; -use crate::text::glyph::GlyphId; const KERN_PAIR_LEN: usize = 6; diff --git a/components/gfx/platform/windows/font.rs b/components/gfx/platform/windows/font.rs index d9f80de1103..a85c8383f5f 100644 --- a/components/gfx/platform/windows/font.rs +++ b/components/gfx/platform/windows/font.rs @@ -7,14 +7,15 @@ // renderer moves to a sandboxed process. use app_units::Au; -use dwrote; -use dwrote::{Font, FontFace, FontFile}; -use dwrote::{FontStretch, FontStyle}; use crate::font::{FontHandleMethods, FontMetrics, FontTableMethods}; use crate::font::{FontTableTag, FractionalPixel}; use crate::platform::font_template::FontTemplateData; use crate::platform::windows::font_context::FontContextHandle; use crate::platform::windows::font_list::font_from_atom; +use crate::text::glyph::GlyphId; +use dwrote; +use dwrote::{Font, FontFace, FontFile}; +use dwrote::{FontStretch, FontStyle}; use servo_atoms::Atom; use std::fmt; use std::ops::Deref; @@ -25,7 +26,6 @@ use style::values::computed::font::FontStyle as StyleFontStyle; use style::values::generics::NonNegative; use style::values::generics::font::FontStyle as GenericFontStyle; use style::values::specified::font::FontStretchKeyword; -use crate::text::glyph::GlyphId; use truetype; // 1em = 12pt = 16px, assuming 72 points per inch and 96 px per inch diff --git a/components/gfx/platform/windows/font_list.rs b/components/gfx/platform/windows/font_list.rs index 44a3f3704d7..21e47aa76e6 100644 --- a/components/gfx/platform/windows/font_list.rs +++ b/components/gfx/platform/windows/font_list.rs @@ -2,12 +2,12 @@ * 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 crate::text::util::unicode_plane; use dwrote::{Font, FontDescriptor, FontCollection}; use servo_atoms::Atom; use std::collections::HashMap; use std::sync::Mutex; use std::sync::atomic::{Ordering, AtomicUsize}; -use crate::text::util::unicode_plane; use ucd::{Codepoint, UnicodeBlock}; lazy_static! { |