diff options
| author | Kenichi Handa | 2006-08-01 01:19:31 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2006-08-01 01:19:31 +0000 |
| commit | 3a91626ca069cd509325dddea469e10714768972 (patch) | |
| tree | 0986c3fb5908d3858775fe1b5576930716dcb712 /src | |
| parent | 10aca0f7ef4b2adde76123608f1dcf956a36b62b (diff) | |
| download | emacs-3a91626ca069cd509325dddea469e10714768972.tar.gz emacs-3a91626ca069cd509325dddea469e10714768972.zip | |
(ftxfont_match): New function.
(syms_of_ftxfont): Set ftxfont_driver.match to ftxfont_match.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ftxfont.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/ftxfont.c b/src/ftxfont.c index 680c439e149..831b75c4d4b 100644 --- a/src/ftxfont.c +++ b/src/ftxfont.c | |||
| @@ -196,6 +196,7 @@ ftxfont_default_fid (f) | |||
| 196 | 196 | ||
| 197 | /* Prototypes for font-driver methods. */ | 197 | /* Prototypes for font-driver methods. */ |
| 198 | static Lisp_Object ftxfont_list P_ ((Lisp_Object, Lisp_Object)); | 198 | static Lisp_Object ftxfont_list P_ ((Lisp_Object, Lisp_Object)); |
| 199 | static Lisp_Object ftxfont_match P_ ((Lisp_Object, Lisp_Object)); | ||
| 199 | static struct font *ftxfont_open P_ ((FRAME_PTR, Lisp_Object, int)); | 200 | static struct font *ftxfont_open P_ ((FRAME_PTR, Lisp_Object, int)); |
| 200 | static void ftxfont_close P_ ((FRAME_PTR, struct font *)); | 201 | static void ftxfont_close P_ ((FRAME_PTR, struct font *)); |
| 201 | static int ftxfont_prepare_face (FRAME_PTR, struct face *); | 202 | static int ftxfont_prepare_face (FRAME_PTR, struct face *); |
| @@ -222,6 +223,18 @@ ftxfont_list (frame, spec) | |||
| 222 | return val; | 223 | return val; |
| 223 | } | 224 | } |
| 224 | 225 | ||
| 226 | static Lisp_Object | ||
| 227 | ftxfont_match (frame, spec) | ||
| 228 | Lisp_Object frame; | ||
| 229 | Lisp_Object spec; | ||
| 230 | { | ||
| 231 | Lisp_Object entity = ftfont_driver.match (frame, spec); | ||
| 232 | |||
| 233 | if (VECTORP (entity)) | ||
| 234 | ASET (entity, FONT_TYPE_INDEX, Qftx); | ||
| 235 | return entity; | ||
| 236 | } | ||
| 237 | |||
| 225 | static struct font * | 238 | static struct font * |
| 226 | ftxfont_open (f, entity, pixel_size) | 239 | ftxfont_open (f, entity, pixel_size) |
| 227 | FRAME_PTR f; | 240 | FRAME_PTR f; |
| @@ -289,9 +302,6 @@ ftxfont_prepare_face (f, face) | |||
| 289 | { | 302 | { |
| 290 | struct font *font = (struct font *) face->font_info; | 303 | struct font *font = (struct font *) face->font_info; |
| 291 | GC gcs[6]; | 304 | GC gcs[6]; |
| 292 | XColor colors[3]; | ||
| 293 | XGCValues xgcv; | ||
| 294 | unsigned long mask = GCForeground | GCBackground | GCGraphicsExposures; | ||
| 295 | int i; | 305 | int i; |
| 296 | 306 | ||
| 297 | face->extra = NULL; | 307 | face->extra = NULL; |
| @@ -413,6 +423,7 @@ syms_of_ftxfont () | |||
| 413 | ftxfont_driver = ftfont_driver; | 423 | ftxfont_driver = ftfont_driver; |
| 414 | ftxfont_driver.type = Qftx; | 424 | ftxfont_driver.type = Qftx; |
| 415 | ftxfont_driver.list = ftxfont_list; | 425 | ftxfont_driver.list = ftxfont_list; |
| 426 | ftxfont_driver.match = ftxfont_match; | ||
| 416 | ftxfont_driver.open = ftxfont_open; | 427 | ftxfont_driver.open = ftxfont_open; |
| 417 | ftxfont_driver.close = ftxfont_close; | 428 | ftxfont_driver.close = ftxfont_close; |
| 418 | ftxfont_driver.prepare_face = ftxfont_prepare_face; | 429 | ftxfont_driver.prepare_face = ftxfont_prepare_face; |