diff options
author | Kenichi Handa <handa@m17n.org> | 1997-06-21 00:44:42 +0000 |
---|---|---|
committer | Kenichi Handa <handa@m17n.org> | 1997-06-21 00:44:42 +0000 |
commit | d2f807f47aff2c11b8c5fad2b142fe54e13cf8aa (patch) | |
tree | 794ff6059d26f10c071e49b178a0fc229f1c7341 /src/fontset.h | |
parent | 2d81f033f0a5c509d8658aabffd8f5fcc785f024 (diff) | |
download | emacs-d2f807f47aff2c11b8c5fad2b142fe54e13cf8aa.tar.gz |
(font_idx_temp): Extern it.
(FS_LOAD_FONT): New macro.
Diffstat (limited to 'src/fontset.h')
-rw-r--r-- | src/fontset.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/fontset.h b/src/fontset.h index 7e999135d74..00aedb77c66 100644 --- a/src/fontset.h +++ b/src/fontset.h @@ -213,3 +213,21 @@ extern Lisp_Object Vhighlight_wrong_size_font; extern Lisp_Object Vclip_large_size_font; #endif /* _FONTSET_H */ +extern int font_idx_temp; + +/* Load a font named FONTNAME for displaying CHARSET on frame F. + All fonts for frame F is stored in a table pointed by FONT_TABLE. + Return a pointer to the struct font_info of the loaded font. + If loading fails, return 0; + If FONTNAME is NULL, the name is taken from the information of FONTSET. + If FONTSET is given, try to load a font whose size matches that of + FONTSET, and, the font index is stored in the table for FONTSET. */ + +#define FS_LOAD_FONT(f, font_table, charset, fontname, fontset) \ + (fontset >= 0 && fontset < FRAME_FONTSET_DATA (f)->n_fontsets \ + && (font_idx_temp = (FRAME_FONTSET_DATA (f) \ + ->fontset_table[fontset]->font_indexes[charset]), \ + font_idx_temp >= 0) \ + ? font_table + font_idx_temp \ + : fs_load_font (f, font_table, charset, fontname, fontset)) + |