mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
gfx: Clamp the font size we supply to Core Text to 0.01pt.
Core Text treats a font size of 0.0 as 12.0, which is obviously not what we want. Improves Twitter. Improves Reddit /r/rust. Closes #10492.
This commit is contained in:
parent
b214205ba9
commit
18fbf8cf30
6 changed files with 70 additions and 17 deletions
|
@ -72,7 +72,7 @@ impl FontHandleMethods for FontHandle {
|
|||
Some(s) => s.to_f64_px(),
|
||||
None => 0.0
|
||||
};
|
||||
match template.ctfont() {
|
||||
match template.ctfont(size) {
|
||||
Some(ref ctfont) => {
|
||||
Ok(FontHandle {
|
||||
font_data: template.clone(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue