diff options
| author | Kenichi Handa | 1998-04-15 07:12:49 +0000 |
|---|---|---|
| committer | Kenichi Handa | 1998-04-15 07:12:49 +0000 |
| commit | a65826769eb20d2f901b51a80552f3bf4eb376db (patch) | |
| tree | 5f28fbc9bc78612367479f9bd82c863fa4fea123 /src | |
| parent | d7fcdd913e6f8eb840ceb332d4b9a97fcad879f2 (diff) | |
| download | emacs-a65826769eb20d2f901b51a80552f3bf4eb376db.tar.gz emacs-a65826769eb20d2f901b51a80552f3bf4eb376db.zip | |
(x_find_ccl_program): New function.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xterm.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/xterm.c b/src/xterm.c index 4afe386d39a..1d46d725fe9 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -6782,6 +6782,48 @@ x_query_font (f, fontname) | |||
| 6782 | return NULL; | 6782 | return NULL; |
| 6783 | } | 6783 | } |
| 6784 | 6784 | ||
| 6785 | /* Find a CCL program for a font specified by FONTP, and set the memer | ||
| 6786 | `encoder' of the structure. */ | ||
| 6787 | |||
| 6788 | void | ||
| 6789 | x_find_ccl_program (fontp) | ||
| 6790 | struct font_info *fontp; | ||
| 6791 | { | ||
| 6792 | extern Lisp_Object Vfont_ccl_encoder_alist, Vccl_program_table; | ||
| 6793 | extern Lisp_Object Qccl_program_idx; | ||
| 6794 | extern Lisp_Object resolve_symbol_ccl_program (); | ||
| 6795 | Lisp_Object list, elt, ccl_prog, ccl_id; | ||
| 6796 | |||
| 6797 | for (list = Vfont_ccl_encoder_alist; CONSP (list); list = XCONS (list)->cdr) | ||
| 6798 | { | ||
| 6799 | elt = XCONS (list)->car; | ||
| 6800 | if (CONSP (elt) | ||
| 6801 | && STRINGP (XCONS (elt)->car) | ||
| 6802 | && (fast_c_string_match_ignore_case (XCONS (elt)->car, fontp->name) | ||
| 6803 | >= 0)) | ||
| 6804 | { | ||
| 6805 | if (SYMBOLP (XCONS (elt)->cdr) && | ||
| 6806 | (!NILP (ccl_id = Fget (XCONS (elt)->cdr, Qccl_program_idx)))) | ||
| 6807 | { | ||
| 6808 | ccl_prog = XVECTOR (Vccl_program_table)->contents[XUINT (ccl_id)]; | ||
| 6809 | if (!CONSP (ccl_prog)) continue; | ||
| 6810 | ccl_prog = XCONS (ccl_prog)->cdr; | ||
| 6811 | } | ||
| 6812 | else | ||
| 6813 | { | ||
| 6814 | ccl_prog = XCONS (elt)->cdr; | ||
| 6815 | if (!VECTORP (ccl_prog)) continue; | ||
| 6816 | } | ||
| 6817 | |||
| 6818 | fontp->font_encoder | ||
| 6819 | = (struct ccl_program *) xmalloc (sizeof (struct ccl_program)); | ||
| 6820 | setup_ccl_program (fontp->font_encoder, | ||
| 6821 | resolve_symbol_ccl_program (ccl_prog)); | ||
| 6822 | break; | ||
| 6823 | } | ||
| 6824 | } | ||
| 6825 | } | ||
| 6826 | |||
| 6785 | 6827 | ||
| 6786 | /* Initialization. */ | 6828 | /* Initialization. */ |
| 6787 | 6829 | ||