FontMetrics::mapTextToFonts() does not set the length of its final font run. The loop updates length only when it encounters a transition to another font. After the loop, the last run therefore retains the initial value 0.
When called with returnSubstring: true, a string that maps entirely to one font returns a mapping with length: 0 and an empty text; when there are multiple runs, the final run likewise has length zero and an empty substring. This contradicts the method documentation that returns substring start/length/text information and can cause callers to omit or truncate the final run.
The earlier font mapping change in #3155 introduced this implementation; this report is about the missing final-run length update.
No runtime test was run for this report.
FontMetrics::mapTextToFonts()does not set the length of its final font run. The loop updateslengthonly when it encounters a transition to another font. After the loop, the last run therefore retains the initial value0.When called with
returnSubstring: true, a string that maps entirely to one font returns a mapping withlength: 0and an emptytext; when there are multiple runs, the final run likewise has length zero and an empty substring. This contradicts the method documentation that returns substring start/length/text information and can cause callers to omit or truncate the final run.The earlier font mapping change in #3155 introduced this implementation; this report is about the missing final-run length update.
No runtime test was run for this report.