mirror of
https://git.FreeBSD.org/ports.git
synced 2025-02-02 11:09:29 +00:00
Restore the patch to stop mozilla from crashing on some russian sites.
This commit is contained in:
parent
56e3e2dbd1
commit
55fc6b08a7
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=86833
@ -0,0 +1,57 @@
|
||||
--- gfx/src/gtk/nsFontMetricsXft.cpp.save Thu Aug 7 12:14:49 2003
|
||||
+++ gfx/src/gtk/nsFontMetricsXft.cpp Thu Aug 7 12:33:45 2003
|
||||
@@ -106,6 +106,7 @@
|
||||
FcPattern *mPattern;
|
||||
FcPattern *mFontName;
|
||||
FcCharSet *mCharset;
|
||||
+ int mNotXft;
|
||||
};
|
||||
|
||||
class nsFontXftInfo;
|
||||
@@ -1051,7 +1052,7 @@
|
||||
// font in our loaded list that supports the character
|
||||
for (PRInt32 i = 0, 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;
|
||||
}
|
||||
|
||||
@@ -1492,7 +1493,7 @@
|
||||
// this character.
|
||||
for (PRInt32 j = 0, end = mLoadedFonts.Count(); j < end; ++j) {
|
||||
font = (nsFontXft *)mLoadedFonts.ElementAt(j);
|
||||
- if (font->HasChar(c)) {
|
||||
+ if (font->HasChar(c) && font->GetXftFont()) {
|
||||
currFont = font;
|
||||
goto FoundFont; // for speed -- avoid "if" statement
|
||||
}
|
||||
@@ -1922,6 +1923,7 @@
|
||||
FcPatternReference(mFontName);
|
||||
|
||||
mXftFont = nsnull;
|
||||
+ mNotXft = 0;
|
||||
|
||||
// set up our charset
|
||||
mCharset = nsnull;
|
||||
@@ -1948,7 +1950,7 @@
|
||||
XftFont *
|
||||
nsFontXft::GetXftFont(void)
|
||||
{
|
||||
- if (!mXftFont) {
|
||||
+ if (!mXftFont && !mNotXft) {
|
||||
FcPattern *pat = FcFontRenderPrepare(0, mPattern, mFontName);
|
||||
if (!pat)
|
||||
return nsnull;
|
||||
@@ -1967,8 +1969,10 @@
|
||||
FcPatternDel(pat, FC_SPACING);
|
||||
|
||||
mXftFont = XftFontOpenPattern(GDK_DISPLAY(), pat);
|
||||
- if (!mXftFont)
|
||||
+ if (!mXftFont) {
|
||||
FcPatternDestroy(pat);
|
||||
+ mNotXft = 1;
|
||||
+ }
|
||||
}
|
||||
|
||||
return mXftFont;
|
57
www/firefox-esr/files/patch-gfx_src_gtk_nsFontMetricsXft.cpp
Normal file
57
www/firefox-esr/files/patch-gfx_src_gtk_nsFontMetricsXft.cpp
Normal file
@ -0,0 +1,57 @@
|
||||
--- gfx/src/gtk/nsFontMetricsXft.cpp.save Thu Aug 7 12:14:49 2003
|
||||
+++ gfx/src/gtk/nsFontMetricsXft.cpp Thu Aug 7 12:33:45 2003
|
||||
@@ -106,6 +106,7 @@
|
||||
FcPattern *mPattern;
|
||||
FcPattern *mFontName;
|
||||
FcCharSet *mCharset;
|
||||
+ int mNotXft;
|
||||
};
|
||||
|
||||
class nsFontXftInfo;
|
||||
@@ -1051,7 +1052,7 @@
|
||||
// font in our loaded list that supports the character
|
||||
for (PRInt32 i = 0, 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;
|
||||
}
|
||||
|
||||
@@ -1492,7 +1493,7 @@
|
||||
// this character.
|
||||
for (PRInt32 j = 0, end = mLoadedFonts.Count(); j < end; ++j) {
|
||||
font = (nsFontXft *)mLoadedFonts.ElementAt(j);
|
||||
- if (font->HasChar(c)) {
|
||||
+ if (font->HasChar(c) && font->GetXftFont()) {
|
||||
currFont = font;
|
||||
goto FoundFont; // for speed -- avoid "if" statement
|
||||
}
|
||||
@@ -1922,6 +1923,7 @@
|
||||
FcPatternReference(mFontName);
|
||||
|
||||
mXftFont = nsnull;
|
||||
+ mNotXft = 0;
|
||||
|
||||
// set up our charset
|
||||
mCharset = nsnull;
|
||||
@@ -1948,7 +1950,7 @@
|
||||
XftFont *
|
||||
nsFontXft::GetXftFont(void)
|
||||
{
|
||||
- if (!mXftFont) {
|
||||
+ if (!mXftFont && !mNotXft) {
|
||||
FcPattern *pat = FcFontRenderPrepare(0, mPattern, mFontName);
|
||||
if (!pat)
|
||||
return nsnull;
|
||||
@@ -1967,8 +1969,10 @@
|
||||
FcPatternDel(pat, FC_SPACING);
|
||||
|
||||
mXftFont = XftFontOpenPattern(GDK_DISPLAY(), pat);
|
||||
- if (!mXftFont)
|
||||
+ if (!mXftFont) {
|
||||
FcPatternDestroy(pat);
|
||||
+ mNotXft = 1;
|
||||
+ }
|
||||
}
|
||||
|
||||
return mXftFont;
|
57
www/firefox/files/patch-gfx_src_gtk_nsFontMetricsXft.cpp
Normal file
57
www/firefox/files/patch-gfx_src_gtk_nsFontMetricsXft.cpp
Normal file
@ -0,0 +1,57 @@
|
||||
--- gfx/src/gtk/nsFontMetricsXft.cpp.save Thu Aug 7 12:14:49 2003
|
||||
+++ gfx/src/gtk/nsFontMetricsXft.cpp Thu Aug 7 12:33:45 2003
|
||||
@@ -106,6 +106,7 @@
|
||||
FcPattern *mPattern;
|
||||
FcPattern *mFontName;
|
||||
FcCharSet *mCharset;
|
||||
+ int mNotXft;
|
||||
};
|
||||
|
||||
class nsFontXftInfo;
|
||||
@@ -1051,7 +1052,7 @@
|
||||
// font in our loaded list that supports the character
|
||||
for (PRInt32 i = 0, 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;
|
||||
}
|
||||
|
||||
@@ -1492,7 +1493,7 @@
|
||||
// this character.
|
||||
for (PRInt32 j = 0, end = mLoadedFonts.Count(); j < end; ++j) {
|
||||
font = (nsFontXft *)mLoadedFonts.ElementAt(j);
|
||||
- if (font->HasChar(c)) {
|
||||
+ if (font->HasChar(c) && font->GetXftFont()) {
|
||||
currFont = font;
|
||||
goto FoundFont; // for speed -- avoid "if" statement
|
||||
}
|
||||
@@ -1922,6 +1923,7 @@
|
||||
FcPatternReference(mFontName);
|
||||
|
||||
mXftFont = nsnull;
|
||||
+ mNotXft = 0;
|
||||
|
||||
// set up our charset
|
||||
mCharset = nsnull;
|
||||
@@ -1948,7 +1950,7 @@
|
||||
XftFont *
|
||||
nsFontXft::GetXftFont(void)
|
||||
{
|
||||
- if (!mXftFont) {
|
||||
+ if (!mXftFont && !mNotXft) {
|
||||
FcPattern *pat = FcFontRenderPrepare(0, mPattern, mFontName);
|
||||
if (!pat)
|
||||
return nsnull;
|
||||
@@ -1967,8 +1969,10 @@
|
||||
FcPatternDel(pat, FC_SPACING);
|
||||
|
||||
mXftFont = XftFontOpenPattern(GDK_DISPLAY(), pat);
|
||||
- if (!mXftFont)
|
||||
+ if (!mXftFont) {
|
||||
FcPatternDestroy(pat);
|
||||
+ mNotXft = 1;
|
||||
+ }
|
||||
}
|
||||
|
||||
return mXftFont;
|
57
www/firefox10/files/patch-gfx_src_gtk_nsFontMetricsXft.cpp
Normal file
57
www/firefox10/files/patch-gfx_src_gtk_nsFontMetricsXft.cpp
Normal file
@ -0,0 +1,57 @@
|
||||
--- gfx/src/gtk/nsFontMetricsXft.cpp.save Thu Aug 7 12:14:49 2003
|
||||
+++ gfx/src/gtk/nsFontMetricsXft.cpp Thu Aug 7 12:33:45 2003
|
||||
@@ -106,6 +106,7 @@
|
||||
FcPattern *mPattern;
|
||||
FcPattern *mFontName;
|
||||
FcCharSet *mCharset;
|
||||
+ int mNotXft;
|
||||
};
|
||||
|
||||
class nsFontXftInfo;
|
||||
@@ -1051,7 +1052,7 @@
|
||||
// font in our loaded list that supports the character
|
||||
for (PRInt32 i = 0, 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;
|
||||
}
|
||||
|
||||
@@ -1492,7 +1493,7 @@
|
||||
// this character.
|
||||
for (PRInt32 j = 0, end = mLoadedFonts.Count(); j < end; ++j) {
|
||||
font = (nsFontXft *)mLoadedFonts.ElementAt(j);
|
||||
- if (font->HasChar(c)) {
|
||||
+ if (font->HasChar(c) && font->GetXftFont()) {
|
||||
currFont = font;
|
||||
goto FoundFont; // for speed -- avoid "if" statement
|
||||
}
|
||||
@@ -1922,6 +1923,7 @@
|
||||
FcPatternReference(mFontName);
|
||||
|
||||
mXftFont = nsnull;
|
||||
+ mNotXft = 0;
|
||||
|
||||
// set up our charset
|
||||
mCharset = nsnull;
|
||||
@@ -1948,7 +1950,7 @@
|
||||
XftFont *
|
||||
nsFontXft::GetXftFont(void)
|
||||
{
|
||||
- if (!mXftFont) {
|
||||
+ if (!mXftFont && !mNotXft) {
|
||||
FcPattern *pat = FcFontRenderPrepare(0, mPattern, mFontName);
|
||||
if (!pat)
|
||||
return nsnull;
|
||||
@@ -1967,8 +1969,10 @@
|
||||
FcPatternDel(pat, FC_SPACING);
|
||||
|
||||
mXftFont = XftFontOpenPattern(GDK_DISPLAY(), pat);
|
||||
- if (!mXftFont)
|
||||
+ if (!mXftFont) {
|
||||
FcPatternDestroy(pat);
|
||||
+ mNotXft = 1;
|
||||
+ }
|
||||
}
|
||||
|
||||
return mXftFont;
|
57
www/firefox15/files/patch-gfx_src_gtk_nsFontMetricsXft.cpp
Normal file
57
www/firefox15/files/patch-gfx_src_gtk_nsFontMetricsXft.cpp
Normal file
@ -0,0 +1,57 @@
|
||||
--- gfx/src/gtk/nsFontMetricsXft.cpp.save Thu Aug 7 12:14:49 2003
|
||||
+++ gfx/src/gtk/nsFontMetricsXft.cpp Thu Aug 7 12:33:45 2003
|
||||
@@ -106,6 +106,7 @@
|
||||
FcPattern *mPattern;
|
||||
FcPattern *mFontName;
|
||||
FcCharSet *mCharset;
|
||||
+ int mNotXft;
|
||||
};
|
||||
|
||||
class nsFontXftInfo;
|
||||
@@ -1051,7 +1052,7 @@
|
||||
// font in our loaded list that supports the character
|
||||
for (PRInt32 i = 0, 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;
|
||||
}
|
||||
|
||||
@@ -1492,7 +1493,7 @@
|
||||
// this character.
|
||||
for (PRInt32 j = 0, end = mLoadedFonts.Count(); j < end; ++j) {
|
||||
font = (nsFontXft *)mLoadedFonts.ElementAt(j);
|
||||
- if (font->HasChar(c)) {
|
||||
+ if (font->HasChar(c) && font->GetXftFont()) {
|
||||
currFont = font;
|
||||
goto FoundFont; // for speed -- avoid "if" statement
|
||||
}
|
||||
@@ -1922,6 +1923,7 @@
|
||||
FcPatternReference(mFontName);
|
||||
|
||||
mXftFont = nsnull;
|
||||
+ mNotXft = 0;
|
||||
|
||||
// set up our charset
|
||||
mCharset = nsnull;
|
||||
@@ -1948,7 +1950,7 @@
|
||||
XftFont *
|
||||
nsFontXft::GetXftFont(void)
|
||||
{
|
||||
- if (!mXftFont) {
|
||||
+ if (!mXftFont && !mNotXft) {
|
||||
FcPattern *pat = FcFontRenderPrepare(0, mPattern, mFontName);
|
||||
if (!pat)
|
||||
return nsnull;
|
||||
@@ -1967,8 +1969,10 @@
|
||||
FcPatternDel(pat, FC_SPACING);
|
||||
|
||||
mXftFont = XftFontOpenPattern(GDK_DISPLAY(), pat);
|
||||
- if (!mXftFont)
|
||||
+ if (!mXftFont) {
|
||||
FcPatternDestroy(pat);
|
||||
+ mNotXft = 1;
|
||||
+ }
|
||||
}
|
||||
|
||||
return mXftFont;
|
@ -0,0 +1,57 @@
|
||||
--- gfx/src/gtk/nsFontMetricsXft.cpp.save Thu Aug 7 12:14:49 2003
|
||||
+++ gfx/src/gtk/nsFontMetricsXft.cpp Thu Aug 7 12:33:45 2003
|
||||
@@ -106,6 +106,7 @@
|
||||
FcPattern *mPattern;
|
||||
FcPattern *mFontName;
|
||||
FcCharSet *mCharset;
|
||||
+ int mNotXft;
|
||||
};
|
||||
|
||||
class nsFontXftInfo;
|
||||
@@ -1051,7 +1052,7 @@
|
||||
// font in our loaded list that supports the character
|
||||
for (PRInt32 i = 0, 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;
|
||||
}
|
||||
|
||||
@@ -1492,7 +1493,7 @@
|
||||
// this character.
|
||||
for (PRInt32 j = 0, end = mLoadedFonts.Count(); j < end; ++j) {
|
||||
font = (nsFontXft *)mLoadedFonts.ElementAt(j);
|
||||
- if (font->HasChar(c)) {
|
||||
+ if (font->HasChar(c) && font->GetXftFont()) {
|
||||
currFont = font;
|
||||
goto FoundFont; // for speed -- avoid "if" statement
|
||||
}
|
||||
@@ -1922,6 +1923,7 @@
|
||||
FcPatternReference(mFontName);
|
||||
|
||||
mXftFont = nsnull;
|
||||
+ mNotXft = 0;
|
||||
|
||||
// set up our charset
|
||||
mCharset = nsnull;
|
||||
@@ -1948,7 +1950,7 @@
|
||||
XftFont *
|
||||
nsFontXft::GetXftFont(void)
|
||||
{
|
||||
- if (!mXftFont) {
|
||||
+ if (!mXftFont && !mNotXft) {
|
||||
FcPattern *pat = FcFontRenderPrepare(0, mPattern, mFontName);
|
||||
if (!pat)
|
||||
return nsnull;
|
||||
@@ -1967,8 +1969,10 @@
|
||||
FcPatternDel(pat, FC_SPACING);
|
||||
|
||||
mXftFont = XftFontOpenPattern(GDK_DISPLAY(), pat);
|
||||
- if (!mXftFont)
|
||||
+ if (!mXftFont) {
|
||||
FcPatternDestroy(pat);
|
||||
+ mNotXft = 1;
|
||||
+ }
|
||||
}
|
||||
|
||||
return mXftFont;
|
57
www/firefox35/files/patch-gfx_src_gtk_nsFontMetricsXft.cpp
Normal file
57
www/firefox35/files/patch-gfx_src_gtk_nsFontMetricsXft.cpp
Normal file
@ -0,0 +1,57 @@
|
||||
--- gfx/src/gtk/nsFontMetricsXft.cpp.save Thu Aug 7 12:14:49 2003
|
||||
+++ gfx/src/gtk/nsFontMetricsXft.cpp Thu Aug 7 12:33:45 2003
|
||||
@@ -106,6 +106,7 @@
|
||||
FcPattern *mPattern;
|
||||
FcPattern *mFontName;
|
||||
FcCharSet *mCharset;
|
||||
+ int mNotXft;
|
||||
};
|
||||
|
||||
class nsFontXftInfo;
|
||||
@@ -1051,7 +1052,7 @@
|
||||
// font in our loaded list that supports the character
|
||||
for (PRInt32 i = 0, 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;
|
||||
}
|
||||
|
||||
@@ -1492,7 +1493,7 @@
|
||||
// this character.
|
||||
for (PRInt32 j = 0, end = mLoadedFonts.Count(); j < end; ++j) {
|
||||
font = (nsFontXft *)mLoadedFonts.ElementAt(j);
|
||||
- if (font->HasChar(c)) {
|
||||
+ if (font->HasChar(c) && font->GetXftFont()) {
|
||||
currFont = font;
|
||||
goto FoundFont; // for speed -- avoid "if" statement
|
||||
}
|
||||
@@ -1922,6 +1923,7 @@
|
||||
FcPatternReference(mFontName);
|
||||
|
||||
mXftFont = nsnull;
|
||||
+ mNotXft = 0;
|
||||
|
||||
// set up our charset
|
||||
mCharset = nsnull;
|
||||
@@ -1948,7 +1950,7 @@
|
||||
XftFont *
|
||||
nsFontXft::GetXftFont(void)
|
||||
{
|
||||
- if (!mXftFont) {
|
||||
+ if (!mXftFont && !mNotXft) {
|
||||
FcPattern *pat = FcFontRenderPrepare(0, mPattern, mFontName);
|
||||
if (!pat)
|
||||
return nsnull;
|
||||
@@ -1967,8 +1969,10 @@
|
||||
FcPatternDel(pat, FC_SPACING);
|
||||
|
||||
mXftFont = XftFontOpenPattern(GDK_DISPLAY(), pat);
|
||||
- if (!mXftFont)
|
||||
+ if (!mXftFont) {
|
||||
FcPatternDestroy(pat);
|
||||
+ mNotXft = 1;
|
||||
+ }
|
||||
}
|
||||
|
||||
return mXftFont;
|
57
www/firefox36/files/patch-gfx_src_gtk_nsFontMetricsXft.cpp
Normal file
57
www/firefox36/files/patch-gfx_src_gtk_nsFontMetricsXft.cpp
Normal file
@ -0,0 +1,57 @@
|
||||
--- gfx/src/gtk/nsFontMetricsXft.cpp.save Thu Aug 7 12:14:49 2003
|
||||
+++ gfx/src/gtk/nsFontMetricsXft.cpp Thu Aug 7 12:33:45 2003
|
||||
@@ -106,6 +106,7 @@
|
||||
FcPattern *mPattern;
|
||||
FcPattern *mFontName;
|
||||
FcCharSet *mCharset;
|
||||
+ int mNotXft;
|
||||
};
|
||||
|
||||
class nsFontXftInfo;
|
||||
@@ -1051,7 +1052,7 @@
|
||||
// font in our loaded list that supports the character
|
||||
for (PRInt32 i = 0, 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;
|
||||
}
|
||||
|
||||
@@ -1492,7 +1493,7 @@
|
||||
// this character.
|
||||
for (PRInt32 j = 0, end = mLoadedFonts.Count(); j < end; ++j) {
|
||||
font = (nsFontXft *)mLoadedFonts.ElementAt(j);
|
||||
- if (font->HasChar(c)) {
|
||||
+ if (font->HasChar(c) && font->GetXftFont()) {
|
||||
currFont = font;
|
||||
goto FoundFont; // for speed -- avoid "if" statement
|
||||
}
|
||||
@@ -1922,6 +1923,7 @@
|
||||
FcPatternReference(mFontName);
|
||||
|
||||
mXftFont = nsnull;
|
||||
+ mNotXft = 0;
|
||||
|
||||
// set up our charset
|
||||
mCharset = nsnull;
|
||||
@@ -1948,7 +1950,7 @@
|
||||
XftFont *
|
||||
nsFontXft::GetXftFont(void)
|
||||
{
|
||||
- if (!mXftFont) {
|
||||
+ if (!mXftFont && !mNotXft) {
|
||||
FcPattern *pat = FcFontRenderPrepare(0, mPattern, mFontName);
|
||||
if (!pat)
|
||||
return nsnull;
|
||||
@@ -1967,8 +1969,10 @@
|
||||
FcPatternDel(pat, FC_SPACING);
|
||||
|
||||
mXftFont = XftFontOpenPattern(GDK_DISPLAY(), pat);
|
||||
- if (!mXftFont)
|
||||
+ if (!mXftFont) {
|
||||
FcPatternDestroy(pat);
|
||||
+ mNotXft = 1;
|
||||
+ }
|
||||
}
|
||||
|
||||
return mXftFont;
|
57
www/flock/files/patch-gfx_src_gtk_nsFontMetricsXft.cpp
Normal file
57
www/flock/files/patch-gfx_src_gtk_nsFontMetricsXft.cpp
Normal file
@ -0,0 +1,57 @@
|
||||
--- gfx/src/gtk/nsFontMetricsXft.cpp.save Thu Aug 7 12:14:49 2003
|
||||
+++ gfx/src/gtk/nsFontMetricsXft.cpp Thu Aug 7 12:33:45 2003
|
||||
@@ -106,6 +106,7 @@
|
||||
FcPattern *mPattern;
|
||||
FcPattern *mFontName;
|
||||
FcCharSet *mCharset;
|
||||
+ int mNotXft;
|
||||
};
|
||||
|
||||
class nsFontXftInfo;
|
||||
@@ -1051,7 +1052,7 @@
|
||||
// font in our loaded list that supports the character
|
||||
for (PRInt32 i = 0, 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;
|
||||
}
|
||||
|
||||
@@ -1492,7 +1493,7 @@
|
||||
// this character.
|
||||
for (PRInt32 j = 0, end = mLoadedFonts.Count(); j < end; ++j) {
|
||||
font = (nsFontXft *)mLoadedFonts.ElementAt(j);
|
||||
- if (font->HasChar(c)) {
|
||||
+ if (font->HasChar(c) && font->GetXftFont()) {
|
||||
currFont = font;
|
||||
goto FoundFont; // for speed -- avoid "if" statement
|
||||
}
|
||||
@@ -1922,6 +1923,7 @@
|
||||
FcPatternReference(mFontName);
|
||||
|
||||
mXftFont = nsnull;
|
||||
+ mNotXft = 0;
|
||||
|
||||
// set up our charset
|
||||
mCharset = nsnull;
|
||||
@@ -1948,7 +1950,7 @@
|
||||
XftFont *
|
||||
nsFontXft::GetXftFont(void)
|
||||
{
|
||||
- if (!mXftFont) {
|
||||
+ if (!mXftFont && !mNotXft) {
|
||||
FcPattern *pat = FcFontRenderPrepare(0, mPattern, mFontName);
|
||||
if (!pat)
|
||||
return nsnull;
|
||||
@@ -1967,8 +1969,10 @@
|
||||
FcPatternDel(pat, FC_SPACING);
|
||||
|
||||
mXftFont = XftFontOpenPattern(GDK_DISPLAY(), pat);
|
||||
- if (!mXftFont)
|
||||
+ if (!mXftFont) {
|
||||
FcPatternDestroy(pat);
|
||||
+ mNotXft = 1;
|
||||
+ }
|
||||
}
|
||||
|
||||
return mXftFont;
|
@ -0,0 +1,57 @@
|
||||
--- gfx/src/gtk/nsFontMetricsXft.cpp.save Thu Aug 7 12:14:49 2003
|
||||
+++ gfx/src/gtk/nsFontMetricsXft.cpp Thu Aug 7 12:33:45 2003
|
||||
@@ -106,6 +106,7 @@
|
||||
FcPattern *mPattern;
|
||||
FcPattern *mFontName;
|
||||
FcCharSet *mCharset;
|
||||
+ int mNotXft;
|
||||
};
|
||||
|
||||
class nsFontXftInfo;
|
||||
@@ -1051,7 +1052,7 @@
|
||||
// font in our loaded list that supports the character
|
||||
for (PRInt32 i = 0, 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;
|
||||
}
|
||||
|
||||
@@ -1492,7 +1493,7 @@
|
||||
// this character.
|
||||
for (PRInt32 j = 0, end = mLoadedFonts.Count(); j < end; ++j) {
|
||||
font = (nsFontXft *)mLoadedFonts.ElementAt(j);
|
||||
- if (font->HasChar(c)) {
|
||||
+ if (font->HasChar(c) && font->GetXftFont()) {
|
||||
currFont = font;
|
||||
goto FoundFont; // for speed -- avoid "if" statement
|
||||
}
|
||||
@@ -1922,6 +1923,7 @@
|
||||
FcPatternReference(mFontName);
|
||||
|
||||
mXftFont = nsnull;
|
||||
+ mNotXft = 0;
|
||||
|
||||
// set up our charset
|
||||
mCharset = nsnull;
|
||||
@@ -1948,7 +1950,7 @@
|
||||
XftFont *
|
||||
nsFontXft::GetXftFont(void)
|
||||
{
|
||||
- if (!mXftFont) {
|
||||
+ if (!mXftFont && !mNotXft) {
|
||||
FcPattern *pat = FcFontRenderPrepare(0, mPattern, mFontName);
|
||||
if (!pat)
|
||||
return nsnull;
|
||||
@@ -1967,8 +1969,10 @@
|
||||
FcPatternDel(pat, FC_SPACING);
|
||||
|
||||
mXftFont = XftFontOpenPattern(GDK_DISPLAY(), pat);
|
||||
- if (!mXftFont)
|
||||
+ if (!mXftFont) {
|
||||
FcPatternDestroy(pat);
|
||||
+ mNotXft = 1;
|
||||
+ }
|
||||
}
|
||||
|
||||
return mXftFont;
|
Loading…
x
Reference in New Issue
Block a user