Disallow toggling radio buttons. Use generated content for checkboxes and radio buttons. Switching to the glyph 0 for the average advance width.

This commit is contained in:
Josh Matthews 2014-09-29 14:14:18 -04:00
parent f70bb68503
commit 8112859d55
7 changed files with 15 additions and 36 deletions

View file

@ -154,7 +154,7 @@ impl FontHandleMethods for FontHandle {
let line_gap = (ascent + descent + leading + 0.5).floor();
let max_advance_width = Au::from_pt(bounding_rect.size.width as f64);
let average_advance = self.glyph_index('x')
let average_advance = self.glyph_index('0')
.and_then(|idx| self.glyph_h_advance(idx))
.map(|advance| Au::from_frac_px(advance))
.unwrap_or(max_advance_width);