diff options
| author | Zufu Liu <unknown> | 2019-04-12 08:22:21 +1000 |
|---|---|---|
| committer | Zufu Liu <unknown> | 2019-04-12 08:22:21 +1000 |
| commit | 4d36ecc2295117c77750e0c1df71cb65362549c5 (patch) | |
| tree | ce063f9a55ff6c69c5ada2cfb0950058e2a003ab /win32/PlatWin.cxx | |
| parent | 3ce0a475f3a28c4fe54e1b6bd3ffe0e423d5779b (diff) | |
| download | scintilla-mirror-4d36ecc2295117c77750e0c1df71cb65362549c5.tar.gz | |
Backport: Bug [#2093]. Improve efficiency with single byte character sets.
Backport of changeset 7424:0d4b29e058f7.
Diffstat (limited to 'win32/PlatWin.cxx')
| -rw-r--r-- | win32/PlatWin.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index 4ccc40f14..2b807198a 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -1177,7 +1177,7 @@ void SurfaceD2D::SetFont(Font &font_) { yDescent = pfm->yDescent; yInternalLeading = pfm->yInternalLeading; codePageText = codePage; - if (pfm->characterSet) { + if (!unicodeMode && pfm->characterSet) { codePageText = Scintilla::CodePageFromCharSet(pfm->characterSet, codePage); } if (pRenderTarget) { @@ -1613,7 +1613,7 @@ void SurfaceD2D::MeasureWidths(Font &font_, const char *s, int len, XYPOSITION * while (i<len) { positions[i++] = lastPos; } - } else if (codePageText == 0) { + } else if (!IsDBCSCodePage(codePageText)) { // One char per position PLATFORM_ASSERT(len == tbuf.tlen); |
