diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/config.rs | 43 | ||||
-rw-r--r-- | src/display.rs | 3 |
2 files changed, 1 insertions, 45 deletions
diff --git a/src/config.rs b/src/config.rs index cef4d22a..d49caae8 100644 --- a/src/config.rs +++ b/src/config.rs @@ -222,10 +222,6 @@ pub struct Config { #[serde(default="default_padding")] padding: Delta, - /// Pixels per inch - #[serde(default)] - dpi: Dpi, - /// Font configuration #[serde(default)] font: Font, @@ -318,7 +314,6 @@ impl Default for Config { Config { draw_bold_text_with_bright_colors: true, dimensions: Default::default(), - dpi: Default::default(), font: Default::default(), render_timer: Default::default(), custom_cursor_colors: false, @@ -1133,12 +1128,6 @@ impl Config { self.dimensions } - /// Get dpi config - #[inline] - pub fn dpi(&self) -> &Dpi { - &self.dpi - } - /// Get visual bell config #[inline] pub fn visual_bell(&self) -> &VisualBellConfig { @@ -1248,38 +1237,6 @@ impl Dimensions { } } -/// Pixels per inch -/// -/// This is only used on `FreeType` systems -#[derive(Debug, Deserialize)] -pub struct Dpi { - /// Horizontal dpi - x: f32, - - /// Vertical dpi - y: f32, -} - -impl Default for Dpi { - fn default() -> Dpi { - Dpi { x: 96.0, y: 96.0 } - } -} - -impl Dpi { - /// Get horizontal dpi - #[inline] - pub fn x(&self) -> f32 { - self.x - } - - /// Get vertical dpi - #[inline] - pub fn y(&self) -> f32 { - self.y - } -} - /// A delta for a point in a 2 dimensional plane #[derive(Clone, Copy, Debug, Deserialize)] pub struct Delta { diff --git a/src/display.rs b/src/display.rs index 012d803b..cb5cf8c9 100644 --- a/src/display.rs +++ b/src/display.rs @@ -134,7 +134,6 @@ impl Display { ) -> Result<Display, Error> { // Extract some properties from config let font = config.font(); - let dpi = config.dpi(); let render_timer = config.render_timer(); // Create the window where Alacritty will be displayed @@ -147,7 +146,7 @@ impl Display { info!("device_pixel_ratio: {}", dpr); - let rasterizer = font::Rasterizer::new(dpi.x(), dpi.y(), dpr, config.use_thin_strokes())?; + let rasterizer = font::Rasterizer::new(dpr, config.use_thin_strokes())?; // Create renderer let mut renderer = QuadRenderer::new(&config, size)?; |