diff options
| author | nyamatongwe <devnull@localhost> | 2011-08-07 13:41:35 +1000 |
|---|---|---|
| committer | nyamatongwe <devnull@localhost> | 2011-08-07 13:41:35 +1000 |
| commit | b510d1fe619eff95c7e0d0a88421b8e3cad8f729 (patch) | |
| tree | 595b5f8217a081087316de368c15d7c0a4f586b4 /win32/ScintillaWin.cxx | |
| parent | a320c92efc362ad68b903e73e848b4e8781fa4ec (diff) | |
| download | scintilla-mirror-b510d1fe619eff95c7e0d0a88421b8e3cad8f729.tar.gz | |
Implement APIs for fractional font sizes and a range of weights.
Diffstat (limited to 'win32/ScintillaWin.cxx')
| -rw-r--r-- | win32/ScintillaWin.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/win32/ScintillaWin.cxx b/win32/ScintillaWin.cxx index 28e48596b..6bc770eed 100644 --- a/win32/ScintillaWin.cxx +++ b/win32/ScintillaWin.cxx @@ -2151,9 +2151,9 @@ void ScintillaWin::ImeStartComposition() { // The logfont for the IME is recreated here. int styleHere = (pdoc->StyleAt(sel.MainCaret())) & 31; LOGFONTA lf = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ""}; - int sizeZoomed = vs.styles[styleHere].size + vs.zoomLevel; - if (sizeZoomed <= 2) // Hangs if sizeZoomed <= 1 - sizeZoomed = 2; + int sizeZoomed = vs.styles[styleHere].size + vs.zoomLevel * SC_FONT_SIZE_MULTIPLIER; + if (sizeZoomed <= 2 * SC_FONT_SIZE_MULTIPLIER) // Hangs if sizeZoomed <= 1 + sizeZoomed = 2 * SC_FONT_SIZE_MULTIPLIER; AutoSurface surface(this); int deviceHeight = sizeZoomed; if (surface) { @@ -2161,7 +2161,7 @@ void ScintillaWin::ImeStartComposition() { } // The negative is to allow for leading lf.lfHeight = -(abs(deviceHeight)); - lf.lfWeight = vs.styles[styleHere].bold ? FW_BOLD : FW_NORMAL; + lf.lfWeight = vs.styles[styleHere].weight; lf.lfItalic = static_cast<BYTE>(vs.styles[styleHere].italic ? 1 : 0); lf.lfCharSet = DEFAULT_CHARSET; lf.lfFaceName[0] = '\0'; |
