mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
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:
parent
f70bb68503
commit
8112859d55
7 changed files with 15 additions and 36 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue