Fix match_refs and let_returns in layout, address review changes

This commit is contained in:
Manish Goregaokar 2015-09-04 10:51:24 +05:30
parent 5c24da3e2d
commit 8e2c37a542
12 changed files with 54 additions and 62 deletions

View file

@ -156,15 +156,14 @@ impl<'a> Iterator for CharacterSliceIterator<'a> {
impl<'a> TextRun {
pub fn new(font: &mut Font, text: String, options: &ShapingOptions, bidi_level: u8) -> TextRun {
let glyphs = TextRun::break_and_shape(font, &text, options);
let run = TextRun {
TextRun {
text: Arc::new(text),
font_metrics: font.metrics.clone(),
font_template: font.handle.template(),
actual_pt_size: font.actual_pt_size,
glyphs: Arc::new(glyphs),
bidi_level: bidi_level,
};
run
}
}
pub fn break_and_shape(font: &mut Font, text: &str, options: &ShapingOptions)