mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-21 20:38:45 +00:00
2b54817f14
of what is changed in 1.6b, checkout the release notes at: http://www.mozilla.org/releases/mozilla1.6b/
49 lines
1.2 KiB
C++
49 lines
1.2 KiB
C++
--- gfx/src/gtk/nsFontMetricsXft.cpp.orig Tue Nov 25 21:44:50 2003
|
|
+++ gfx/src/gtk/nsFontMetricsXft.cpp Sun Dec 7 15:20:48 2003
|
|
@@ -105,6 +105,7 @@
|
|
FcPattern *mPattern;
|
|
FcPattern *mFontName;
|
|
FcCharSet *mCharset;
|
|
+ int mNotXft;
|
|
};
|
|
|
|
class nsFontXftInfo;
|
|
@@ -1093,7 +1094,7 @@
|
|
|
|
for (PRInt32 i = 1, end = mLoadedFonts.Count(); i < end; ++i) {
|
|
nsFontXft *font = (nsFontXft *)mLoadedFonts.ElementAt(i);
|
|
- if (font->HasChar(PRUint32(aChar)))
|
|
+ if (font->HasChar(PRUint32(aChar)) && font->GetXftFont())
|
|
return font;
|
|
}
|
|
|
|
@@ -1960,6 +1961,7 @@
|
|
FcPatternReference(mFontName);
|
|
|
|
mXftFont = nsnull;
|
|
+ mNotXft = 0;
|
|
|
|
// set up our charset
|
|
mCharset = nsnull;
|
|
@@ -1986,7 +1988,7 @@
|
|
XftFont *
|
|
nsFontXft::GetXftFont(void)
|
|
{
|
|
- if (!mXftFont) {
|
|
+ if (!mXftFont && !mNotXft) {
|
|
FcPattern *pat = FcFontRenderPrepare(0, mPattern, mFontName);
|
|
if (!pat)
|
|
return nsnull;
|
|
@@ -2005,8 +2007,10 @@
|
|
FcPatternDel(pat, FC_SPACING);
|
|
|
|
mXftFont = XftFontOpenPattern(GDK_DISPLAY(), pat);
|
|
- if (!mXftFont)
|
|
+ if (!mXftFont) {
|
|
FcPatternDestroy(pat);
|
|
+ mNotXft = 1;
|
|
+ }
|
|
}
|
|
|
|
return mXftFont;
|