From ff707f0fe276677a4d89633ae4964e8b94712ca3 Mon Sep 17 00:00:00 2001 From: Zufu Liu Date: Thu, 22 Mar 2018 15:02:38 +1100 Subject: 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. --- 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