]> code.delx.au - gnu-emacs/blobdiff - src/fontset.h
(Fcoordinates_in_window_p): Convert Fcons arguments to Lisp_Integer.
[gnu-emacs] / src / fontset.h
index 81018a58d096989046579ae371bd98c2ea04c6ca..2df41aa0b721852c0933e5e7d880ce43985e18b5 100644 (file)
@@ -1,7 +1,6 @@
 /* Header for fontset handler.
-   Ver.1.0
-   Copyright (C) 1995 Free Software Foundation, Inc.
-   Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
+   Copyright (C) 1995, 1997 Electrotechnical Laboratory, JAPAN.
+   Licensed to the Free Software Foundation.
 
 This file is part of GNU Emacs.
 
@@ -213,4 +212,22 @@ extern Lisp_Object Valternative_fontname_alist;
 extern Lisp_Object Vhighlight_wrong_size_font;
 extern Lisp_Object Vclip_large_size_font;
 
+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))
+
 #endif /* _FONTSET_H */