xlib complains a lot about fonts with '*' in the XLFD string. Bug

136743, patch by Roland.Mainz@informatik.med.uni-giessen.de (Roland
Mainz), r=bstell, sr=attinasi


git-svn-id: svn://10.0.0.236/trunk@120271 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu
2002-04-30 01:29:14 +00:00
parent 4eea0e428a
commit cbd4d50912
2 changed files with 10 additions and 2 deletions

View File

@@ -3744,7 +3744,11 @@ GetFontNames(const char* aPattern, PRBool aAnyFoundry, nsFontNodeArray* aNodes)
char name[256]; /* X11 font names are never larger than 255 chars */
strcpy(name, list[i]);
if ((!name) || (name[0] != '-')) {
/* Check if we can handle the font name ('*' and '?' are only valid in
* input patterns passed as argument to |XListFont()|&co. but _not_ in
* font names returned by these functions (see bug 136743 ("xlib complains
* a lot about fonts with '*' in the XLFD string"))) */
if ((!name) || (name[0] != '-') || (PL_strpbrk(name, "*?") != nsnull)) {
continue;
}

View File

@@ -4045,7 +4045,11 @@ GetFontNames(const char* aPattern, PRBool aAnyFoundry, nsFontNodeArrayXlib* aNod
for (int i = 0; i < count; i++) {
char name[256]; /* X11 font names are never larger than 255 chars */
if ((!list[i]) || (list[i][0] != '-')) {
/* Check if we can handle the font name ('*' and '?' are only valid in
* input patterns passed as argument to |XListFont()|&co. but _not_ in
* font names returned by these functions (see bug 136743 ("xlib complains
* a lot about fonts with '*' in the XLFD string"))) */
if ((!list[i]) || (list[i][0] != '-') || (PL_strpbrk(list[i], "*?") != nsnull)) {
continue;
}