Log font families again

This commit is contained in:
Jeremy Soller 2022-10-19 13:29:50 -06:00
parent 8fa691b912
commit 65f60d1565
No known key found for this signature in database
GPG key ID: 87F211AF2BE4C2FE
2 changed files with 16 additions and 4 deletions

View file

@ -197,7 +197,7 @@ where
*/
let duration = instant.elapsed();
log::debug!("redraw: {:?}", duration);
log::trace!("redraw: {:?}", duration);
}
fn on_event(

View file

@ -568,6 +568,20 @@ impl<'a> TextBuffer<'a> {
}
}
new_cursor_opt = Some(TextCursor::new(new_cursor_line, new_cursor_glyph));
if let Some(glyph) = line.glyphs.get(new_cursor_glyph) {
let text_line = &self.text_lines[line.line_i.get()];
let text_glyph = &text_line[glyph.start..glyph.end];
log::debug!(
"{}, {}: '{}' ('{}'): '{}' ({:?})",
new_cursor_line,
new_cursor_glyph,
glyph.font.info.family,
glyph.font.info.post_script_name,
text_glyph,
text_glyph
);
}
}
line_y += line_height;
@ -581,9 +595,7 @@ impl<'a> TextBuffer<'a> {
}
let duration = instant.elapsed();
log::debug!("click({}, {}): {:?}", mouse_x, mouse_y, duration);
println!("cursor {:?} select {:?}", self.cursor, self.select_opt);
log::trace!("click({}, {}): {:?}", mouse_x, mouse_y, duration);
}
/// Draw the buffer