Cache font matches, use usize for line index, use font system for swash
This commit is contained in:
parent
94576fb682
commit
119a570ee9
8 changed files with 105 additions and 120 deletions
|
|
@ -63,16 +63,16 @@ impl StyleSheet for Theme {
|
|||
|
||||
pub struct TextBox<'a> {
|
||||
buffer: &'a Mutex<TextBuffer<'static>>,
|
||||
cache: &'a Mutex<SwashCache>,
|
||||
cache: &'a Mutex<SwashCache<'static>>,
|
||||
}
|
||||
|
||||
impl<'a> TextBox<'a> {
|
||||
pub fn new(buffer: &'a Mutex<TextBuffer<'static>>, cache: &'a Mutex<SwashCache>) -> Self {
|
||||
pub fn new(buffer: &'a Mutex<TextBuffer<'static>>, cache: &'a Mutex<SwashCache<'static>>) -> Self {
|
||||
Self { buffer, cache }
|
||||
}
|
||||
}
|
||||
|
||||
pub fn text_box<'a>(buffer: &'a Mutex<TextBuffer<'static>>, cache: &'a Mutex<SwashCache>) -> TextBox<'a> {
|
||||
pub fn text_box<'a>(buffer: &'a Mutex<TextBuffer<'static>>, cache: &'a Mutex<SwashCache<'static>>) -> TextBox<'a> {
|
||||
TextBox::new(buffer, cache)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue