Make BorrowedWithFontSystem borrow FontSystem mutably
This commit is contained in:
parent
057b5b6fa9
commit
46e9ef0246
11 changed files with 37 additions and 31 deletions
|
|
@ -6,7 +6,7 @@ use termion::{color, cursor};
|
|||
|
||||
fn main() {
|
||||
// A FontSystem provides access to detected system fonts, create one per application
|
||||
let font_system = FontSystem::new();
|
||||
let mut font_system = FontSystem::new();
|
||||
|
||||
// A SwashCache stores rasterized glyphs, create one per application
|
||||
let mut swash_cache = SwashCache::new();
|
||||
|
|
@ -17,7 +17,7 @@ fn main() {
|
|||
// A Buffer provides shaping and layout for a UTF-8 string, create one per text widget
|
||||
let mut buffer = Buffer::new(&font_system, metrics);
|
||||
|
||||
let mut buffer = buffer.borrow_with(&font_system);
|
||||
let mut buffer = buffer.borrow_with(&mut font_system);
|
||||
|
||||
// Set a size for the text buffer, in pixels
|
||||
let width = 80u16;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue