summaryrefslogtreecommitdiff
path: root/src/font.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2019-04-29 13:41:00 +0200
committerLaurenz <laurmaedje@gmail.com>2019-04-29 13:41:00 +0200
commitc384e524800bb55da0c5614f412e7d835ed67945 (patch)
tree91ff5b4de641bdd089b9396a8f3631b9ac0405e6 /src/font.rs
parentd514a05af1e7249412b3ecd257cd4673db3cd14b (diff)
Improve code quality 🎫
Diffstat (limited to 'src/font.rs')
-rw-r--r--src/font.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/font.rs b/src/font.rs
index 49670df8..3f3405e8 100644
--- a/src/font.rs
+++ b/src/font.rs
@@ -12,12 +12,14 @@
use std::collections::HashMap;
use std::fs::File;
-use std::path::PathBuf;
use std::io::{self, Cursor, Read, Seek, SeekFrom, BufReader};
+use std::path::PathBuf;
+
use byteorder::{BE, ReadBytesExt, WriteBytesExt};
use opentype::{Error as OpentypeError, OpenTypeReader, Outlines, TableRecord, Tag};
use opentype::tables::{Header, Name, CharMap, MaximumProfile, HorizontalMetrics, Post, OS2};
use opentype::global::{MacStyleFlags, NameEntry};
+
use crate::engine::Size;
@@ -152,7 +154,7 @@ impl Font {
}
/// Font metrics relevant to the typesetting engine.
-#[derive(Debug, Copy, Clone, PartialEq)]
+#[derive(Debug, Copy, Clone)]
pub struct FontMetrics {
/// Whether the font is italic.
pub is_italic: bool,
@@ -284,7 +286,6 @@ pub enum FontFamily {
}
/// A font provider serving fonts from a folder on the local file system.
-#[derive(Debug)]
pub struct FileSystemFontProvider {
base: PathBuf,
paths: Vec<PathBuf>,
@@ -348,7 +349,6 @@ impl FontProvider for FileSystemFontProvider {
}
}
-#[derive(Debug)]
struct Subsetter<'d> {
// Original font
font: &'d Font,