Skip to content

Commit

Permalink
Prepare for follow-on change
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Nov 25, 2024
1 parent 02d1d75 commit 62e967e
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions experiments/2024-10-30/src/render/text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,20 +88,24 @@ impl TextRenderer {
buffers.push(buffer);
}

let text_areas = buffers.iter().map(|buffer| glyphon::TextArea {
buffer,
left: 0.,
top: 0.,
scale: self.scale_factor,
bounds: glyphon::TextBounds {
left: 0,
top: 0,
right: surface_config.width as i32,
bottom: surface_config.height as i32,
},
default_color: glyphon::Color::rgb(0, 0, 0),
custom_glyphs: &[],
});
let mut text_areas = Vec::new();

for buffer in &buffers {
text_areas.push(glyphon::TextArea {
buffer,
left: 0.,
top: 0.,
scale: self.scale_factor,
bounds: glyphon::TextBounds {
left: 0,
top: 0,
right: surface_config.width as i32,
bottom: surface_config.height as i32,
},
default_color: glyphon::Color::rgb(0, 0, 0),
custom_glyphs: &[],
});
}

self.text_renderer
.prepare(
Expand Down

0 comments on commit 62e967e

Please sign in to comment.