Do not store reference to font in shape or layout glyphs

This commit is contained in:
Jeremy Soller 2022-10-25 10:13:44 -06:00
parent 3c573df261
commit 42de42d59e
No known key found for this signature in database
GPG key ID: 87F211AF2BE4C2FE
5 changed files with 68 additions and 47 deletions

View file

@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT OR Apache-2.0
use cosmic_text::{FontSystem, TextAction, TextBuffer, TextCursor, TextLineIndex, TextMetrics};
use cosmic_text::{FontSystem, TextAction, TextBuffer, TextMetrics};
use orbclient::{Color, EventOption, Renderer, Window, WindowFlag};
use std::{env, fs, thread, time::{Duration, Instant}};
@ -103,9 +103,6 @@ fn main() {
buffer.shape_until_cursor();
loop {
let font_size = buffer.metrics().font_size;
let line_height = buffer.metrics().line_height;
let mut force_drag = true;
if buffer.redraw {