mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Clean up some unused debug code in gfx/font.rs.
This commit is contained in:
parent
a11874c635
commit
b4943a6298
1 changed files with 7 additions and 13 deletions
|
@ -441,8 +441,7 @@ pub impl Font : FontMethods {
|
|||
}
|
||||
|
||||
fn measure_text(run: &TextRun, range: Range) -> RunMetrics {
|
||||
//assert range.is_valid_for_string(run.text);
|
||||
//debug!("measuring text range '%s'", run.text.substr(range.begin(), range.length()));
|
||||
assert range.is_valid_for_string(run.text);
|
||||
|
||||
// TODO(Issue #199): alter advance direction for RTL
|
||||
// TODO(Issue #98): using inter-char and inter-word spacing settings when measuring text
|
||||
|
@ -457,15 +456,12 @@ pub impl Font : FontMethods {
|
|||
// ascent+descent and advance is sometimes too generous and
|
||||
// looking at actual glyph extents can yield a tighter box.
|
||||
|
||||
let metrics = RunMetrics { advance_width: advance,
|
||||
bounding_box: move bounds,
|
||||
ascent: self.metrics.ascent,
|
||||
descent: self.metrics.descent,
|
||||
};
|
||||
//debug!("Measured text range '%s' with metrics:", run.text.substr(range.begin(), range.length()));
|
||||
//debug!("%?", metrics);
|
||||
|
||||
return metrics;
|
||||
RunMetrics {
|
||||
advance_width: advance,
|
||||
bounding_box: move bounds,
|
||||
ascent: self.metrics.ascent,
|
||||
descent: self.metrics.descent,
|
||||
}
|
||||
}
|
||||
|
||||
fn shape_text(@self, text: &str) -> GlyphStore {
|
||||
|
@ -476,8 +472,6 @@ pub impl Font : FontMethods {
|
|||
}
|
||||
|
||||
fn get_descriptor() -> FontDescriptor {
|
||||
// TODO(Issue #174): implement by-platform-name FontSelectors,
|
||||
// probably by adding such an API to FontHandle.
|
||||
FontDescriptor::new(copy self.style, SelectorPlatformIdentifier(self.handle.face_identifier()))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue