269 |
#define FONTSET_NAME(fontset) XCHAR_TABLE (fontset)->extras[1] |
#define FONTSET_NAME(fontset) XCHAR_TABLE (fontset)->extras[1] |
270 |
#define FONTSET_ASCII(fontset) XCHAR_TABLE (fontset)->extras[4] |
#define FONTSET_ASCII(fontset) XCHAR_TABLE (fontset)->extras[4] |
271 |
|
|
|
#define BASE_FONTSET_P(fontset) STRINGP (FONTSET_NAME (fontset)) |
|
|
|
|
272 |
/* Macros to access special values of (realized) FONTSET. */ |
/* Macros to access special values of (realized) FONTSET. */ |
273 |
#define FONTSET_BASE(fontset) XCHAR_TABLE (fontset)->extras[2] |
#define FONTSET_BASE(fontset) XCHAR_TABLE (fontset)->extras[2] |
274 |
#define FONTSET_FRAME(fontset) XCHAR_TABLE (fontset)->extras[3] |
#define FONTSET_FRAME(fontset) XCHAR_TABLE (fontset)->extras[3] |
276 |
#define FONTSET_REPERTORY(fontset) XCHAR_TABLE (fontset)->extras[6] |
#define FONTSET_REPERTORY(fontset) XCHAR_TABLE (fontset)->extras[6] |
277 |
#define FONTSET_FALLBACK(fontset) XCHAR_TABLE (fontset)->extras[7] |
#define FONTSET_FALLBACK(fontset) XCHAR_TABLE (fontset)->extras[7] |
278 |
|
|
279 |
|
#define BASE_FONTSET_P(fontset) (NILP (FONTSET_BASE (fontset))) |
280 |
|
|
281 |
|
|
282 |
/* Return the element of FONTSET for the character C. If FONTSET is a |
/* Return the element of FONTSET for the character C. If FONTSET is a |
283 |
base fontset other then the default fontset and FONTSET doesn't |
base fontset other then the default fontset and FONTSET doesn't |
372 |
to = XINT (XCDR (range)); |
to = XINT (XCDR (range)); |
373 |
do { |
do { |
374 |
elt1 = char_table_ref_and_range (fontset, from, &from1, &to1); |
elt1 = char_table_ref_and_range (fontset, from, &from1, &to1); |
375 |
|
if (to < to1) |
376 |
|
to1 = to; |
377 |
if (NILP (elt1)) |
if (NILP (elt1)) |
378 |
elt1 = Fmake_vector (make_number (1), elt); |
elt1 = Fmake_vector (make_number (1), elt); |
379 |
else |
else |
388 |
ASET (new, i0, AREF (elt1, i)); |
ASET (new, i0, AREF (elt1, i)); |
389 |
elt1 = new; |
elt1 = new; |
390 |
} |
} |
391 |
char_table_set_range (fontset, from, to1, elt1); |
char_table_set_range (fontset, from, to1, elt1); |
392 |
from = to1 + 1; |
from = to1 + 1; |
393 |
} while (from < to); |
} while (from < to); |
394 |
return Qnil; |
return Qnil; |
622 |
if (! EQ (base_fontset, Vdefault_fontset)) |
if (! EQ (base_fontset, Vdefault_fontset)) |
623 |
return fontset_face (FONTSET_FALLBACK (fontset), c, face); |
return fontset_face (FONTSET_FALLBACK (fontset), c, face); |
624 |
|
|
|
font_not_found: |
|
625 |
/* We have tried all the fonts for C, but none of them can be opened |
/* We have tried all the fonts for C, but none of them can be opened |
626 |
nor can display C. */ |
nor can display C. */ |
627 |
if (NILP (FONTSET_NOFONT_FACE (fontset))) |
if (NILP (FONTSET_NOFONT_FACE (fontset))) |
1609 |
{ |
{ |
1610 |
this_fontset = Vdefault_fontset; |
this_fontset = Vdefault_fontset; |
1611 |
this_table = XCHAR_TABLE (table)->extras[0]; |
this_table = XCHAR_TABLE (table)->extras[0]; |
1612 |
|
#if 0 |
1613 |
for (i = 0; i < n_realized; i++) |
for (i = 0; i < n_realized; i++) |
1614 |
realized[i] = FONTSET_FALLBACK (realized[i]); |
realized[i] = FONTSET_FALLBACK (realized[i]); |
1615 |
|
#endif |
1616 |
} |
} |
1617 |
for (c = 0; c <= MAX_5_BYTE_CHAR; ) |
for (c = 0; c <= MAX_5_BYTE_CHAR; ) |
1618 |
{ |
{ |
1817 |
defsubr (&Sfontset_font); |
defsubr (&Sfontset_font); |
1818 |
defsubr (&Sfontset_list); |
defsubr (&Sfontset_list); |
1819 |
} |
} |
1820 |
|
|
1821 |
|
Lisp_Object |
1822 |
|
dump_fontset (fontset) |
1823 |
|
Lisp_Object fontset; |
1824 |
|
{ |
1825 |
|
Lisp_Object val; |
1826 |
|
|
1827 |
|
if (NILP (FONTSET_FALLBACK (fontset))) |
1828 |
|
val = Fcons (Fcons (intern ("fallback-id"), Qnil), Qnil); |
1829 |
|
else |
1830 |
|
val = Fcons (Fcons (intern ("fallback-id"), |
1831 |
|
FONTSET_ID (FONTSET_FALLBACK (fontset))), |
1832 |
|
Qnil); |
1833 |
|
if (NILP (FONTSET_BASE (fontset))) |
1834 |
|
val = Fcons (Fcons (intern ("base"), Qnil), val); |
1835 |
|
else |
1836 |
|
val = Fcons (Fcons (intern ("base"), |
1837 |
|
FONTSET_NAME (FONTSET_BASE (fontset))), |
1838 |
|
val); |
1839 |
|
val = Fcons (Fcons (intern ("name"), FONTSET_NAME (fontset)), val); |
1840 |
|
val = Fcons (Fcons (intern ("id"), FONTSET_ID (fontset)), val); |
1841 |
|
return val; |
1842 |
|
} |