mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Document the Au struct and add similar font metrics debug as mac
This commit is contained in:
parent
76e3b34c75
commit
00e3a2144d
3 changed files with 18 additions and 4 deletions
|
@ -244,7 +244,7 @@ impl FontHandleMethods for FontHandle {
|
|||
}
|
||||
}
|
||||
|
||||
return FontMetrics {
|
||||
let metrics = FontMetrics {
|
||||
underline_size: underline_size,
|
||||
underline_offset: underline_offset,
|
||||
strikeout_size: strikeout_size,
|
||||
|
@ -255,7 +255,10 @@ impl FontHandleMethods for FontHandle {
|
|||
ascent: ascent,
|
||||
descent: -descent, // linux font's seem to use the opposite sign from mac
|
||||
max_advance: max_advance
|
||||
}
|
||||
};
|
||||
|
||||
debug!("Font metrics (@{:f} pt): {:?}", geometry::to_pt(em_size), metrics);
|
||||
return metrics;
|
||||
}
|
||||
|
||||
fn get_table_for_tag(&self, _: FontTableTag) -> Option<FontTable> {
|
||||
|
|
|
@ -243,7 +243,7 @@ impl FontHandleMethods for FontHandle {
|
|||
}
|
||||
}
|
||||
|
||||
return FontMetrics {
|
||||
let metrics = FontMetrics {
|
||||
underline_size: underline_size,
|
||||
underline_offset: underline_offset,
|
||||
strikeout_size: strikeout_size,
|
||||
|
@ -254,7 +254,10 @@ impl FontHandleMethods for FontHandle {
|
|||
ascent: ascent,
|
||||
descent: -descent, // linux font's seem to use the opposite sign from mac
|
||||
max_advance: max_advance
|
||||
}
|
||||
};
|
||||
|
||||
debug!("Font metrics (@{:f} pt): {:?}", geometry::to_pt(em_size), metrics);
|
||||
return metrics;
|
||||
}
|
||||
|
||||
fn get_table_for_tag(&self, _: FontTableTag) -> Option<FontTable> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue