mirror of
https://github.com/servo/servo.git
synced 2025-08-08 06:55:31 +01:00
Strict import formatting (grouping and granularity) (#30325)
* strict imports formatting * Reformat all imports
This commit is contained in:
parent
413da4ca69
commit
aad2dccc9c
802 changed files with 6861 additions and 6395 deletions
|
@ -6,20 +6,14 @@
|
|||
// information for an approach that we'll likely need to take when the
|
||||
// renderer moves to a sandboxed process.
|
||||
|
||||
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 app_units::Au;
|
||||
use dwrote::{Font, FontFace, FontFile};
|
||||
use dwrote::{FontStretch, FontStyle};
|
||||
use log::debug;
|
||||
use servo_atoms::Atom;
|
||||
use std::fmt;
|
||||
use std::ops::Deref;
|
||||
use std::sync::Arc;
|
||||
|
||||
use app_units::Au;
|
||||
use dwrote::{Font, FontFace, FontFile, FontStretch, FontStyle};
|
||||
use log::debug;
|
||||
use servo_atoms::Atom;
|
||||
use style::computed_values::font_stretch::T as StyleFontStretch;
|
||||
use style::computed_values::font_weight::T as StyleFontWeight;
|
||||
use style::values::computed::font::FontStyle as StyleFontStyle;
|
||||
|
@ -27,6 +21,14 @@ use style::values::generics::font::FontStyle as GenericFontStyle;
|
|||
use style::values::generics::NonNegative;
|
||||
use style::values::specified::font::FontStretchKeyword;
|
||||
|
||||
use crate::font::{
|
||||
FontHandleMethods, FontMetrics, FontTableMethods, 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;
|
||||
|
||||
// 1em = 12pt = 16px, assuming 72 points per inch and 96 px per inch
|
||||
fn pt_to_px(pt: f64) -> f64 {
|
||||
pt / 72. * 96.
|
||||
|
@ -88,6 +90,7 @@ impl FontInfo {
|
|||
use std::cmp::{max, min};
|
||||
use std::collections::HashMap;
|
||||
use std::io::Cursor;
|
||||
|
||||
use truetype::naming_table::{NameID, NamingTable};
|
||||
use truetype::{Value, WindowsMetrics};
|
||||
|
||||
|
|
|
@ -2,15 +2,17 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use crate::text::util::unicode_plane;
|
||||
use dwrote::{Font, FontCollection, FontDescriptor};
|
||||
use lazy_static::lazy_static;
|
||||
use servo_atoms::Atom;
|
||||
use std::collections::HashMap;
|
||||
use std::sync::atomic::{AtomicUsize, Ordering};
|
||||
use std::sync::Mutex;
|
||||
|
||||
use dwrote::{Font, FontCollection, FontDescriptor};
|
||||
use lazy_static::lazy_static;
|
||||
use servo_atoms::Atom;
|
||||
use ucd::{Codepoint, UnicodeBlock};
|
||||
|
||||
use crate::text::util::unicode_plane;
|
||||
|
||||
lazy_static! {
|
||||
static ref FONT_ATOM_COUNTER: AtomicUsize = AtomicUsize::new(1);
|
||||
static ref FONT_ATOM_MAP: Mutex<HashMap<Atom, FontDescriptor>> = Mutex::new(HashMap::new());
|
||||
|
|
|
@ -2,13 +2,14 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use crate::platform::windows::font_list::font_from_atom;
|
||||
use std::{fmt, io};
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
use servo_atoms::Atom;
|
||||
use std::fmt;
|
||||
use std::io;
|
||||
use webrender_api::NativeFontHandle;
|
||||
|
||||
use crate::platform::windows::font_list::font_from_atom;
|
||||
|
||||
#[derive(Deserialize, Serialize)]
|
||||
pub struct FontTemplateData {
|
||||
// If you add members here, review the Debug impl below
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue