Commit 865727c0 authored by Lucas Timmins's avatar Lucas Timmins Committed by Joe Wilm

Remove redundant copy when selecting font_key

parent 1adb5cb7
......@@ -827,12 +827,13 @@ impl<'a> RenderApi<'a> {
for cell in cells {
// Get font key for cell
// FIXME this is super inefficient.
let mut font_key = glyph_cache.font_key;
if cell.flags.contains(cell::Flags::BOLD) {
font_key = glyph_cache.bold_key;
let font_key = if cell.flags.contains(cell::Flags::BOLD) {
glyph_cache.bold_key
} else if cell.flags.contains(cell::Flags::ITALIC) {
font_key = glyph_cache.italic_key;
}
glyph_cache.italic_key
} else {
glyph_cache.font_key
};
let glyph_key = GlyphKey {
font_key,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment