diff options
| author | Zufu Liu <unknown> | 2018-03-22 15:02:38 +1100 |
|---|---|---|
| committer | Zufu Liu <unknown> | 2018-03-22 15:02:38 +1100 |
| commit | ff707f0fe276677a4d89633ae4964e8b94712ca3 (patch) | |
| tree | 103d8741341108a8dc04ef59923e19da6f4a64e4 /gtk/PlatGTK.cxx | |
| parent | 9e4cdff7752304fff978ab7f606b64ea85310baf (diff) | |
| download | scintilla-mirror-ff707f0fe276677a4d89633ae4964e8b94712ca3.tar.gz | |
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.
Diffstat (limited to 'gtk/PlatGTK.cxx')
| -rw-r--r-- | gtk/PlatGTK.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
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<unsigned char>(utfForm.c_str()[clusterStart])); + clusterStart += UTF8BytesOfLead[static_cast<unsigned char>(utfForm.c_str()[clusterStart])]; place++; } } |
