From 93462d87c3c8f398d5900be84349f29cb088d849 Mon Sep 17 00:00:00 2001 From: mitchell Date: Sat, 5 May 2018 11:52:27 -0400 Subject: Backport: Feature [feature-requests:#1211]. Use pre-computed table for UTF8BytesOfLead. Friendlier treatment of invalid UTF-8. Add tests for UniConversion handling invalid UTF-8. Simplify UTF8Classify tests. Backport of changeset 6643:ebbb4e5aaf93. --- gtk/PlatGTK.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gtk') diff --git a/gtk/PlatGTK.cxx b/gtk/PlatGTK.cxx index ebedc6e93..da04bae61 100644 --- a/gtk/PlatGTK.cxx +++ b/gtk/PlatGTK.cxx @@ -781,7 +781,7 @@ void SurfaceImpl::MeasureWidths(Font &font_, const char *s, int len, XYPOSITION positions[i++] = iti.position - (places - place) * iti.distance / places; positionsCalculated++; } - clusterStart += UTF8CharLength(static_cast(utfForm.c_str()[clusterStart])); + clusterStart += UTF8BytesOfLead[static_cast(utfForm.c_str()[clusterStart])]; place++; } } -- cgit v1.2.3