Mon Jan 5 23:50:28 2009 Michael Jennings (mej)

Remove fontset fallbacks.  I think this might help speed up the load
time slowness some people are seeing.  Let's find out.
----------------------------------------------------------------------


SVN revision: 38477
This commit is contained in:
Michael Jennings 2009-01-06 07:51:15 +00:00
parent 9a7cd3adac
commit 0261bd001b
2 changed files with 14 additions and 8 deletions

View File

@ -5586,3 +5586,8 @@ Tue Dec 16 22:03:54 2008 Michael Jennings (mej)
Fix compile errors related to the removal of unnecessary typecasting
macros.
----------------------------------------------------------------------
Mon Jan 5 23:50:28 2009 Michael Jennings (mej)
Remove fontset fallbacks. I think this might help speed up the load
time slowness some people are seeing. Let's find out.
----------------------------------------------------------------------

View File

@ -1853,33 +1853,34 @@ create_fontset(const char *font1, const char *font2)
XFontSet fontset = 0;
char *fontname, **ml, *ds;
int mc;
const char fs_base[] = ",-misc-fixed-*-r-*-*-*-120-*-*-*-*-*-*,*";
/*const char fs_base[] = ",-misc-fixed-*-r-*-*-*-120-*-*-*-*-*-*,*";*/
ASSERT_RVAL(font1 != NULL, (XFontSet) 0);
if (font2) {
fontname = MALLOC(strlen(font1) + strlen(font2) + sizeof(fs_base) + 2);
fontname = MALLOC(strlen(font1) + strlen(font2) /*+ sizeof(fs_base)*/ + 2);
if (fontname) {
strcpy(fontname, font1);
strcat(fontname, ",");
strcat(fontname, font2);
strcat(fontname, fs_base);
/*strcat(fontname, fs_base);*/
}
} else {
fontname = MALLOC(strlen(font1) + sizeof(fs_base) + 1);
fontname = MALLOC(strlen(font1) /*+ sizeof(fs_base)*/ + 1);
if (fontname) {
strcpy(fontname, font1);
strcat(fontname, fs_base);
/*strcat(fontname, fs_base);*/
}
}
if (fontname) {
setlocale(LC_ALL, "");
fontset = XCreateFontSet(Xdisplay, fontname, &ml, &mc, &ds);
D_FONT(("Created fontset from %s, %d missing charsets, default string \"%s\".\n", fontname, mc, NONULL(ds)));
fontset = XCreateFontSet(Xdisplay, fontname, &ml, &mc, NULL);
D_FONT(("Created fontset from %s, %d missing charsets (\"%s\").\n", fontname, mc,
((mc > 0) ? (ml[0]) : ("N/A"))));
FREE(fontname);
if (mc) {
XFreeStringList(ml);
fontset = 0;
/*fontset = 0;*/
}
}
return fontset;