We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c6d7f5 commit b0a3c74Copy full SHA for b0a3c74
third_party/txt/src/txt/paragraph.cc
@@ -739,7 +739,7 @@ void Paragraph::Layout(double width, bool force) {
739
// Add extra empty metrics for skipped whitespace at line end. This allows
740
// GetRectsForRange to properly draw empty rects at the ends of lines with
741
// truncated whitespace.
742
- if (line_end_index < line_range.end) {
+ if (line_end_index < line_range.end && !line_code_unit_runs.empty()) {
743
std::vector<GlyphPosition> empty_glyph_positions;
744
double end_x = line_code_unit_runs.back().positions.back().x_pos.end;
745
for (size_t index = line_end_index; index < line_range.end; ++index) {
0 commit comments