aboutsummaryrefslogtreecommitdiffhomepage
path: root/win32
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2012-03-01 10:12:25 +1100
committernyamatongwe <devnull@localhost>2012-03-01 10:12:25 +1100
commit20c9b985f1727402dc96c2e9d8a4a2f6d8a121db (patch)
treed3a166547db2cee4534f4bfd1f2230ebf1cb7834 /win32
parenta246752a2aedf005e1f6df9c8c7c64dd208cb834 (diff)
downloadscintilla-mirror-20c9b985f1727402dc96c2e9d8a4a2f6d8a121db.tar.gz
Bug #3494492. Change aveCharWidth in FontMeasurements to actually store
fractional width. This change complements change set 3994. Make WidthText() and AverageCharWidth() actually return fractional widths under Direct2D. From Marko Njezic.
Diffstat (limited to 'win32')
-rw-r--r--win32/PlatWin.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx
index 61e8b34d5..baa2e9ef5 100644
--- a/win32/PlatWin.cxx
+++ b/win32/PlatWin.cxx
@@ -1611,7 +1611,7 @@ XYPOSITION SurfaceD2D::WidthText(Font &font_, const char *s, int len) {
pTextLayout->Release();
}
}
- return int(width + 0.5);
+ return width;
}
void SurfaceD2D::MeasureWidths(Font &font_, const char *s, int len, XYPOSITION *positions) {
@@ -1754,7 +1754,7 @@ XYPOSITION SurfaceD2D::AverageCharWidth(Font &font_) {
pTextLayout->Release();
}
}
- return int(width + 0.5);
+ return width;
}
void SurfaceD2D::SetClip(PRectangle rc) {