aboutsummaryrefslogtreecommitdiff
path: root/font/src/darwin/mod.rs
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/darwin/mod.rs
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/darwin/mod.rs')
-rw-r--r--font/src/darwin/mod.rs29
1 files changed, 0 insertions, 29 deletions
diff --git a/font/src/darwin/mod.rs b/font/src/darwin/mod.rs
index 15a97e24..3a481196 100644
--- a/font/src/darwin/mod.rs
+++ b/font/src/darwin/mod.rs
@@ -449,35 +449,6 @@ impl Font {
_size: f64,
use_thin_strokes: bool,
) -> Result<RasterizedGlyph, Error> {
- // Render custom symbols for underline and beam cursor
- match character {
- super::UNDERLINE_CURSOR_CHAR => {
- // Get the bottom of the bounding box
- let descent = -(self.ct_font.descent() as i32);
- // Get the width of the cell
- let width = self.glyph_advance('0') as i32;
- // Return the new custom glyph
- return super::get_underline_cursor_glyph(descent, width);
- },
- super::BEAM_CURSOR_CHAR | super::BOX_CURSOR_CHAR => {
- // Get the top of the bounding box
- let metrics = self.metrics();
- let height = metrics.line_height;
- let ascent = (height - self.ct_font.descent()).ceil();
-
- // Get the width of the cell
- let width = self.glyph_advance('0') as i32;
-
- // Return the new custom glyph
- if character == super::BEAM_CURSOR_CHAR {
- return super::get_beam_cursor_glyph(ascent as i32, height as i32, width);
- } else {
- return super::get_box_cursor_glyph(ascent as i32, height as i32, width);
- }
- },
- _ => (),
- }
-
let glyph_index =
self.glyph_index(character).ok_or_else(|| Error::MissingGlyph(character))?;