diff --git a/gfx/thebes/public/gfxQtPlatform.h b/gfx/thebes/public/gfxQtPlatform.h index 1a76a858db7..9c0b4a8c37e 100644 --- a/gfx/thebes/public/gfxQtPlatform.h +++ b/gfx/thebes/public/gfxQtPlatform.h @@ -135,6 +135,7 @@ public: protected: static gfxFontconfigUtils *sFontconfigUtils; + void InitDisplayCaps(); private: virtual qcms_profile *GetPlatformCMSOutputProfile(); diff --git a/gfx/thebes/src/gfxQtPlatform.cpp b/gfx/thebes/src/gfxQtPlatform.cpp index 05620e1be16..bce3aafc251 100644 --- a/gfx/thebes/src/gfxQtPlatform.cpp +++ b/gfx/thebes/src/gfxQtPlatform.cpp @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include "gfxQtPlatform.h" @@ -583,3 +583,12 @@ gfxQtPlatform::SetPrefFontEntries(const nsCString& aKey, nsTArraydesktop(); + sDPI = rootWindow->logicalDpiY(); // y-axis DPI for fonts + if (sDPI <= 0) + sDPI = 96; // something more sensible +} +