mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-28 00:01:33 -08:00
(Fx_create_frame): Don't cal fs_register_fontset.
(x_create_tip_frame): Likewise. (Fx_close_connection): Free full_name of font_info.
This commit is contained in:
parent
980806b6cf
commit
6ecb43cedf
1 changed files with 34 additions and 25 deletions
59
src/xfns.c
59
src/xfns.c
|
|
@ -3093,22 +3093,39 @@ create_frame_xic (f)
|
|||
base_fontname = "-*-*-*-r-normal--14-*-*-*-*-*-*-*";
|
||||
else
|
||||
{
|
||||
struct fontset_info *fontsetp;
|
||||
int len = 0;
|
||||
/* Determine the base fontname from the ASCII font name of
|
||||
FONTSET. */
|
||||
char *ascii_font = (char *) XSTRING (fontset_ascii (fontset))->data;
|
||||
char *p = ascii_font;
|
||||
int i;
|
||||
|
||||
fontsetp = FRAME_FONTSET_DATA (f)->fontset_table[fontset];
|
||||
for (i = 0; i <= MAX_CHARSET; i++)
|
||||
if (fontsetp->fontname[i])
|
||||
len += strlen (fontsetp->fontname[i]) + 1;
|
||||
base_fontname = alloca (len);
|
||||
strcpy (base_fontname, fontsetp->fontname[CHARSET_ASCII]);
|
||||
for (i = MIN_CHARSET_OFFICIAL_DIMENSION1; i <= MAX_CHARSET; i++)
|
||||
if (fontsetp->fontname[i])
|
||||
{
|
||||
strcat (base_fontname, ",");
|
||||
strcat (base_fontname, fontsetp->fontname[i]);
|
||||
}
|
||||
|
||||
for (i = 0; *p; p++)
|
||||
if (*p == '-') i++;
|
||||
if (i != 14)
|
||||
/* As the font name doesn't conform to XLFD, we can't
|
||||
modify it to get a suitable base fontname for the
|
||||
frame. */
|
||||
base_fontname = "-*-*-*-r-normal--14-*-*-*-*-*-*-*";
|
||||
else
|
||||
{
|
||||
int len = strlen (ascii_font) + 1;
|
||||
char *p1;
|
||||
|
||||
for (i = 0, p = ascii_font; i < 8; p++)
|
||||
{
|
||||
if (*p == '-')
|
||||
{
|
||||
i++;
|
||||
if (i == 3)
|
||||
p1 = p + 1;
|
||||
}
|
||||
}
|
||||
base_fontname = (char *) alloca (len);
|
||||
bzero (base_fontname, len);
|
||||
strcpy (base_fontname, "-*-*-");
|
||||
bcopy (p1, base_fontname + 5, p - p1);
|
||||
strcat (base_fontname, "*-*-*-*-*-*-*");
|
||||
}
|
||||
}
|
||||
xfs = xic_create_xfontset (f, base_fontname);
|
||||
|
||||
|
|
@ -3880,10 +3897,6 @@ This function is an internal primitive--use `make-frame' instead.")
|
|||
specbind (Qx_resource_name, name);
|
||||
}
|
||||
|
||||
/* Create fontsets from `global_fontset_alist' before handling fonts. */
|
||||
for (tem = Vglobal_fontset_alist; CONSP (tem); tem = XCDR (tem))
|
||||
fs_register_fontset (f, XCAR (tem));
|
||||
|
||||
/* Extract the window parameters from the supplied values
|
||||
that are needed to determine window geometry. */
|
||||
{
|
||||
|
|
@ -4739,9 +4752,9 @@ If DISPLAY is nil, that stands for the selected frame's display.")
|
|||
for (i = 0; i < dpyinfo->n_fonts; i++)
|
||||
if (dpyinfo->font_table[i].name)
|
||||
{
|
||||
if (dpyinfo->font_table[i].name != dpyinfo->font_table[i].full_name)
|
||||
xfree (dpyinfo->font_table[i].full_name);
|
||||
xfree (dpyinfo->font_table[i].name);
|
||||
/* Don't free the full_name string;
|
||||
it is always shared with something else. */
|
||||
XFreeFont (dpyinfo->display, dpyinfo->font_table[i].font);
|
||||
}
|
||||
|
||||
|
|
@ -9435,10 +9448,6 @@ x_create_tip_frame (dpyinfo, parms)
|
|||
specbind (Qx_resource_name, name);
|
||||
}
|
||||
|
||||
/* Create fontsets from `global_fontset_alist' before handling fonts. */
|
||||
for (tem = Vglobal_fontset_alist; CONSP (tem); tem = XCDR (tem))
|
||||
fs_register_fontset (f, XCAR (tem));
|
||||
|
||||
/* Extract the window parameters from the supplied values
|
||||
that are needed to determine window geometry. */
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue