From 056eb8dc990653e2a28b4c27e5e1fb9f43c78064 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 2 Jun 2007 13:13:24 +0000 Subject: [PATCH] added msw.font.no-proof-quality system option as it makes more fonts available (feature request 1617941) [backport from HEAD] git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@46268 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/changes.txt | 7 ++++--- docs/latex/wx/sysopt.tex | 5 +++++ src/msw/font.cpp | 14 +++++++++++--- 3 files changed, 20 insertions(+), 6 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index a4e6cab957..cd04768f20 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -87,6 +87,7 @@ Major new features in 2.8 release wxDirPickerCtrl, wxFilePickerCtrl, wxFontPickerCtrl, wxCollapsiblePane, wxSearchCtrl, wxAboutBox, wxTreebook, tar streams. + 2.8.5 ----- @@ -100,13 +101,13 @@ All (GUI): wxMSW: -- Correct problem with page setup dialog when using - Landscape mode. +- Correct problem with page setup dialog when using landscape mode +- Added msw.font.no-proof-quality system option, see manual for description wxGTK: - More work on setting defaults in GNOME print dialogs. -- Also made Landscape printing work as per wxMSW. +- Also made landscape printing work as per wxMSW. - Add support for clipping in GNOME print backend. - Speed up wxBitmap::Rescale() - Add right button event for wxToolbar's tools (Tim Kosse) diff --git a/docs/latex/wx/sysopt.tex b/docs/latex/wx/sysopt.tex index cd945711a4..d514a633fe 100644 --- a/docs/latex/wx/sysopt.tex +++ b/docs/latex/wx/sysopt.tex @@ -31,6 +31,11 @@ Setting this to 0 causes more flicker, but allows applications to paint graphics \twocolitem{msw.display.directdraw}{If set to 1, use DirectDraw-based implementation of \helpref{wxDisplay}{wxdisplay}. By default the standard Win32 functions are used.} +\twocolitem{msw.font.no-proof-quality}{If set to 1, use default fonts quality +instead of proof quality when creating fonts. With proof quality the fonts +have slightly better appearance but not all fonts are available in this +quality, e.g. the Terminal font in small sizes is not and this option may be +used if wider fonts selection is more important than higher quality.} \end{twocollist} \wxheading{Mac} diff --git a/src/msw/font.cpp b/src/msw/font.cpp index 397a8c14f0..7e2443320f 100644 --- a/src/msw/font.cpp +++ b/src/msw/font.cpp @@ -39,6 +39,10 @@ #include "wx/fontutil.h" #include "wx/fontmap.h" +#ifndef __WXWINCE__ + #include "wx/sysopt.h" +#endif + #include "wx/tokenzr.h" #if wxUSE_EXTENDED_RTTI @@ -417,12 +421,16 @@ void wxNativeFontInfo::Init() { wxZeroMemory(lf); - // we get better font quality if we use this instead of DEFAULT_QUALITY - // apparently without any drawbacks + // we get better font quality if we use PROOF_QUALITY instead of + // DEFAULT_QUALITY but some fonts (e.g. "Terminal 6pt") are not available + // then so we allow to set a global option to choose between quality and + // wider font selection #ifdef __WXWINCE__ lf.lfQuality = CLEARTYPE_QUALITY; #else - lf.lfQuality = PROOF_QUALITY; + lf.lfQuality = wxSystemOptions::GetOptionInt(_T("msw.font.no-proof-quality")) + ? DEFAULT_QUALITY + : PROOF_QUALITY; #endif }