Add TextRun.preferred_width

This commit is contained in:
Brian Anderson 2012-09-13 19:39:02 -07:00
parent 8bce1b60ed
commit ae27032299

View file

@ -15,6 +15,7 @@ struct TextRun {
impl TextRun {
fn size() -> Size2D<au> { self.size_ }
fn preferred_width() -> au { self.size_.width }
}
fn TextRun(font: Font, text: ~str) -> TextRun {