aboutsummaryrefslogtreecommitdiff
path: root/font/src/rusttype
diff options
context:
space:
mode:
authorChristian Duerr <chrisduerr@users.noreply.github.com>2019-04-20 22:47:05 +0000
committerGitHub <noreply@github.com>2019-04-20 22:47:05 +0000
commit0d060d5d801e3abb55035269138d819d38fc175b (patch)
tree7e5e6a390aa57ff8caafc782b2371634c906b3c9 /font/src/rusttype
parent371d13f8ef95157c97f7de9964bcbc89d4a8e930 (diff)
downloadr-alacritty-0d060d5d801e3abb55035269138d819d38fc175b.tar.gz
r-alacritty-0d060d5d801e3abb55035269138d819d38fc175b.tar.bz2
r-alacritty-0d060d5d801e3abb55035269138d819d38fc175b.zip
Fix cursor colors
This fixes a recent regression in cfc20d4f34dca535654cc32df18e785296af4cc5 which broke cursor colors when specified in the `colors.cursor` field in the config. It also removes a lot of unneeded code from the font crate related to the cursor rendering. This fixes #2338.
Diffstat (limited to 'font/src/rusttype')
-rw-r--r--font/src/rusttype/mod.rs29
1 files changed, 0 insertions, 29 deletions
diff --git a/font/src/rusttype/mod.rs b/font/src/rusttype/mod.rs
index 74a5baa5..8be9fe08 100644
--- a/font/src/rusttype/mod.rs
+++ b/font/src/rusttype/mod.rs
@@ -84,35 +84,6 @@ impl crate::Rasterize for RustTypeRasterizer {
}
fn get_glyph(&mut self, glyph_key: GlyphKey) -> Result<RasterizedGlyph, Error> {
- match glyph_key.c {
- super::UNDERLINE_CURSOR_CHAR => {
- let metrics = self.metrics(glyph_key.font_key, glyph_key.size)?;
- return super::get_underline_cursor_glyph(
- metrics.descent as i32,
- metrics.average_advance as i32,
- );
- },
- super::BEAM_CURSOR_CHAR => {
- let metrics = self.metrics(glyph_key.font_key, glyph_key.size)?;
-
- return super::get_beam_cursor_glyph(
- (metrics.line_height + f64::from(metrics.descent)).round() as i32,
- metrics.line_height.round() as i32,
- metrics.average_advance.round() as i32,
- );
- },
- super::BOX_CURSOR_CHAR => {
- let metrics = self.metrics(glyph_key.font_key, glyph_key.size)?;
-
- return super::get_box_cursor_glyph(
- (metrics.line_height + f64::from(metrics.descent)).round() as i32,
- metrics.line_height.round() as i32,
- metrics.average_advance.round() as i32,
- );
- },
- _ => (),
- }
-
let scaled_glyph = self.fonts[glyph_key.font_key.token as usize]
.glyph(glyph_key.c)
.scaled(Scale::uniform(glyph_key.size.as_f32_pts() * self.dpi_ratio * 96. / 72.));