diff options
-rw-r--r-- | gfx/thebes/gfxGDIFont.cpp | 3 | ||||
-rw-r--r-- | gfx/thebes/gfxGDIFontList.cpp | 21 | ||||
-rw-r--r-- | gfx/thebes/gfxGDIFontList.h | 3 | ||||
-rwxr-xr-x | gfx/thebes/gfxWindowsPlatform.cpp | 35 | ||||
-rw-r--r-- | gfx/thebes/gfxWindowsPlatform.h | 8 | ||||
-rw-r--r-- | modules/libpref/init/all.js | 8 |
6 files changed, 5 insertions, 73 deletions
diff --git a/gfx/thebes/gfxGDIFont.cpp b/gfx/thebes/gfxGDIFont.cpp index e6ceeaf6d..d6e98105c 100644 --- a/gfx/thebes/gfxGDIFont.cpp +++ b/gfx/thebes/gfxGDIFont.cpp @@ -461,8 +461,7 @@ gfxGDIFont::FillLogFont(LOGFONTW& aLogFont, gfxFloat aSize, weight = mNeedsBold ? 700 : fe->Weight(); } - fe->FillLogFont(&aLogFont, weight, aSize, - (mAntialiasOption == kAntialiasSubpixel) ? true : false); + fe->FillLogFont(&aLogFont, weight, aSize); // If GDI synthetic italic is wanted, force the lfItalic field to true if (aUseGDIFakeItalic) { diff --git a/gfx/thebes/gfxGDIFontList.cpp b/gfx/thebes/gfxGDIFontList.cpp index d80c49356..97a3d36ab 100644 --- a/gfx/thebes/gfxGDIFontList.cpp +++ b/gfx/thebes/gfxGDIFontList.cpp @@ -37,11 +37,6 @@ using namespace mozilla; #define ROUND(x) floor((x) + 0.5) - -#ifndef CLEARTYPE_QUALITY -#define CLEARTYPE_QUALITY 5 -#endif - #define LOG_FONTLIST(args) MOZ_LOG(gfxPlatform::GetLog(eGfxLog_fontlist), \ LogLevel::Debug, args) #define LOG_FONTLIST_ENABLED() MOZ_LOG_TEST( \ @@ -222,16 +217,7 @@ GDIFontEntry::IsSymbolFont() gfxFont * GDIFontEntry::CreateFontInstance(const gfxFontStyle* aFontStyle, bool aNeedsBold) { - bool isXP = !IsVistaOrLater(); - - bool useClearType = isXP && !aFontStyle->systemFont && - (gfxWindowsPlatform::GetPlatform()->UseClearTypeAlways() || - (mIsDataUserFont && - gfxWindowsPlatform::GetPlatform()->UseClearTypeForDownloadableFonts())); - - return new gfxGDIFont(this, aFontStyle, aNeedsBold, - (useClearType ? gfxFont::kAntialiasSubpixel - : gfxFont::kAntialiasDefault)); + return new gfxGDIFont(this, aFontStyle, aNeedsBold); } nsresult @@ -263,8 +249,7 @@ GDIFontEntry::CopyFontTable(uint32_t aTableTag, nsTArray<uint8_t>& aBuffer) void GDIFontEntry::FillLogFont(LOGFONTW *aLogFont, - uint16_t aWeight, gfxFloat aSize, - bool aUseCleartype) + uint16_t aWeight, gfxFloat aSize) { memcpy(aLogFont, &mLogFont, sizeof(LOGFONTW)); @@ -290,8 +275,6 @@ GDIFontEntry::FillLogFont(LOGFONTW *aLogFont, if (mIsDataUserFont) { aLogFont->lfItalic = 0; } - - aLogFont->lfQuality = (aUseCleartype ? CLEARTYPE_QUALITY : DEFAULT_QUALITY); } #define MISSING_GLYPH 0x1F // glyph index returned for missing characters diff --git a/gfx/thebes/gfxGDIFontList.h b/gfx/thebes/gfxGDIFontList.h index ffb513d64..60fb292e8 100644 --- a/gfx/thebes/gfxGDIFontList.h +++ b/gfx/thebes/gfxGDIFontList.h @@ -112,8 +112,7 @@ public: virtual bool IsSymbolFont(); - void FillLogFont(LOGFONTW *aLogFont, uint16_t aWeight, gfxFloat aSize, - bool aUseCleartype); + void FillLogFont(LOGFONTW *aLogFont, uint16_t aWeight, gfxFloat aSize); static gfxWindowsFontType DetermineFontType(const NEWTEXTMETRICW& metrics, DWORD fontType) diff --git a/gfx/thebes/gfxWindowsPlatform.cpp b/gfx/thebes/gfxWindowsPlatform.cpp index be1780797..8efa67afa 100755 --- a/gfx/thebes/gfxWindowsPlatform.cpp +++ b/gfx/thebes/gfxWindowsPlatform.cpp @@ -146,9 +146,6 @@ public: NS_IMPL_ISUPPORTS(GfxD2DVramReporter, nsIMemoryReporter) -#define GFX_USE_CLEARTYPE_ALWAYS "gfx.font_rendering.cleartype.always_use_for_content" -#define GFX_DOWNLOADABLE_FONTS_USE_CLEARTYPE "gfx.font_rendering.cleartype.use_for_downloadable_fonts" - #define GFX_CLEARTYPE_PARAMS "gfx.font_rendering.cleartype_params." #define GFX_CLEARTYPE_PARAMS_GAMMA "gfx.font_rendering.cleartype_params.gamma" #define GFX_CLEARTYPE_PARAMS_CONTRAST "gfx.font_rendering.cleartype_params.enhanced_contrast" @@ -320,9 +317,6 @@ NS_IMPL_ISUPPORTS(D3DSharedTexturesReporter, nsIMemoryReporter) gfxWindowsPlatform::gfxWindowsPlatform() : mRenderMode(RENDER_GDI) { - mUseClearTypeForDownloadableFonts = UNINITIALIZED_VALUE; - mUseClearTypeAlways = UNINITIALIZED_VALUE; - /* * Initialize COM */ @@ -997,26 +991,6 @@ gfxWindowsPlatform::GetPlatformCMSOutputProfile(void* &mem, size_t &mem_size) #endif // _WIN32 } -bool -gfxWindowsPlatform::UseClearTypeForDownloadableFonts() -{ - if (mUseClearTypeForDownloadableFonts == UNINITIALIZED_VALUE) { - mUseClearTypeForDownloadableFonts = Preferences::GetBool(GFX_DOWNLOADABLE_FONTS_USE_CLEARTYPE, true); - } - - return mUseClearTypeForDownloadableFonts; -} - -bool -gfxWindowsPlatform::UseClearTypeAlways() -{ - if (mUseClearTypeAlways == UNINITIALIZED_VALUE) { - mUseClearTypeAlways = Preferences::GetBool(GFX_USE_CLEARTYPE_ALWAYS, false); - } - - return mUseClearTypeAlways; -} - void gfxWindowsPlatform::GetDLLVersion(char16ptr_t aDLLPath, nsAString& aVersion) { @@ -1160,14 +1134,7 @@ gfxWindowsPlatform::FontsPrefsChanged(const char *aPref) gfxPlatform::FontsPrefsChanged(aPref); - if (!aPref) { - mUseClearTypeForDownloadableFonts = UNINITIALIZED_VALUE; - mUseClearTypeAlways = UNINITIALIZED_VALUE; - } else if (!strcmp(GFX_DOWNLOADABLE_FONTS_USE_CLEARTYPE, aPref)) { - mUseClearTypeForDownloadableFonts = UNINITIALIZED_VALUE; - } else if (!strcmp(GFX_USE_CLEARTYPE_ALWAYS, aPref)) { - mUseClearTypeAlways = UNINITIALIZED_VALUE; - } else if (!strncmp(GFX_CLEARTYPE_PARAMS, aPref, strlen(GFX_CLEARTYPE_PARAMS))) { + if (aPref && !strncmp(GFX_CLEARTYPE_PARAMS, aPref, strlen(GFX_CLEARTYPE_PARAMS))) { SetupClearTypeParams(); } else { clearTextFontCaches = false; diff --git a/gfx/thebes/gfxWindowsPlatform.h b/gfx/thebes/gfxWindowsPlatform.h index 8db7cf575..f77d9a87a 100644 --- a/gfx/thebes/gfxWindowsPlatform.h +++ b/gfx/thebes/gfxWindowsPlatform.h @@ -184,11 +184,6 @@ public: mozilla::gfx::BackendType GetContentBackendFor(mozilla::layers::LayersBackend aLayers) override; - // ClearType is not always enabled even when available (e.g. Windows XP) - // if either of these prefs are enabled and apply, use ClearType rendering - bool UseClearTypeForDownloadableFonts(); - bool UseClearTypeAlways(); - static void GetDLLVersion(char16ptr_t aDLLPath, nsAString& aVersion); // returns ClearType tuning information for each display @@ -247,9 +242,6 @@ protected: protected: RenderMode mRenderMode; - int8_t mUseClearTypeForDownloadableFonts; - int8_t mUseClearTypeAlways; - private: void Init(); void InitAcceleration() override; diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index 0091aab9b..cb345d007 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -3351,14 +3351,6 @@ pref("font.name.sans-serif.x-math", "Arial"); pref("font.name.monospace.x-math", "Courier New"); pref("font.name.cursive.x-math", "Comic Sans MS"); -// cleartype settings - false implies default system settings - -// use cleartype rendering for downloadable fonts (win xp only) -pref("gfx.font_rendering.cleartype.use_for_downloadable_fonts", true); - -// use cleartype rendering for all fonts always (win xp only) -pref("gfx.font_rendering.cleartype.always_use_for_content", false); - // ClearType tuning parameters for directwrite/d2d. // // Allows overriding of underlying registry values in: |