diff options
author | nyamatongwe <unknown> | 2011-08-02 13:22:10 +1000 |
---|---|---|
committer | nyamatongwe <unknown> | 2011-08-02 13:22:10 +1000 |
commit | 46a0809b348e8c7c67fa1631e16eee016e23ff4c (patch) | |
tree | 4f3904ce522497cbc4fb76d45a3aed8746034772 /win32/PlatWin.cxx | |
parent | d689117719f2cec9c74aec96cfc59700e1421957 (diff) | |
download | scintilla-mirror-46a0809b348e8c7c67fa1631e16eee016e23ff4c.tar.gz |
Use SEMI_BOLD for bold as Segoe UI looks better at semi bold than bold.
Allow fractional font sizes by multiplying by 1000.
Diffstat (limited to 'win32/PlatWin.cxx')
-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)) { |