mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Backed out changeset e749fcac8cb3 (bug 1279785) for build bustage CLOSED TREE
This commit is contained in:
parent
ed6626caf2
commit
f868d85a4f
@ -32,10 +32,6 @@
|
||||
#include "gfxPlatformGtk.h"
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_X11
|
||||
#include "mozilla/X11Util.h"
|
||||
#endif
|
||||
|
||||
using namespace mozilla;
|
||||
using namespace mozilla::unicode;
|
||||
|
||||
@ -721,29 +717,6 @@ gfxFontconfigFontEntry::CreateScaledFont(FcPattern* aRenderPattern,
|
||||
static void ApplyGdkScreenFontOptions(FcPattern *aPattern);
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_X11
|
||||
static bool
|
||||
GetXftInt(Display* aDisplay, const char* aName, int* aResult)
|
||||
{
|
||||
if (!aDisplay) {
|
||||
return false;
|
||||
}
|
||||
char* value = XGetDefault(aDisplay, "Xft", aName);
|
||||
if (!value) {
|
||||
return false;
|
||||
}
|
||||
if (FcNameConstant(ToFcChar8Ptr(value), aResult)) {
|
||||
return true;
|
||||
}
|
||||
char* end;
|
||||
*aResult = strtol(value, &end, 0);
|
||||
if (end != value) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
PreparePattern(FcPattern* aPattern, bool aIsPrinterFont)
|
||||
{
|
||||
@ -772,16 +745,6 @@ PreparePattern(FcPattern* aPattern, bool aIsPrinterFont)
|
||||
#ifdef MOZ_WIDGET_GTK
|
||||
ApplyGdkScreenFontOptions(aPattern);
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_X11
|
||||
FcValue value;
|
||||
int lcdfilter;
|
||||
if (FcPatternGet(aPattern, FC_LCD_FILTER, 0, &value)
|
||||
== FcResultNoMatch &&
|
||||
GetXftInt(DefaultXDisplay(), "lcdfilter", &lcdfilter)) {
|
||||
FcPatternAddInteger(aPattern, FC_LCD_FILTER, lcdfilter);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
FcDefaultSubstitute(aPattern);
|
||||
|
Loading…
Reference in New Issue
Block a user