aboutsummaryrefslogtreecommitdiffstats
path: root/components/gfx/platform/windows/font.rs
diff options
context:
space:
mode:
authorSamson <16504129+sagudev@users.noreply.github.com>2023-09-11 21:16:54 +0200
committerGitHub <noreply@github.com>2023-09-11 19:16:54 +0000
commitaad2dccc9c9f6b89922c07933cfa7087a8cd1ec4 (patch)
tree68dec1a9d53f4ed564843a9580fba70bf90dbef1 /components/gfx/platform/windows/font.rs
parent413da4ca69d3013528c09bbaf38629a72384372d (diff)
downloadservo-aad2dccc9c9f6b89922c07933cfa7087a8cd1ec4.tar.gz
servo-aad2dccc9c9f6b89922c07933cfa7087a8cd1ec4.zip
Strict import formatting (grouping and granularity) (#30325)
* strict imports formatting * Reformat all imports
Diffstat (limited to 'components/gfx/platform/windows/font.rs')
-rw-r--r--components/gfx/platform/windows/font.rs25
1 files changed, 14 insertions, 11 deletions
diff --git a/components/gfx/platform/windows/font.rs b/components/gfx/platform/windows/font.rs
index 9e371685491..74cfab4ca73 100644
--- a/components/gfx/platform/windows/font.rs
+++ b/components/gfx/platform/windows/font.rs
@@ -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};