aboutsummaryrefslogtreecommitdiffstats
path: root/components/gfx/text/text_run.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/gfx/text/text_run.rs')
-rw-r--r--components/gfx/text/text_run.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/gfx/text/text_run.rs b/components/gfx/text/text_run.rs
index b2b0d4661c9..20429079c7e 100644
--- a/components/gfx/text/text_run.rs
+++ b/components/gfx/text/text_run.rs
@@ -120,7 +120,7 @@ impl<'a> Iterator for CharacterSliceIterator<'a> {
debug_assert!(!self.range.is_empty());
let index_to_return = self.range.begin();
- self.range.adjust_by(CharIndex(1), CharIndex(0));
+ self.range.adjust_by(CharIndex(1), CharIndex(-1));
if self.range.is_empty() {
// We're done.
self.glyph_run = None
@@ -297,7 +297,7 @@ impl<'a> TextRun {
pub fn advance_for_range(&self, range: &Range<CharIndex>) -> Au {
// 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
self.natural_word_slices_in_range(range)
.fold(Au(0), |advance, slice| {
advance + slice.glyphs.advance_for_char_range(&slice.range)