diff options
author | Aaron Williamson <guitarfanman@gmail.com> | 2017-04-26 20:28:18 -0600 |
---|---|---|
committer | Joe Wilm <jwilm@users.noreply.github.com> | 2017-05-01 08:52:22 -0700 |
commit | f06be732a231c218104a538abef670835d3a68b9 (patch) | |
tree | 6406bcebaef016c300cd9e92a0022b16c42ed3a9 /src/display.rs | |
parent | 0a1dc56bcf0b125cfd79787148d219d9e38f85b8 (diff) | |
download | alacritty-f06be732a231c218104a538abef670835d3a68b9.tar.gz alacritty-f06be732a231c218104a538abef670835d3a68b9.zip |
Combine FontOffset and GlyphOffset structs into Delta struct
The two structs are very similar, so there is no reason for them to be
separate. Instead combine them into a single Delta struct, which can be
used to shift a point in a two dimensional plane.
Diffstat (limited to 'src/display.rs')
-rw-r--r-- | src/display.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/display.rs b/src/display.rs index 3d13f465..5f5dd688 100644 --- a/src/display.rs +++ b/src/display.rs @@ -171,8 +171,8 @@ impl Display { // font metrics should be computed before creating the window in the first // place so that a resize is not needed. let metrics = glyph_cache.font_metrics(); - let cell_width = (metrics.average_advance + font.offset().x() as f64) as u32; - let cell_height = (metrics.line_height + font.offset().y() as f64) as u32; + let cell_width = (metrics.average_advance + font.offset().x as f64) as u32; + let cell_height = (metrics.line_height + font.offset().y as f64) as u32; // Resize window to specified dimensions let dimensions = options.dimensions() |