mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-03-12 09:51:05 -07:00
(x_find_ccl_program): New function.
This commit is contained in:
parent
d7fcdd913e
commit
a65826769e
1 changed files with 42 additions and 0 deletions
42
src/xterm.c
42
src/xterm.c
|
|
@ -6782,6 +6782,48 @@ x_query_font (f, fontname)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
/* Find a CCL program for a font specified by FONTP, and set the memer
|
||||
`encoder' of the structure. */
|
||||
|
||||
void
|
||||
x_find_ccl_program (fontp)
|
||||
struct font_info *fontp;
|
||||
{
|
||||
extern Lisp_Object Vfont_ccl_encoder_alist, Vccl_program_table;
|
||||
extern Lisp_Object Qccl_program_idx;
|
||||
extern Lisp_Object resolve_symbol_ccl_program ();
|
||||
Lisp_Object list, elt, ccl_prog, ccl_id;
|
||||
|
||||
for (list = Vfont_ccl_encoder_alist; CONSP (list); list = XCONS (list)->cdr)
|
||||
{
|
||||
elt = XCONS (list)->car;
|
||||
if (CONSP (elt)
|
||||
&& STRINGP (XCONS (elt)->car)
|
||||
&& (fast_c_string_match_ignore_case (XCONS (elt)->car, fontp->name)
|
||||
>= 0))
|
||||
{
|
||||
if (SYMBOLP (XCONS (elt)->cdr) &&
|
||||
(!NILP (ccl_id = Fget (XCONS (elt)->cdr, Qccl_program_idx))))
|
||||
{
|
||||
ccl_prog = XVECTOR (Vccl_program_table)->contents[XUINT (ccl_id)];
|
||||
if (!CONSP (ccl_prog)) continue;
|
||||
ccl_prog = XCONS (ccl_prog)->cdr;
|
||||
}
|
||||
else
|
||||
{
|
||||
ccl_prog = XCONS (elt)->cdr;
|
||||
if (!VECTORP (ccl_prog)) continue;
|
||||
}
|
||||
|
||||
fontp->font_encoder
|
||||
= (struct ccl_program *) xmalloc (sizeof (struct ccl_program));
|
||||
setup_ccl_program (fontp->font_encoder,
|
||||
resolve_symbol_ccl_program (ccl_prog));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Initialization. */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue