mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +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 {
|
fn measure_text(run: &TextRun, range: Range) -> RunMetrics {
|
||||||
//assert range.is_valid_for_string(run.text);
|
assert range.is_valid_for_string(run.text);
|
||||||
//debug!("measuring text range '%s'", run.text.substr(range.begin(), range.length()));
|
|
||||||
|
|
||||||
// TODO(Issue #199): alter advance direction for RTL
|
// TODO(Issue #199): alter advance direction for RTL
|
||||||
// TODO(Issue #98): using inter-char and inter-word spacing settings when measuring text
|
// 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
|
// ascent+descent and advance is sometimes too generous and
|
||||||
// looking at actual glyph extents can yield a tighter box.
|
// looking at actual glyph extents can yield a tighter box.
|
||||||
|
|
||||||
let metrics = RunMetrics { advance_width: advance,
|
RunMetrics {
|
||||||
bounding_box: move bounds,
|
advance_width: advance,
|
||||||
ascent: self.metrics.ascent,
|
bounding_box: move bounds,
|
||||||
descent: self.metrics.descent,
|
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn shape_text(@self, text: &str) -> GlyphStore {
|
fn shape_text(@self, text: &str) -> GlyphStore {
|
||||||
|
@ -476,8 +472,6 @@ pub impl Font : FontMethods {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn get_descriptor() -> FontDescriptor {
|
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()))
|
FontDescriptor::new(copy self.style, SelectorPlatformIdentifier(self.handle.face_identifier()))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue