mirror of
https://github.com/servo/servo.git
synced 2025-08-07 22:45:34 +01:00
Sort use
statements
This commit is contained in:
parent
45f7199eee
commit
76e59a46d3
162 changed files with 444 additions and 431 deletions
|
@ -3,14 +3,17 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use app_units::Au;
|
||||
use euclid::{Point2D, Rect, Size2D};
|
||||
use crate::font_context::{FontContext, FontSource};
|
||||
use crate::font_template::FontTemplateDescriptor;
|
||||
use ordered_float::NotNan;
|
||||
use crate::platform::font::{FontHandle, FontTable};
|
||||
use crate::platform::font_context::FontContextHandle;
|
||||
pub use crate::platform::font_list::fallback_font_families;
|
||||
use crate::platform::font_template::FontTemplateData;
|
||||
use crate::text::Shaper;
|
||||
use crate::text::glyph::{ByteIndex, GlyphData, GlyphId, GlyphStore};
|
||||
use crate::text::shaping::ShaperMethods;
|
||||
use euclid::{Point2D, Rect, Size2D};
|
||||
use ordered_float::NotNan;
|
||||
use servo_atoms::Atom;
|
||||
use smallvec::SmallVec;
|
||||
use std::borrow::ToOwned;
|
||||
|
@ -24,9 +27,6 @@ use std::sync::atomic::{ATOMIC_USIZE_INIT, AtomicUsize, Ordering};
|
|||
use style::computed_values::{font_stretch, font_style, font_variant_caps, font_weight};
|
||||
use style::properties::style_structs::Font as FontStyleStruct;
|
||||
use style::values::computed::font::SingleFontFamily;
|
||||
use crate::text::Shaper;
|
||||
use crate::text::glyph::{ByteIndex, GlyphData, GlyphId, GlyphStore};
|
||||
use crate::text::shaping::ShaperMethods;
|
||||
use time;
|
||||
use unicode_script::Script;
|
||||
use webrender_api;
|
||||
|
|
|
@ -6,16 +6,16 @@ use app_units::Au;
|
|||
use crate::font::{FontFamilyDescriptor, FontFamilyName, FontSearchScope};
|
||||
use crate::font_context::FontSource;
|
||||
use crate::font_template::{FontTemplate, FontTemplateDescriptor};
|
||||
use fontsan;
|
||||
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
|
||||
use net_traits::{CoreResourceThread, FetchResponseMsg, fetch_async};
|
||||
use net_traits::request::{Destination, RequestInit};
|
||||
use crate::platform::font_context::FontContextHandle;
|
||||
use crate::platform::font_list::SANS_SERIF_FONT_FAMILY;
|
||||
use crate::platform::font_list::for_each_available_family;
|
||||
use crate::platform::font_list::for_each_variation;
|
||||
use crate::platform::font_list::system_default_family;
|
||||
use crate::platform::font_template::FontTemplateData;
|
||||
use fontsan;
|
||||
use ipc_channel::ipc::{self, IpcReceiver, IpcSender};
|
||||
use net_traits::{CoreResourceThread, FetchResponseMsg, fetch_async};
|
||||
use net_traits::request::{Destination, RequestInit};
|
||||
use servo_atoms::Atom;
|
||||
use servo_url::ServoUrl;
|
||||
use std::{fmt, f32, mem, thread};
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use app_units::Au;
|
||||
use fnv::FnvHasher;
|
||||
use crate::font::{Font, FontDescriptor, FontFamilyDescriptor, FontGroup, FontHandleMethods, FontRef};
|
||||
use crate::font_cache_thread::FontTemplateInfo;
|
||||
use crate::font_template::FontTemplateDescriptor;
|
||||
use malloc_size_of::{MallocSizeOf, MallocSizeOfOps};
|
||||
use crate::platform::font::FontHandle;
|
||||
pub use crate::platform::font_context::FontContextHandle;
|
||||
use fnv::FnvHasher;
|
||||
use malloc_size_of::{MallocSizeOf, MallocSizeOfOps};
|
||||
use servo_arc::Arc;
|
||||
use std::cell::RefCell;
|
||||
use std::collections::HashMap;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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";
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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! {
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
#![allow(unsafe_code)]
|
||||
|
||||
use app_units::Au;
|
||||
use euclid::Point2D;
|
||||
use crate::font::{ShapingFlags, Font, FontTableMethods, FontTableTag, ShapingOptions, KERN};
|
||||
use crate::harfbuzz::{HB_DIRECTION_LTR, HB_DIRECTION_RTL, HB_MEMORY_MODE_READONLY};
|
||||
use crate::harfbuzz::{hb_blob_create, hb_face_create_for_tables};
|
||||
|
@ -34,11 +33,12 @@ use crate::harfbuzz::hb_font_set_scale;
|
|||
use crate::harfbuzz::hb_glyph_info_t;
|
||||
use crate::harfbuzz::hb_glyph_position_t;
|
||||
use crate::platform::font::FontTable;
|
||||
use std::{char, cmp, ptr};
|
||||
use std::os::raw::{c_char, c_int, c_uint, c_void};
|
||||
use crate::text::glyph::{ByteIndex, GlyphData, GlyphId, GlyphStore};
|
||||
use crate::text::shaping::ShaperMethods;
|
||||
use crate::text::util::{fixed_to_float, float_to_fixed, is_bidi_control};
|
||||
use euclid::Point2D;
|
||||
use std::{char, cmp, ptr};
|
||||
use std::os::raw::{c_char, c_int, c_uint, c_void};
|
||||
|
||||
const NO_GLYPH: i32 = -1;
|
||||
const LIGA: u32 = ot_tag!('l', 'i', 'g', 'a');
|
||||
|
|
|
@ -6,13 +6,13 @@ use app_units::Au;
|
|||
use crate::font::{Font, FontHandleMethods, FontMetrics, ShapingFlags};
|
||||
use crate::font::{RunMetrics, ShapingOptions};
|
||||
use crate::platform::font_template::FontTemplateData;
|
||||
use crate::text::glyph::{ByteIndex, GlyphStore};
|
||||
use range::Range;
|
||||
use std::cell::Cell;
|
||||
use std::cmp::{Ordering, max};
|
||||
use std::slice::Iter;
|
||||
use std::sync::Arc;
|
||||
use style::str::char_is_whitespace;
|
||||
use crate::text::glyph::{ByteIndex, GlyphStore};
|
||||
use unicode_bidi as bidi;
|
||||
use webrender_api;
|
||||
use xi_unicode::LineBreakLeafIter;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue