diff options
author | nyamatongwe <devnull@localhost> | 2011-08-02 13:22:56 +1000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2011-08-02 13:22:56 +1000 |
commit | 7e9aeaf818ef60c5f6a92ee617bc4094b13b5070 (patch) | |
tree | 537e9e69272f00bde42ce5e980b639d48b34684f | |
parent | 56dc577ef4b2e032e4269b9bf364df3a4821c854 (diff) | |
parent | 32ccf7ecf4286b9ce64360c1c857f743cbcf51f4 (diff) | |
download | scintilla-mirror-7e9aeaf818ef60c5f6a92ee617bc4094b13b5070.tar.gz |
Merged with Cocoa fractional widths.
-rw-r--r-- | win32/PlatWin.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx index d4a015cf9..9e9ead409 100644 --- a/win32/PlatWin.cxx +++ b/win32/PlatWin.cxx @@ -313,8 +313,10 @@ FontCached::FontCached(const char *faceName_, int characterSet_, float size_, bo WCHAR wszFace[faceSize]; UTF16FromUTF8(faceName_, strlen(faceName_)+1, wszFace, faceSize); FLOAT fHeight = size_; + if (fHeight > 2000) + fHeight = fHeight / 1000.0f; HRESULT hr = pIDWriteFactory->CreateTextFormat(wszFace, NULL, - bold_ ? DWRITE_FONT_WEIGHT_BOLD : DWRITE_FONT_WEIGHT_REGULAR, + bold_ ? DWRITE_FONT_WEIGHT_SEMI_BOLD : DWRITE_FONT_WEIGHT_REGULAR, italic_ ? DWRITE_FONT_STYLE_ITALIC : DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, fHeight, L"en-us", &pTextFormat); if (SUCCEEDED(hr)) { |