|
|
|
@ -273,7 +273,7 @@ impl CursorRenderer {
|
|
|
|
|
let mut paint = Paint::new(skia_safe::colors::WHITE, None);
|
|
|
|
|
paint.set_anti_alias(settings.antialiasing);
|
|
|
|
|
|
|
|
|
|
let character = self.cursor.character.clone();
|
|
|
|
|
let character = self.cursor.grid_cell.0.clone();
|
|
|
|
|
|
|
|
|
|
let mut cursor_width = grid_renderer.font_dimensions.width;
|
|
|
|
|
if self.cursor.double_width && self.cursor.shape == CursorShape::Block {
|
|
|
|
@ -341,7 +341,9 @@ impl CursorRenderer {
|
|
|
|
|
self.previous_editor_mode = current_mode.clone();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if self.cursor.enabled && render {
|
|
|
|
|
if !(self.cursor.enabled && render) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
// Draw Background
|
|
|
|
|
let background_color = self
|
|
|
|
|
.cursor
|
|
|
|
@ -372,7 +374,12 @@ impl CursorRenderer {
|
|
|
|
|
canvas.clip_path(&path, None, Some(false));
|
|
|
|
|
|
|
|
|
|
let y_adjustment = grid_renderer.shaper.y_adjustment();
|
|
|
|
|
let blobs = &grid_renderer.shaper.shape_cached(character, false, false);
|
|
|
|
|
let style = &self.cursor.grid_cell.1;
|
|
|
|
|
|
|
|
|
|
let bold = style.as_ref().map(|x| x.bold).unwrap_or(false);
|
|
|
|
|
let italic = style.as_ref().map(|x| x.italic).unwrap_or(false);
|
|
|
|
|
|
|
|
|
|
let blobs = &grid_renderer.shaper.shape_cached(character, bold, italic);
|
|
|
|
|
|
|
|
|
|
for blob in blobs.iter() {
|
|
|
|
|
canvas.draw_text_blob(
|
|
|
|
@ -388,5 +395,4 @@ impl CursorRenderer {
|
|
|
|
|
vfx.render(&settings, canvas, grid_renderer, &self.cursor);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|