mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-24 21:58:06 +00:00
Fix crashes when core X fonts are disable: ignore the pref to disable Xft when core fonts are disabled so we can't get into a state where we have zero acceptable font backends. b=287187 r+sr=bryner
This commit is contained in:
parent
ed0cb8dd8c
commit
36d8dd0018
@ -97,7 +97,7 @@ NS_FontMetricsFamilyExists(nsIDeviceContext *aDevice, const nsString &aName)
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef MOZ_ENABLE_XFT
|
||||
#if defined(MOZ_ENABLE_XFT) && defined(MOZ_ENABLE_COREXFONTS)
|
||||
|
||||
PRBool
|
||||
NS_IsXftEnabled(void)
|
||||
@ -136,9 +136,9 @@ NS_IsXftEnabled(void)
|
||||
return cachedXftSetting;
|
||||
}
|
||||
|
||||
#endif /* MOZ_ENABLE_XFT */
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_ENABLE_PANGO
|
||||
#if defined(MOZ_ENABLE_PANGO) && (defined(MOZ_ENABLE_XFT) || defined(MOZ_ENABLE_COREXFONTS))
|
||||
|
||||
PRBool
|
||||
NS_IsPangoEnabled(void)
|
||||
|
@ -40,15 +40,23 @@
|
||||
#ifndef __nsFontMetricsUtils_h
|
||||
#define __nsFontMetricsUtils_h
|
||||
|
||||
extern PRUint32 NS_FontMetricsGetHints (void);
|
||||
extern PRUint32 NS_FontMetricsGetHints ();
|
||||
extern nsresult NS_FontMetricsFamilyExists(nsIDeviceContext *aDevice,
|
||||
const nsString &aName);
|
||||
#ifdef MOZ_ENABLE_XFT
|
||||
extern PRBool NS_IsXftEnabled(void);
|
||||
#ifdef MOZ_ENABLE_COREXFONTS
|
||||
extern PRBool NS_IsXftEnabled();
|
||||
#else
|
||||
inline PRBool NS_IsXftEnabled() { return PR_TRUE; }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef MOZ_ENABLE_PANGO
|
||||
extern PRBool NS_IsPangoEnabled(void);
|
||||
#if defined(MOZ_ENABLE_XFT) || defined(MOZ_ENABLE_COREXFONTS)
|
||||
extern PRBool NS_IsPangoEnabled();
|
||||
#else
|
||||
inline PRBool NS_IsPangoEnabled() { return PR_TRUE; }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* __nsFontMetricsUtils_h */
|
||||
|
Loading…
x
Reference in New Issue
Block a user