mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-09 13:10:57 -08:00
(font_find_for_lface): If registry is NULL, try iso8859-1 and ascii-0.
This commit is contained in:
parent
a2e860b3db
commit
d0a477766d
2 changed files with 26 additions and 14 deletions
|
|
@ -39,7 +39,7 @@
|
|||
(font_update_lface): Don't parse "foundry-family" form here.
|
||||
Handle FONT_FOUNDRY_INDEX.
|
||||
(font_find_for_lface): Likewise. Handle alternate families here.
|
||||
If registry is NULL, try iso8859-1 and ascii-0.
|
||||
If registry is nil, try iso8859-1 and ascii-0.
|
||||
(font_open_for_lface): Pay attention to size in ENTITY.
|
||||
(font_open_by_name): Simplify by calling font_load_for_lface.
|
||||
(free_font_driver_list): Delete it.
|
||||
|
|
|
|||
38
src/font.c
38
src/font.c
|
|
@ -2896,9 +2896,19 @@ font_find_for_lface (f, attrs, spec, c)
|
|||
{
|
||||
Lisp_Object work;
|
||||
Lisp_Object frame, entities, val, props[FONT_REGISTRY_INDEX + 1] ;
|
||||
Lisp_Object size, foundry[3], *family;
|
||||
Lisp_Object size, foundry[3], *family, registry[3];
|
||||
int pixel_size;
|
||||
int i, j, result;
|
||||
int i, j, k, result;
|
||||
|
||||
registry[0] = AREF (spec, FONT_REGISTRY_INDEX);
|
||||
if (NILP (registry[0]))
|
||||
{
|
||||
registry[0] = Qiso8859_1;
|
||||
registry[1] = Qascii_0;
|
||||
registry[2] = null_vector;
|
||||
}
|
||||
else
|
||||
registry[1] = null_vector;
|
||||
|
||||
if (c >= 0 && ! NILP (AREF (spec, FONT_REGISTRY_INDEX)))
|
||||
{
|
||||
|
|
@ -2978,21 +2988,23 @@ font_find_for_lface (f, attrs, spec, c)
|
|||
}
|
||||
}
|
||||
|
||||
for (j = 0; SYMBOLP (family[j]); j++)
|
||||
for (i = 0; SYMBOLP (family[i]); i++)
|
||||
{
|
||||
ASET (work, FONT_FAMILY_INDEX, family[j]);
|
||||
for (i = 0; SYMBOLP (foundry[i]); i++)
|
||||
ASET (work, FONT_FAMILY_INDEX, family[i]);
|
||||
for (j = 0; SYMBOLP (foundry[j]); j++)
|
||||
{
|
||||
ASET (work, FONT_FOUNDRY_INDEX, foundry[i]);
|
||||
entities = font_list_entities (frame, work);
|
||||
if (ASIZE (entities) > 0)
|
||||
break;
|
||||
ASET (work, FONT_FOUNDRY_INDEX, foundry[j]);
|
||||
for (k = 0; SYMBOLP (registry[k]); k++)
|
||||
{
|
||||
ASET (work, FONT_REGISTRY_INDEX, registry[j]);
|
||||
entities = font_list_entities (frame, work);
|
||||
if (ASIZE (entities) > 0)
|
||||
goto found;
|
||||
}
|
||||
}
|
||||
if (ASIZE (entities) > 0)
|
||||
break;
|
||||
}
|
||||
if (ASIZE (entities) == 0)
|
||||
return Qnil;
|
||||
return Qnil;
|
||||
found:
|
||||
if (ASIZE (entities) == 1)
|
||||
{
|
||||
if (c < 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue