annotate src/font.h @ 94376:6cf9d00cc0e1

*** empty log message ***
author Juanma Barranquero <lekktu@gmail.com>
date Sat, 26 Apr 2008 13:06:21 +0000
parents 0dac12128e1c
children 3b446dc6d76d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
1 /* font.h -- Interface definition for font handling.
91552
1ab24b8a7398 Update copyright years.
Glenn Morris <rgm@gnu.org>
parents: 91549
diff changeset
2 Copyright (C) 2006, 2007, 2008 Free Software Foundation, Inc.
1ab24b8a7398 Update copyright years.
Glenn Morris <rgm@gnu.org>
parents: 91549
diff changeset
3 Copyright (C) 2006, 2007, 2008
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
4 National Institute of Advanced Industrial Science and Technology (AIST)
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
5 Registration Number H13PRO009
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
6
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
7 This file is part of GNU Emacs.
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
8
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
9 GNU Emacs is free software; you can redistribute it and/or modify
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
10 it under the terms of the GNU General Public License as published by
91549
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
11 the Free Software Foundation; either version 3, or (at your option)
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
12 any later version.
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
13
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
14 GNU Emacs is distributed in the hope that it will be useful,
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
17 GNU General Public License for more details.
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
18
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
19 You should have received a copy of the GNU General Public License
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
20 along with GNU Emacs; see the file COPYING. If not, write to
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
21 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
22 Boston, MA 02110-1301, USA. */
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
23
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
24 #ifndef EMACS_FONT_H
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
25 #define EMACS_FONT_H
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
26
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
27 #include "ccl.h"
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
28
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
29 /* We have three types of Lisp objects related to font.
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
30
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
31 FONT-SPEC
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
32
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
33 Vector (length FONT_SPEC_MAX) of font properties. Some
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
34 properties can be left unspecified (i.e. nil). Emacs asks
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
35 font-drivers to find a font by FONT-SPEC. A fontset entry
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
36 specifies requisite properties whereas a face specifies just
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
37 preferable properties. This object is fully modifiable by
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
38 Lisp.
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
39
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
40 FONT-ENTITY
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
41
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
42 Vector (length FONT_ENTITY_MAX) of fully specified font
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
43 properties that a font-driver returns upon a request of
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
44 FONT-SPEC.
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
45
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
46 Note: Only the method `list' of a font-driver can create this
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
47 object, and should never be modified by Lisp. In that sense,
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
48 it may be cleaner to implement it as a Lisp object of a new
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
49 type (e.g. struct Lisp_Font).
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
50
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
51 FONT-OBJECT
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
52
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
53 Lisp object of type Lisp_Misc_Save_Value encapsulating a
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
54 pointer to "struct font". This corresponds to an opened font.
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
55
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
56 Note: The note for FONT-ENTITY also applies to this.
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
57 */
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
58
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
59
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
60 struct font_driver;
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
61 struct font;
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
62
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
63 /* An enumerator for each font property. This is used as an index to
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
64 the vector of FONT-SPEC and FONT-ENTITY.
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
65
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
66 Note: The order is important and should not be changed. */
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
67
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
68 enum font_property_index
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
69 {
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
70 /* FONT-TYPE is a symbol indicating a font backend; currently `x',
91256
e221dce4f621 (font_property_index): Doc change
Jason Rumney <jasonr@gnu.org>
parents: 91244
diff changeset
71 `xft', `ftx', `freetype' are available on X and gdi on Windows.
e221dce4f621 (font_property_index): Doc change
Jason Rumney <jasonr@gnu.org>
parents: 91244
diff changeset
72 For Windows, we `bdf' and `uniscribe' backends are in progress.
e221dce4f621 (font_property_index): Doc change
Jason Rumney <jasonr@gnu.org>
parents: 91244
diff changeset
73 For Mac OS X, we need `atm'. */
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
74 FONT_TYPE_INDEX,
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
75
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
76 /* FONT-FOUNDRY is a foundry name (symbol). */
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
77 FONT_FOUNDRY_INDEX,
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
78
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
79 /* FONT-FAMILY is a family name (symbol). */
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
80 FONT_FAMILY_INDEX,
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
81
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
82 /* FONT-ADSTYLE is an additional style name (symbol). */
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
83 FONT_ADSTYLE_INDEX,
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
84
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
85 /* FONT-REGISTRY is a combination of a charset-registry and
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
86 charset0encoding name (symbol). */
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
87 FONT_REGISTRY_INDEX,
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
88
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
89 /* FONT-WEIGHT is a numeric value of weight (e.g. medium, bold) of
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
90 the font. The value is what defined by FC_WEIGHT_* in
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
91 fontconfig. */
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
92 FONT_WEIGHT_INDEX,
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
93
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
94 /* FONT-SLANT is a numeric value of slant (e.g. r, i, o) of the
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
95 font. The value is what defined by FC_SLANT_* in
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
96 fontconfig plus 100. */
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
97 FONT_SLANT_INDEX,
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
98
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
99 /* FONT-WIDTH is a numeric value of setwidth (e.g. normal,
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
100 condensed) of the font. The value is what defined by
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
101 FC_WIDTH_* in fontconfig. */
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
102 FONT_WIDTH_INDEX,
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
103
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
104 /* FONT-SIZE is a size of the font. If integer, it is a pixel
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
105 size. For a font-spec, the value can be float specifying a
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
106 point size. For a font-entity, the value can be zero meaning
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
107 that the font is scalable. */
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
108 FONT_SIZE_INDEX,
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
109
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
110 /* In a font-spec, the value is an alist of extra information of a
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
111 font such as name, OpenType features, and language coverage.
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
112 In a font-entity, the value is an extra infomation for
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
113 identifying a font (font-driver dependent). */
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
114 FONT_EXTRA_INDEX, /* alist alist */
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
115
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
116 /* This value is the length of font-spec vector. */
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
117 FONT_SPEC_MAX,
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
118
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
119 /* The followings are used only for a font-entity. */
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
120
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
121 /* Frame on which the font is found. The value is nil if the font
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
122 can be opend on any frame. */
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
123 FONT_FRAME_INDEX = FONT_SPEC_MAX,
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
124
91134
d8c3402ee3fa (FONT_ENTITY_NOT_LOADABLE)
Kenichi Handa <handa@m17n.org>
parents: 91114
diff changeset
125 /* List of font-objects opened from the font-entity. The value is
d8c3402ee3fa (FONT_ENTITY_NOT_LOADABLE)
Kenichi Handa <handa@m17n.org>
parents: 91114
diff changeset
126 nil if no font can be opened for this font-entity. */
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
127 FONT_OBJLIST_INDEX,
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
128
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
129 /* This value is the length of font-entity vector. */
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
130 FONT_ENTITY_MAX
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
131 };
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
132
90502
9d1084bd033e (QCscalable): Extern it.
Kenichi Handa <handa@m17n.org>
parents: 90497
diff changeset
133 extern Lisp_Object QCspacing, QCdpi, QCscalable, QCotf, QClanguage, QCscript;
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
134
90438
cac8d07077df (Qiso8859_1, Qiso10646_1, Qunicode_bmp): Extern them.
Kenichi Handa <handa@m17n.org>
parents: 90427
diff changeset
135 /* Important character set symbols. */
90621
d8a2b76fe3d4 (Qunicode_sip): Extern it.
Kenichi Handa <handa@m17n.org>
parents: 90564
diff changeset
136 extern Lisp_Object Qiso8859_1, Qiso10646_1, Qunicode_bmp, Qunicode_sip;
90438
cac8d07077df (Qiso8859_1, Qiso10646_1, Qunicode_bmp): Extern them.
Kenichi Handa <handa@m17n.org>
parents: 90427
diff changeset
137
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
138 extern Lisp_Object null_string;
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
139 extern Lisp_Object null_vector;
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
140
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
141 /* Structure for an opened font. We can safely cast this structure to
90864
834a5e8f248c Fix typo in comment
Jason Rumney <jasonr@gnu.org>
parents: 90816
diff changeset
142 "struct font_info". */
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
143
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
144 struct font
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
145 {
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
146 struct font_info font;
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
147
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
148 /* From which font-entity the font is opened. */
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
149 Lisp_Object entity;
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
150
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
151 /* By which pixel size the font is opened. */
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
152 int pixel_size;
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
153
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
154 /* Font-driver for the font. */
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
155 struct font_driver *driver;
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
156
90678
94842604dfce (struct font): New memeber format.
Kenichi Handa <handa@m17n.org>
parents: 90621
diff changeset
157 /* Symbol of font font; x, ttf, pcf, etc, */
94842604dfce (struct font): New memeber format.
Kenichi Handa <handa@m17n.org>
parents: 90621
diff changeset
158 Lisp_Object format;
94842604dfce (struct font): New memeber format.
Kenichi Handa <handa@m17n.org>
parents: 90621
diff changeset
159
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
160 /* File name of the font, or NULL if the font is not associated with
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
161 a file. */
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
162 char *file_name;
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
163
90506
5f608d7e835b (font_close_object, font_merge_old_spec): Extern them.
Kenichi Handa <handa@m17n.org>
parents: 90502
diff changeset
164 /* Charset to encode a character code into a glyph code of the font.
5f608d7e835b (font_close_object, font_merge_old_spec): Extern them.
Kenichi Handa <handa@m17n.org>
parents: 90502
diff changeset
165 -1 means that the font doesn't require this information to encode
5f608d7e835b (font_close_object, font_merge_old_spec): Extern them.
Kenichi Handa <handa@m17n.org>
parents: 90502
diff changeset
166 a character. */
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
167 int encoding_charset;
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
168
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
169 /* Charset to check if a character code is supported by the font.
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
170 -1 means that the contents of the font must be looked up to
90506
5f608d7e835b (font_close_object, font_merge_old_spec): Extern them.
Kenichi Handa <handa@m17n.org>
parents: 90502
diff changeset
171 determine it. */
90453
3a78ea4d2a53 (struct font): Fix typo (charet->charset).
Kenichi Handa <handa@m17n.org>
parents: 90438
diff changeset
172 int repertory_charset;
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
173
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
174 /* Minimum glyph width (in pixels). */
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
175 int min_width;
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
176
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
177 /* Ascent and descent of the font (in pixels). */
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
178 int ascent, descent;
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
179
90557
80c2d97a494e (struct font): New member scalable.
Kenichi Handa <handa@m17n.org>
parents: 90550
diff changeset
180 /* 1 iff the font is scalable. */
80c2d97a494e (struct font): New member scalable.
Kenichi Handa <handa@m17n.org>
parents: 90550
diff changeset
181 int scalable;
80c2d97a494e (struct font): New member scalable.
Kenichi Handa <handa@m17n.org>
parents: 90550
diff changeset
182
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
183 /* There will be more to this structure, but they are private to a
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
184 font-driver. */
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
185 };
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
186
90482
48a50b114c17 (QCspacing, QCdpi): Extern them.
Kenichi Handa <handa@m17n.org>
parents: 90469
diff changeset
187 enum font_spacing
48a50b114c17 (QCspacing, QCdpi): Extern them.
Kenichi Handa <handa@m17n.org>
parents: 90469
diff changeset
188 {
48a50b114c17 (QCspacing, QCdpi): Extern them.
Kenichi Handa <handa@m17n.org>
parents: 90469
diff changeset
189 FONT_SPACING_PROPORTIONAL = 0,
48a50b114c17 (QCspacing, QCdpi): Extern them.
Kenichi Handa <handa@m17n.org>
parents: 90469
diff changeset
190 FONT_SPACING_DUAL = 90,
48a50b114c17 (QCspacing, QCdpi): Extern them.
Kenichi Handa <handa@m17n.org>
parents: 90469
diff changeset
191 FONT_SPACING_MONO = 100,
48a50b114c17 (QCspacing, QCdpi): Extern them.
Kenichi Handa <handa@m17n.org>
parents: 90469
diff changeset
192 FONT_SPACING_CHARCELL = 110
48a50b114c17 (QCspacing, QCdpi): Extern them.
Kenichi Handa <handa@m17n.org>
parents: 90469
diff changeset
193 };
48a50b114c17 (QCspacing, QCdpi): Extern them.
Kenichi Handa <handa@m17n.org>
parents: 90469
diff changeset
194
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
195 struct font_metrics
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
196 {
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
197 short lbearing, rbearing, width, ascent, descent;
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
198 };
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
199
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
200 struct font_bitmap
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
201 {
91114
ce50ee0149be (struct font_bitmap): New member bits_per_pixel.
Kenichi Handa <handa@m17n.org>
parents: 91033
diff changeset
202 int bits_per_pixel;
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
203 int rows;
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
204 int width;
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
205 int pitch;
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
206 unsigned char *buffer;
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
207 int left;
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
208 int top;
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
209 int advance;
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
210 void *extra;
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
211 };
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
212
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
213 /* Predicates to check various font-related objects. */
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
214
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
215 #define FONT_SPEC_P(x) \
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
216 (VECTORP (x) && ASIZE (x) == FONT_SPEC_MAX)
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
217 #define FONT_ENTITY_P(x) \
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
218 (VECTORP (x) && ASIZE (x) == FONT_ENTITY_MAX)
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
219 #define FONT_OBJECT_P(x) \
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
220 (XTYPE (x) == Lisp_Misc && XMISCTYPE (x) == Lisp_Misc_Save_Value)
91355
8e67cd1b2741 (FONTP): Make it return 1 also for a font-object.
Kenichi Handa <handa@m17n.org>
parents: 91293
diff changeset
221 #define FONTP(x) \
8e67cd1b2741 (FONTP): Make it return 1 also for a font-object.
Kenichi Handa <handa@m17n.org>
parents: 91293
diff changeset
222 ((VECTORP (x) && (ASIZE (x) == FONT_SPEC_MAX \
8e67cd1b2741 (FONTP): Make it return 1 also for a font-object.
Kenichi Handa <handa@m17n.org>
parents: 91293
diff changeset
223 || ASIZE (x) == FONT_ENTITY_MAX)) \
8e67cd1b2741 (FONTP): Make it return 1 also for a font-object.
Kenichi Handa <handa@m17n.org>
parents: 91293
diff changeset
224 || FONT_OBJECT_P (x))
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
225
91134
d8c3402ee3fa (FONT_ENTITY_NOT_LOADABLE)
Kenichi Handa <handa@m17n.org>
parents: 91114
diff changeset
226 #define FONT_ENTITY_NOT_LOADABLE(entity) \
d8c3402ee3fa (FONT_ENTITY_NOT_LOADABLE)
Kenichi Handa <handa@m17n.org>
parents: 91114
diff changeset
227 EQ (AREF (entity, FONT_OBJLIST_INDEX), Qt)
d8c3402ee3fa (FONT_ENTITY_NOT_LOADABLE)
Kenichi Handa <handa@m17n.org>
parents: 91114
diff changeset
228
d8c3402ee3fa (FONT_ENTITY_NOT_LOADABLE)
Kenichi Handa <handa@m17n.org>
parents: 91114
diff changeset
229 #define FONT_ENTITY_SET_NOT_LOADABLE(entity) \
d8c3402ee3fa (FONT_ENTITY_NOT_LOADABLE)
Kenichi Handa <handa@m17n.org>
parents: 91114
diff changeset
230 ASET (entity, FONT_OBJLIST_INDEX, Qt)
d8c3402ee3fa (FONT_ENTITY_NOT_LOADABLE)
Kenichi Handa <handa@m17n.org>
parents: 91114
diff changeset
231
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
232
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
233 /* Check macros for various font-related objects. */
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
234
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
235 #define CHECK_FONT(x) \
91813
ca1e1298a3d8 (smerge-auto-combine-max-separation): New var.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91552
diff changeset
236 do { if (! FONTP (x)) wrong_type_argument (Qfont, x); } while (0)
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
237 #define CHECK_FONT_SPEC(x) \
91813
ca1e1298a3d8 (smerge-auto-combine-max-separation): New var.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91552
diff changeset
238 do { if (! FONT_SPEC_P (x)) wrong_type_argument (Qfont, x); } while (0)
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
239 #define CHECK_FONT_ENTITY(x) \
91813
ca1e1298a3d8 (smerge-auto-combine-max-separation): New var.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91552
diff changeset
240 do { if (! FONT_ENTITY_P (x)) wrong_type_argument (Qfont, x); } while (0)
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
241 #define CHECK_FONT_OBJECT(x) \
91813
ca1e1298a3d8 (smerge-auto-combine-max-separation): New var.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91552
diff changeset
242 do { if (! FONT_OBJECT_P (x)) wrong_type_argument (Qfont, x); } while (0)
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
243
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
244 #define CHECK_FONT_GET_OBJECT(x, font) \
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
245 do { \
91813
ca1e1298a3d8 (smerge-auto-combine-max-separation): New var.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91552
diff changeset
246 if (! FONT_OBJECT_P (x)) wrong_type_argument (Qfont, x); \
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
247 if (! XSAVE_VALUE (x)->pointer) error ("Font already closed"); \
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
248 font = XSAVE_VALUE (x)->pointer; \
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
249 } while (0)
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
250
90482
48a50b114c17 (QCspacing, QCdpi): Extern them.
Kenichi Handa <handa@m17n.org>
parents: 90469
diff changeset
251 /* Ignore the difference of font pixel sizes less than or equal to
48a50b114c17 (QCspacing, QCdpi): Extern them.
Kenichi Handa <handa@m17n.org>
parents: 90469
diff changeset
252 this value. */
48a50b114c17 (QCspacing, QCdpi): Extern them.
Kenichi Handa <handa@m17n.org>
parents: 90469
diff changeset
253 #define FONT_PIXEL_SIZE_QUANTUM 1
48a50b114c17 (QCspacing, QCdpi): Extern them.
Kenichi Handa <handa@m17n.org>
parents: 90469
diff changeset
254
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
255 struct face;
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
256 struct composition;
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
257
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
258 /* Macros for lispy glyph-string. */
91549
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
259 enum lgstring_indices
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
260 {
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
261 LGSTRING_IX_FONT, LGSTRING_IX_WIDTH,
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
262 LGSTRING_IX_LBEARING, LGSTRING_IX_RBEARING,
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
263 LGSTRING_IX_ASCENT, LGSTRING_IX_DESCENT
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
264 };
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
265 #define LGSTRING_SLOT(lgs, ix) AREF (AREF ((lgs), 0), ix)
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
266 #define LGSTRING_FONT(lgs) LGSTRING_SLOT (lgs, LGSTRING_IX_FONT)
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
267 #define LGSTRING_WIDTH(lgs) XINT (LGSTRING_SLOT (lgs, LGSTRING_IX_WIDTH))
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
268 #define LGSTRING_LBEARING(lgs) XINT (LGSTRING_SLOT (lgs, LGSTRING_IX_LBEARING))
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
269 #define LGSTRING_RBEARING(lgs) XINT (LGSTRING_SLOT (lgs, LGSTRING_IX_RBEARING))
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
270 #define LGSTRING_ASCENT(lgs) XINT (LGSTRING_SLOT (lgs, LGSTRING_IX_ASCENT))
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
271 #define LGSTRING_DESCENT(lgs) XINT (LGSTRING_SLOT (lgs, LGSTRING_IX_DESCENT))
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
272 #define LGSTRING_SET_SLOT(lgs, ix, val) ASET (AREF ((lgs), 0), ix, (val))
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
273 #define LGSTRING_SET_FONT(lgs, val) \
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
274 LGSTRING_SET_SLOT(lgs, LGSTRING_IX_FONT, (val))
91134
d8c3402ee3fa (FONT_ENTITY_NOT_LOADABLE)
Kenichi Handa <handa@m17n.org>
parents: 91114
diff changeset
275 #define LGSTRING_SET_WIDTH(lgs, val) \
91549
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
276 LGSTRING_SET_SLOT(lgs, LGSTRING_IX_WIDTH, make_number (val))
91134
d8c3402ee3fa (FONT_ENTITY_NOT_LOADABLE)
Kenichi Handa <handa@m17n.org>
parents: 91114
diff changeset
277 #define LGSTRING_SET_LBEARING(lgs, val) \
91549
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
278 LGSTRING_SET_SLOT(lgs, LGSTRING_IX_LBEARING, make_number (val))
91134
d8c3402ee3fa (FONT_ENTITY_NOT_LOADABLE)
Kenichi Handa <handa@m17n.org>
parents: 91114
diff changeset
279 #define LGSTRING_SET_RBEARING(lgs, val) \
91549
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
280 LGSTRING_SET_SLOT(lgs, LGSTRING_IX_RBEARING, make_number (val))
91134
d8c3402ee3fa (FONT_ENTITY_NOT_LOADABLE)
Kenichi Handa <handa@m17n.org>
parents: 91114
diff changeset
281 #define LGSTRING_SET_ASCENT(lgs, val) \
91549
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
282 LGSTRING_SET_SLOT(lgs, LGSTRING_IX_ASCENT, make_number (val))
91134
d8c3402ee3fa (FONT_ENTITY_NOT_LOADABLE)
Kenichi Handa <handa@m17n.org>
parents: 91114
diff changeset
283 #define LGSTRING_SET_DESCENT(lgs, val) \
91549
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
284 LGSTRING_SET_SLOT(lgs, LGSTRING_IX_DESCENT, make_number (val))
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
285
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
286 #define LGSTRING_LENGTH(lgs) (ASIZE ((lgs)) - 1)
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
287 #define LGSTRING_GLYPH(lgs, idx) AREF ((lgs), (idx) + 1)
91134
d8c3402ee3fa (FONT_ENTITY_NOT_LOADABLE)
Kenichi Handa <handa@m17n.org>
parents: 91114
diff changeset
288 #define LGSTRING_SET_GLYPH(lgs, idx, val) ASET ((lgs), (idx) + 1, (val))
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
289
91274
4afd897cd60b (LGLYPH_SIZE): New macro.
Kenichi Handa <handa@m17n.org>
parents: 91256
diff changeset
290 /* Vector size of Lispy glyph. */
91549
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
291 enum lglyph_indices
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
292 {
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
293 LGLYPH_IX_FROM, LGLYPH_IX_TO, LGLYPH_IX_CHAR, LGLYPH_IX_CODE,
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
294 LGLYPH_IX_WIDTH, LGLYPH_IX_LBEARING, LGLYPH_IX_RBEARING,
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
295 LGLYPH_IX_ASCENT, LGLYPH_IX_DESCENT, LGLYPH_IX_ADJUSTMENT,
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
296 /* Not an index. */
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
297 LGLYPH_SIZE
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
298 };
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
299 #define LGLYPH_FROM(g) XINT (AREF ((g), LGLYPH_IX_FROM))
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
300 #define LGLYPH_TO(g) XINT (AREF ((g), LGLYPH_IX_TO))
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
301 #define LGLYPH_CHAR(g) XINT (AREF ((g), LGLYPH_IX_CHAR))
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
302 #define LGLYPH_CODE(g) XUINT (AREF ((g), LGLYPH_IX_CODE))
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
303 #define LGLYPH_WIDTH(g) XINT (AREF ((g), LGLYPH_IX_WIDTH))
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
304 #define LGLYPH_LBEARING(g) XINT (AREF ((g), LGLYPH_IX_LBEARING))
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
305 #define LGLYPH_RBEARING(g) XINT (AREF ((g), LGLYPH_IX_RBEARING))
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
306 #define LGLYPH_ASCENT(g) XINT (AREF ((g), LGLYPH_IX_ASCENT))
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
307 #define LGLYPH_DESCENT(g) XINT (AREF ((g), LGLYPH_IX_DESCENT))
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
308 #define LGLYPH_ADJUSTMENT(g) AREF ((g), LGLYPH_IX_ADJUSTMENT)
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
309 #define LGLYPH_SET_FROM(g, val) ASET ((g), LGLYPH_IX_FROM, make_number (val))
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
310 #define LGLYPH_SET_TO(g, val) ASET ((g), LGLYPH_IX_TO, make_number (val))
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
311 #define LGLYPH_SET_CHAR(g, val) ASET ((g), LGLYPH_IX_CHAR, make_number (val))
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
312 /* FIXME: we should use make_uint_number here. */
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
313 #define LGLYPH_SET_CODE(g, val) ASET ((g), LGLYPH_IX_CODE, make_number (val))
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
314 #define LGLYPH_SET_WIDTH(g, val) ASET ((g), LGLYPH_IX_WIDTH, make_number (val))
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
315 #define LGLYPH_SET_LBEARING(g, val) ASET ((g), LGLYPH_IX_RBEARING, make_number (val))
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
316 #define LGLYPH_SET_RBEARING(g, val) ASET ((g), LGLYPH_IX_LBEARING, make_number (val))
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
317 #define LGLYPH_SET_ASCENT(g, val) ASET ((g), LGLYPH_IX_ASCENT, make_number (val))
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
318 #define LGLYPH_SET_DESCENT(g, val) ASET ((g), LGLYPH_IX_DESCENT, make_number (val))
4f94f3794026 (enum lgstring_indices, enum lglyph_indices): New enums.
Stefan Monnier <monnier@iro.umontreal.ca>
parents: 91355
diff changeset
319 #define LGLYPH_SET_ADJUSTMENT(g, val) ASET ((g), LGLYPH_IX_ADJUSTMENT, (val))
90531
a4a30dc43165 (LGLYPH_XOFF, LGLYPH_YOFF, LGLYPH_WIDTH, LGLYPH_WADJUST)
Kenichi Handa <handa@m17n.org>
parents: 90506
diff changeset
320
90542
2be199f501f8 (LGLYPH_FROM, LGLYPH_TO, LGLYPH_SET_FROM)
Kenichi Handa <handa@m17n.org>
parents: 90531
diff changeset
321 #define LGLYPH_XOFF(g) (VECTORP (LGLYPH_ADJUSTMENT (g)) \
2be199f501f8 (LGLYPH_FROM, LGLYPH_TO, LGLYPH_SET_FROM)
Kenichi Handa <handa@m17n.org>
parents: 90531
diff changeset
322 ? XINT (AREF (LGLYPH_ADJUSTMENT (g), 0)) : 0)
2be199f501f8 (LGLYPH_FROM, LGLYPH_TO, LGLYPH_SET_FROM)
Kenichi Handa <handa@m17n.org>
parents: 90531
diff changeset
323 #define LGLYPH_YOFF(g) (VECTORP (LGLYPH_ADJUSTMENT (g)) \
2be199f501f8 (LGLYPH_FROM, LGLYPH_TO, LGLYPH_SET_FROM)
Kenichi Handa <handa@m17n.org>
parents: 90531
diff changeset
324 ? XINT (AREF (LGLYPH_ADJUSTMENT (g), 1)) : 0)
2be199f501f8 (LGLYPH_FROM, LGLYPH_TO, LGLYPH_SET_FROM)
Kenichi Handa <handa@m17n.org>
parents: 90531
diff changeset
325 #define LGLYPH_WADJUST(g) (VECTORP (LGLYPH_ADJUSTMENT (g)) \
2be199f501f8 (LGLYPH_FROM, LGLYPH_TO, LGLYPH_SET_FROM)
Kenichi Handa <handa@m17n.org>
parents: 90531
diff changeset
326 ? XINT (AREF (LGLYPH_ADJUSTMENT (g), 2)) : 0)
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
327
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
328 #define FONT_INVALID_CODE 0xFFFFFFFF
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
329
90469
c9df3c05d0ed (struct font_driver): Member parse_name deleted.
Kenichi Handa <handa@m17n.org>
parents: 90453
diff changeset
330 /* Font driver. Members specified as "optional" can be NULL. */
c9df3c05d0ed (struct font_driver): Member parse_name deleted.
Kenichi Handa <handa@m17n.org>
parents: 90453
diff changeset
331
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
332 struct font_driver
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
333 {
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
334 /* Symbol indicating the type of the font-driver. */
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
335 Lisp_Object type;
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
336
91244
54b067217411 (struct font_driver): Change argument type of get_cache.
Kenichi Handa <handa@m17n.org>
parents: 91134
diff changeset
337 /* Return a cache of font-entities on frame F. The cache must be a
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
338 cons whose cdr part is the actual cache area. */
91244
54b067217411 (struct font_driver): Change argument type of get_cache.
Kenichi Handa <handa@m17n.org>
parents: 91134
diff changeset
339 Lisp_Object (*get_cache) P_ ((FRAME_PTR F));
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
340
90564
cb3eb6150704 (struct font_driver): New member `match'.
Kenichi Handa <handa@m17n.org>
parents: 90557
diff changeset
341 /* List fonts exactly matching with FONT_SPEC on FRAME. The value
cb3eb6150704 (struct font_driver): New member `match'.
Kenichi Handa <handa@m17n.org>
parents: 90557
diff changeset
342 is a vector of font-entities. This is the sole API that
cb3eb6150704 (struct font_driver): New member `match'.
Kenichi Handa <handa@m17n.org>
parents: 90557
diff changeset
343 allocates font-entities. */
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
344 Lisp_Object (*list) P_ ((Lisp_Object frame, Lisp_Object font_spec));
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
345
90564
cb3eb6150704 (struct font_driver): New member `match'.
Kenichi Handa <handa@m17n.org>
parents: 90557
diff changeset
346 /* Return a font entity most closely maching with FONT_SPEC on
cb3eb6150704 (struct font_driver): New member `match'.
Kenichi Handa <handa@m17n.org>
parents: 90557
diff changeset
347 FRAME. The closeness is detemined by the font backend, thus
cb3eb6150704 (struct font_driver): New member `match'.
Kenichi Handa <handa@m17n.org>
parents: 90557
diff changeset
348 `face-font-selection-order' is ignored here. */
cb3eb6150704 (struct font_driver): New member `match'.
Kenichi Handa <handa@m17n.org>
parents: 90557
diff changeset
349 Lisp_Object (*match) P_ ((Lisp_Object frame, Lisp_Object font_spec));
cb3eb6150704 (struct font_driver): New member `match'.
Kenichi Handa <handa@m17n.org>
parents: 90557
diff changeset
350
90469
c9df3c05d0ed (struct font_driver): Member parse_name deleted.
Kenichi Handa <handa@m17n.org>
parents: 90453
diff changeset
351 /* Optional.
c9df3c05d0ed (struct font_driver): Member parse_name deleted.
Kenichi Handa <handa@m17n.org>
parents: 90453
diff changeset
352 List available families. The value is a list of family names
c9df3c05d0ed (struct font_driver): Member parse_name deleted.
Kenichi Handa <handa@m17n.org>
parents: 90453
diff changeset
353 (symbols). */
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
354 Lisp_Object (*list_family) P_ ((Lisp_Object frame));
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
355
90469
c9df3c05d0ed (struct font_driver): Member parse_name deleted.
Kenichi Handa <handa@m17n.org>
parents: 90453
diff changeset
356 /* Optional (if FONT_EXTRA_INDEX is not Lisp_Save_Value).
c9df3c05d0ed (struct font_driver): Member parse_name deleted.
Kenichi Handa <handa@m17n.org>
parents: 90453
diff changeset
357 Free FONT_EXTRA_INDEX field of FONT_ENTITY. */
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
358 void (*free_entity) P_ ((Lisp_Object font_entity));
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
359
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
360 /* Open a font specified by FONT_ENTITY on frame F. If the font is
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
361 scalable, open it with PIXEL_SIZE. */
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
362 struct font *(*open) P_ ((FRAME_PTR f, Lisp_Object font_entity,
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
363 int pixel_size));
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
364
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
365 /* Close FONT on frame F. */
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
366 void (*close) P_ ((FRAME_PTR f, struct font *font));
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
367
90469
c9df3c05d0ed (struct font_driver): Member parse_name deleted.
Kenichi Handa <handa@m17n.org>
parents: 90453
diff changeset
368 /* Optional (if FACE->extra is not used).
c9df3c05d0ed (struct font_driver): Member parse_name deleted.
Kenichi Handa <handa@m17n.org>
parents: 90453
diff changeset
369 Prepare FACE for displaying characters by FONT on frame F by
c9df3c05d0ed (struct font_driver): Member parse_name deleted.
Kenichi Handa <handa@m17n.org>
parents: 90453
diff changeset
370 storing some data in FACE->extra. If successful, return 0.
c9df3c05d0ed (struct font_driver): Member parse_name deleted.
Kenichi Handa <handa@m17n.org>
parents: 90453
diff changeset
371 Otherwise, return -1. */
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
372 int (*prepare_face) P_ ((FRAME_PTR f, struct face *face));
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
373
90469
c9df3c05d0ed (struct font_driver): Member parse_name deleted.
Kenichi Handa <handa@m17n.org>
parents: 90453
diff changeset
374 /* Optional.
c9df3c05d0ed (struct font_driver): Member parse_name deleted.
Kenichi Handa <handa@m17n.org>
parents: 90453
diff changeset
375 Done FACE for displaying characters by FACE->font on frame F. */
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
376 void (*done_face) P_ ((FRAME_PTR f, struct face *face));
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
377
90469
c9df3c05d0ed (struct font_driver): Member parse_name deleted.
Kenichi Handa <handa@m17n.org>
parents: 90453
diff changeset
378 /* Optional.
c9df3c05d0ed (struct font_driver): Member parse_name deleted.
Kenichi Handa <handa@m17n.org>
parents: 90453
diff changeset
379 If FONT_ENTITY has a glyph for character C (Unicode code point),
c9df3c05d0ed (struct font_driver): Member parse_name deleted.
Kenichi Handa <handa@m17n.org>
parents: 90453
diff changeset
380 return 1. If not, return 0. If a font must be opened to check
c9df3c05d0ed (struct font_driver): Member parse_name deleted.
Kenichi Handa <handa@m17n.org>
parents: 90453
diff changeset
381 it, return -1. */
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
382 int (*has_char) P_ ((Lisp_Object entity, int c));
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
383
90469
c9df3c05d0ed (struct font_driver): Member parse_name deleted.
Kenichi Handa <handa@m17n.org>
parents: 90453
diff changeset
384 /* Return a glyph code of FONT for characer C (Unicode code point).
c9df3c05d0ed (struct font_driver): Member parse_name deleted.
Kenichi Handa <handa@m17n.org>
parents: 90453
diff changeset
385 If FONT doesn't have such a glyph, return FONT_INVALID_CODE. */
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
386 unsigned (*encode_char) P_ ((struct font *font, int c));
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
387
91033
e25192c0a550 (struct font_driver): Docstring of text_extents improved.
Kenichi Handa <handa@m17n.org>
parents: 90885
diff changeset
388 /* Computate the total metrics of the NGLYPHS glyphs specified by
e25192c0a550 (struct font_driver): Docstring of text_extents improved.
Kenichi Handa <handa@m17n.org>
parents: 90885
diff changeset
389 the font FONT and the sequence of glyph codes CODE, and store the
e25192c0a550 (struct font_driver): Docstring of text_extents improved.
Kenichi Handa <handa@m17n.org>
parents: 90885
diff changeset
390 result in METRICS. */
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
391 int (*text_extents) P_ ((struct font *font,
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
392 unsigned *code, int nglyphs,
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
393 struct font_metrics *metrics));
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
394
90469
c9df3c05d0ed (struct font_driver): Member parse_name deleted.
Kenichi Handa <handa@m17n.org>
parents: 90453
diff changeset
395 /* Optional.
c9df3c05d0ed (struct font_driver): Member parse_name deleted.
Kenichi Handa <handa@m17n.org>
parents: 90453
diff changeset
396 Draw glyphs between FROM and TO of S->char2b at (X Y) pixel
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
397 position of frame F with S->FACE and S->GC. If WITH_BACKGROUND
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
398 is nonzero, fill the background in advance. It is assured that
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
399 WITH_BACKGROUND is zero when (FROM > 0 || TO < S->nchars). */
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
400 int (*draw) P_ ((struct glyph_string *s, int from, int to,
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
401 int x, int y, int with_background));
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
402
90469
c9df3c05d0ed (struct font_driver): Member parse_name deleted.
Kenichi Handa <handa@m17n.org>
parents: 90453
diff changeset
403 /* Optional.
c9df3c05d0ed (struct font_driver): Member parse_name deleted.
Kenichi Handa <handa@m17n.org>
parents: 90453
diff changeset
404 Store bitmap data for glyph-code CODE of FONT in BITMAP. It is
c9df3c05d0ed (struct font_driver): Member parse_name deleted.
Kenichi Handa <handa@m17n.org>
parents: 90453
diff changeset
405 intended that this method is callled from the other font-driver
c9df3c05d0ed (struct font_driver): Member parse_name deleted.
Kenichi Handa <handa@m17n.org>
parents: 90453
diff changeset
406 for actual drawing. */
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
407 int (*get_bitmap) P_ ((struct font *font, unsigned code,
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
408 struct font_bitmap *bitmap,
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
409 int bits_per_pixel));
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
410
90469
c9df3c05d0ed (struct font_driver): Member parse_name deleted.
Kenichi Handa <handa@m17n.org>
parents: 90453
diff changeset
411 /* Optional.
c9df3c05d0ed (struct font_driver): Member parse_name deleted.
Kenichi Handa <handa@m17n.org>
parents: 90453
diff changeset
412 Free bitmap data in BITMAP. */
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
413 void (*free_bitmap) P_ ((struct font *font, struct font_bitmap *bitmap));
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
414
90469
c9df3c05d0ed (struct font_driver): Member parse_name deleted.
Kenichi Handa <handa@m17n.org>
parents: 90453
diff changeset
415 /* Optional.
c9df3c05d0ed (struct font_driver): Member parse_name deleted.
Kenichi Handa <handa@m17n.org>
parents: 90453
diff changeset
416 Return an outline data for glyph-code CODE of FONT. The format
c9df3c05d0ed (struct font_driver): Member parse_name deleted.
Kenichi Handa <handa@m17n.org>
parents: 90453
diff changeset
417 of the outline data depends on the font-driver. */
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
418 void *(*get_outline) P_ ((struct font *font, unsigned code));
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
419
90469
c9df3c05d0ed (struct font_driver): Member parse_name deleted.
Kenichi Handa <handa@m17n.org>
parents: 90453
diff changeset
420 /* Optional.
c9df3c05d0ed (struct font_driver): Member parse_name deleted.
Kenichi Handa <handa@m17n.org>
parents: 90453
diff changeset
421 Free OUTLINE (that is obtained by the above method). */
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
422 void (*free_outline) P_ ((struct font *font, void *outline));
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
423
90469
c9df3c05d0ed (struct font_driver): Member parse_name deleted.
Kenichi Handa <handa@m17n.org>
parents: 90453
diff changeset
424 /* Optional.
c9df3c05d0ed (struct font_driver): Member parse_name deleted.
Kenichi Handa <handa@m17n.org>
parents: 90453
diff changeset
425 Get coordinates of the INDEXth anchor point of the glyph whose
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
426 code is CODE. Store the coordinates in *X and *Y. Return 0 if
90469
c9df3c05d0ed (struct font_driver): Member parse_name deleted.
Kenichi Handa <handa@m17n.org>
parents: 90453
diff changeset
427 the operations was successfull. Otherwise return -1. */
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
428 int (*anchor_point) P_ ((struct font *font, unsigned code, int index,
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
429 int *x, int *y));
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
430
90469
c9df3c05d0ed (struct font_driver): Member parse_name deleted.
Kenichi Handa <handa@m17n.org>
parents: 90453
diff changeset
431 /* Optional.
c9df3c05d0ed (struct font_driver): Member parse_name deleted.
Kenichi Handa <handa@m17n.org>
parents: 90453
diff changeset
432 Return a list describing which scripts/languages FONT
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
433 supports by which GSUB/GPOS features of OpenType tables. */
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
434 Lisp_Object (*otf_capability) P_ ((struct font *font));
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
435
90469
c9df3c05d0ed (struct font_driver): Member parse_name deleted.
Kenichi Handa <handa@m17n.org>
parents: 90453
diff changeset
436 /* Optional.
90815
d0368a3e5450 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 90696
diff changeset
437 Apply FONT's OTF-FEATURES to the glyph string.
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
438
90815
d0368a3e5450 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 90696
diff changeset
439 FEATURES specifies which OTF features to apply in this format:
d0368a3e5450 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 90696
diff changeset
440 (SCRIPT LANGSYS GSUB-FEATURE GPOS-FEATURE)
d0368a3e5450 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 90696
diff changeset
441 See the documentation of `font-drive-otf' for the detail.
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
442
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
443 This method applies the specified features to the codes in the
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
444 elements of GSTRING-IN (between FROMth and TOth). The output
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
445 codes are stored in GSTRING-OUT at the IDXth element and the
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
446 following elements.
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
447
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
448 Return the number of output codes. If none of the features are
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
449 applicable to the input data, return 0. If GSTRING-OUT is too
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
450 short, return -1. */
90815
d0368a3e5450 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 90696
diff changeset
451 int (*otf_drive) P_ ((struct font *font, Lisp_Object features,
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
452 Lisp_Object gstring_in, int from, int to,
90557
80c2d97a494e (struct font): New member scalable.
Kenichi Handa <handa@m17n.org>
parents: 90550
diff changeset
453 Lisp_Object gstring_out, int idx, int alternate_subst));
91114
ce50ee0149be (struct font_bitmap): New member bits_per_pixel.
Kenichi Handa <handa@m17n.org>
parents: 91033
diff changeset
454
ce50ee0149be (struct font_bitmap): New member bits_per_pixel.
Kenichi Handa <handa@m17n.org>
parents: 91033
diff changeset
455 /* Optional.
ce50ee0149be (struct font_bitmap): New member bits_per_pixel.
Kenichi Handa <handa@m17n.org>
parents: 91033
diff changeset
456 Make the font driver ready for frame F. Usually this function
ce50ee0149be (struct font_bitmap): New member bits_per_pixel.
Kenichi Handa <handa@m17n.org>
parents: 91033
diff changeset
457 makes some data specific to F and store it in F by calling
ce50ee0149be (struct font_bitmap): New member bits_per_pixel.
Kenichi Handa <handa@m17n.org>
parents: 91033
diff changeset
458 font_put_frame_data (). */
ce50ee0149be (struct font_bitmap): New member bits_per_pixel.
Kenichi Handa <handa@m17n.org>
parents: 91033
diff changeset
459 int (*start_for_frame) P_ ((FRAME_PTR f));
ce50ee0149be (struct font_bitmap): New member bits_per_pixel.
Kenichi Handa <handa@m17n.org>
parents: 91033
diff changeset
460
ce50ee0149be (struct font_bitmap): New member bits_per_pixel.
Kenichi Handa <handa@m17n.org>
parents: 91033
diff changeset
461 /* Optional.
ce50ee0149be (struct font_bitmap): New member bits_per_pixel.
Kenichi Handa <handa@m17n.org>
parents: 91033
diff changeset
462 End using the driver for frame F. Usually this function free
ce50ee0149be (struct font_bitmap): New member bits_per_pixel.
Kenichi Handa <handa@m17n.org>
parents: 91033
diff changeset
463 some data stored for F. */
ce50ee0149be (struct font_bitmap): New member bits_per_pixel.
Kenichi Handa <handa@m17n.org>
parents: 91033
diff changeset
464 int (*end_for_frame) P_ ((FRAME_PTR f));
91134
d8c3402ee3fa (FONT_ENTITY_NOT_LOADABLE)
Kenichi Handa <handa@m17n.org>
parents: 91114
diff changeset
465
d8c3402ee3fa (FONT_ENTITY_NOT_LOADABLE)
Kenichi Handa <handa@m17n.org>
parents: 91114
diff changeset
466 /* Optional.
91293
c45d16b39212 (struct font_driver): Docstring of member `shape' is improved.
Kenichi Handa <handa@m17n.org>
parents: 91274
diff changeset
467
c45d16b39212 (struct font_driver): Docstring of member `shape' is improved.
Kenichi Handa <handa@m17n.org>
parents: 91274
diff changeset
468 Shape text in LGSTRING. See the docstring of `font-make-gstring'
c45d16b39212 (struct font_driver): Docstring of member `shape' is improved.
Kenichi Handa <handa@m17n.org>
parents: 91274
diff changeset
469 for the format of LGSTRING. If the (N+1)th element of LGSTRING
c45d16b39212 (struct font_driver): Docstring of member `shape' is improved.
Kenichi Handa <handa@m17n.org>
parents: 91274
diff changeset
470 is nil, input of shaping is from the 1st to (N)th elements. In
c45d16b39212 (struct font_driver): Docstring of member `shape' is improved.
Kenichi Handa <handa@m17n.org>
parents: 91274
diff changeset
471 each input glyph, FROM, TO, CHAR, and CODE are already set.
c45d16b39212 (struct font_driver): Docstring of member `shape' is improved.
Kenichi Handa <handa@m17n.org>
parents: 91274
diff changeset
472
c45d16b39212 (struct font_driver): Docstring of member `shape' is improved.
Kenichi Handa <handa@m17n.org>
parents: 91274
diff changeset
473 This function updates all fields of the input glyphs. If the
c45d16b39212 (struct font_driver): Docstring of member `shape' is improved.
Kenichi Handa <handa@m17n.org>
parents: 91274
diff changeset
474 output glyphs (M) are more than the input glyphs (N), (N+1)th
c45d16b39212 (struct font_driver): Docstring of member `shape' is improved.
Kenichi Handa <handa@m17n.org>
parents: 91274
diff changeset
475 through (M)th elements of LGSTRING are updated possibly by making
c45d16b39212 (struct font_driver): Docstring of member `shape' is improved.
Kenichi Handa <handa@m17n.org>
parents: 91274
diff changeset
476 a new glyph object and storing it in LGSTRING. If (M) is greater
c45d16b39212 (struct font_driver): Docstring of member `shape' is improved.
Kenichi Handa <handa@m17n.org>
parents: 91274
diff changeset
477 than the length of LGSTRING, nil should be return. In that case,
c45d16b39212 (struct font_driver): Docstring of member `shape' is improved.
Kenichi Handa <handa@m17n.org>
parents: 91274
diff changeset
478 this function is called again with the larger LGSTRING. */
91134
d8c3402ee3fa (FONT_ENTITY_NOT_LOADABLE)
Kenichi Handa <handa@m17n.org>
parents: 91114
diff changeset
479 Lisp_Object (*shape) P_ ((Lisp_Object lgstring));
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
480 };
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
481
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
482
91114
ce50ee0149be (struct font_bitmap): New member bits_per_pixel.
Kenichi Handa <handa@m17n.org>
parents: 91033
diff changeset
483 /* Chain of font drivers. There's one global font driver list
ce50ee0149be (struct font_bitmap): New member bits_per_pixel.
Kenichi Handa <handa@m17n.org>
parents: 91033
diff changeset
484 (font_driver_list in font.c). In addition, each frame has it's own
ce50ee0149be (struct font_bitmap): New member bits_per_pixel.
Kenichi Handa <handa@m17n.org>
parents: 91033
diff changeset
485 font driver list at FRAME_PTR->font_driver_list. */
ce50ee0149be (struct font_bitmap): New member bits_per_pixel.
Kenichi Handa <handa@m17n.org>
parents: 91033
diff changeset
486
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
487 struct font_driver_list
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
488 {
91114
ce50ee0149be (struct font_bitmap): New member bits_per_pixel.
Kenichi Handa <handa@m17n.org>
parents: 91033
diff changeset
489 /* 1 iff this driver is currently used. It is igonred in the global
ce50ee0149be (struct font_bitmap): New member bits_per_pixel.
Kenichi Handa <handa@m17n.org>
parents: 91033
diff changeset
490 font driver list.*/
90550
5996c3b2f18d *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 90542
diff changeset
491 int on;
91114
ce50ee0149be (struct font_bitmap): New member bits_per_pixel.
Kenichi Handa <handa@m17n.org>
parents: 91033
diff changeset
492 /* Pointer to the font driver. */
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
493 struct font_driver *driver;
91114
ce50ee0149be (struct font_bitmap): New member bits_per_pixel.
Kenichi Handa <handa@m17n.org>
parents: 91033
diff changeset
494 /* Pointer to the next element of the chain. */
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
495 struct font_driver_list *next;
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
496 };
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
497
91114
ce50ee0149be (struct font_bitmap): New member bits_per_pixel.
Kenichi Handa <handa@m17n.org>
parents: 91033
diff changeset
498
ce50ee0149be (struct font_bitmap): New member bits_per_pixel.
Kenichi Handa <handa@m17n.org>
parents: 91033
diff changeset
499 /* Chain of arbitrary data specific to each font driver. Each frame
ce50ee0149be (struct font_bitmap): New member bits_per_pixel.
Kenichi Handa <handa@m17n.org>
parents: 91033
diff changeset
500 has it's own font data list at FRAME_PTR->font_data_list. */
ce50ee0149be (struct font_bitmap): New member bits_per_pixel.
Kenichi Handa <handa@m17n.org>
parents: 91033
diff changeset
501
ce50ee0149be (struct font_bitmap): New member bits_per_pixel.
Kenichi Handa <handa@m17n.org>
parents: 91033
diff changeset
502 struct font_data_list
ce50ee0149be (struct font_bitmap): New member bits_per_pixel.
Kenichi Handa <handa@m17n.org>
parents: 91033
diff changeset
503 {
ce50ee0149be (struct font_bitmap): New member bits_per_pixel.
Kenichi Handa <handa@m17n.org>
parents: 91033
diff changeset
504 /* Pointer to the font driver. */
ce50ee0149be (struct font_bitmap): New member bits_per_pixel.
Kenichi Handa <handa@m17n.org>
parents: 91033
diff changeset
505 struct font_driver *driver;
ce50ee0149be (struct font_bitmap): New member bits_per_pixel.
Kenichi Handa <handa@m17n.org>
parents: 91033
diff changeset
506 /* Data specific to the font driver. */
ce50ee0149be (struct font_bitmap): New member bits_per_pixel.
Kenichi Handa <handa@m17n.org>
parents: 91033
diff changeset
507 void *data;
ce50ee0149be (struct font_bitmap): New member bits_per_pixel.
Kenichi Handa <handa@m17n.org>
parents: 91033
diff changeset
508 /* Pointer to the next element of the chain. */
ce50ee0149be (struct font_bitmap): New member bits_per_pixel.
Kenichi Handa <handa@m17n.org>
parents: 91033
diff changeset
509 struct font_data_list *next;
ce50ee0149be (struct font_bitmap): New member bits_per_pixel.
Kenichi Handa <handa@m17n.org>
parents: 91033
diff changeset
510 };
ce50ee0149be (struct font_bitmap): New member bits_per_pixel.
Kenichi Handa <handa@m17n.org>
parents: 91033
diff changeset
511
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
512 extern int enable_font_backend;
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
513
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
514 EXFUN (Ffont_spec, MANY);
91134
d8c3402ee3fa (FONT_ENTITY_NOT_LOADABLE)
Kenichi Handa <handa@m17n.org>
parents: 91114
diff changeset
515 EXFUN (Ffont_get, 2);
90497
655b68ccb716 (Flist_fonts): EXFUN it.
Kenichi Handa <handa@m17n.org>
parents: 90482
diff changeset
516 EXFUN (Flist_fonts, 4);
90550
5996c3b2f18d *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 90542
diff changeset
517 EXFUN (Fclear_font_cache, 0);
90696
46ca345eec0b (Ffont_xlfd_name): EXFUN it.
Kenichi Handa <handa@m17n.org>
parents: 90678
diff changeset
518 EXFUN (Ffont_xlfd_name, 1);
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
519
91134
d8c3402ee3fa (FONT_ENTITY_NOT_LOADABLE)
Kenichi Handa <handa@m17n.org>
parents: 91114
diff changeset
520 extern int font_registry_charsets P_ ((Lisp_Object, struct charset **,
d8c3402ee3fa (FONT_ENTITY_NOT_LOADABLE)
Kenichi Handa <handa@m17n.org>
parents: 91114
diff changeset
521 struct charset **));
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
522 extern Lisp_Object font_symbolic_weight P_ ((Lisp_Object font));
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
523 extern Lisp_Object font_symbolic_slant P_ ((Lisp_Object font));
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
524 extern Lisp_Object font_symbolic_width P_ ((Lisp_Object font));
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
525
90469
c9df3c05d0ed (struct font_driver): Member parse_name deleted.
Kenichi Handa <handa@m17n.org>
parents: 90453
diff changeset
526 extern int font_match_p P_ ((Lisp_Object spec, Lisp_Object entity));
c9df3c05d0ed (struct font_driver): Member parse_name deleted.
Kenichi Handa <handa@m17n.org>
parents: 90453
diff changeset
527
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
528 extern Lisp_Object font_find_object P_ ((struct font *font));
90469
c9df3c05d0ed (struct font_driver): Member parse_name deleted.
Kenichi Handa <handa@m17n.org>
parents: 90453
diff changeset
529 extern Lisp_Object font_get_name P_ ((Lisp_Object font_object));
c9df3c05d0ed (struct font_driver): Member parse_name deleted.
Kenichi Handa <handa@m17n.org>
parents: 90453
diff changeset
530 extern Lisp_Object font_get_spec P_ ((Lisp_Object font_object));
c9df3c05d0ed (struct font_driver): Member parse_name deleted.
Kenichi Handa <handa@m17n.org>
parents: 90453
diff changeset
531 extern Lisp_Object font_get_frame P_ ((Lisp_Object font_object));
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
532 extern int font_has_char P_ ((FRAME_PTR, Lisp_Object, int));
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
533 extern unsigned font_encode_char P_ ((Lisp_Object, int));
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
534
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
535 extern int font_set_lface_from_name P_ ((FRAME_PTR f,
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
536 Lisp_Object lface,
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
537 Lisp_Object fontname,
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
538 int force_p, int may_fail_p));
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
539 extern Lisp_Object font_find_for_lface P_ ((FRAME_PTR f, Lisp_Object *lface,
91134
d8c3402ee3fa (FONT_ENTITY_NOT_LOADABLE)
Kenichi Handa <handa@m17n.org>
parents: 91114
diff changeset
540 Lisp_Object spec, int c));
90815
d0368a3e5450 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 90696
diff changeset
541 extern Lisp_Object font_open_for_lface P_ ((FRAME_PTR f, Lisp_Object entity,
d0368a3e5450 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 90696
diff changeset
542 Lisp_Object *lface,
d0368a3e5450 *** empty log message ***
Kenichi Handa <handa@m17n.org>
parents: 90696
diff changeset
543 Lisp_Object spec));
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
544 extern void font_load_for_face P_ ((FRAME_PTR f, struct face *face));
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
545 extern void font_prepare_for_face P_ ((FRAME_PTR f, struct face *face));
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
546 extern Lisp_Object font_open_by_name P_ ((FRAME_PTR f, char *name));
90506
5f608d7e835b (font_close_object, font_merge_old_spec): Extern them.
Kenichi Handa <handa@m17n.org>
parents: 90502
diff changeset
547 extern void font_close_object (FRAME_PTR f, Lisp_Object font_object);
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
548
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
549 extern Lisp_Object intern_downcase P_ ((char *str, int len));
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
550 extern void font_update_sort_order P_ ((int *order));
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
551
90506
5f608d7e835b (font_close_object, font_merge_old_spec): Extern them.
Kenichi Handa <handa@m17n.org>
parents: 90502
diff changeset
552 extern void font_merge_old_spec P_ ((Lisp_Object name, Lisp_Object family,
5f608d7e835b (font_close_object, font_merge_old_spec): Extern them.
Kenichi Handa <handa@m17n.org>
parents: 90502
diff changeset
553 Lisp_Object registry, Lisp_Object spec));
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
554
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
555
90502
9d1084bd033e (QCscalable): Extern it.
Kenichi Handa <handa@m17n.org>
parents: 90497
diff changeset
556 extern int font_parse_xlfd P_ ((char *name, Lisp_Object font));
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
557 extern int font_unparse_xlfd P_ ((Lisp_Object font, int pixel_size,
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
558 char *name, int bytes));
90502
9d1084bd033e (QCscalable): Extern it.
Kenichi Handa <handa@m17n.org>
parents: 90497
diff changeset
559 extern int font_parse_fcname P_ ((char *name, Lisp_Object font));
90469
c9df3c05d0ed (struct font_driver): Member parse_name deleted.
Kenichi Handa <handa@m17n.org>
parents: 90453
diff changeset
560 extern int font_unparse_fcname P_ ((Lisp_Object font, int pixel_size,
c9df3c05d0ed (struct font_driver): Member parse_name deleted.
Kenichi Handa <handa@m17n.org>
parents: 90453
diff changeset
561 char *name, int bytes));
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
562 extern void register_font_driver P_ ((struct font_driver *driver, FRAME_PTR f));
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
563 extern void free_font_driver_list P_ ((FRAME_PTR f));
90564
cb3eb6150704 (struct font_driver): New member `match'.
Kenichi Handa <handa@m17n.org>
parents: 90557
diff changeset
564 extern Lisp_Object font_update_drivers P_ ((FRAME_PTR f, Lisp_Object list));
90542
2be199f501f8 (LGLYPH_FROM, LGLYPH_TO, LGLYPH_SET_FROM)
Kenichi Handa <handa@m17n.org>
parents: 90531
diff changeset
565 extern Lisp_Object font_at P_ ((int c, EMACS_INT pos, struct face *face,
2be199f501f8 (LGLYPH_FROM, LGLYPH_TO, LGLYPH_SET_FROM)
Kenichi Handa <handa@m17n.org>
parents: 90531
diff changeset
566 struct window *w, Lisp_Object object));
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
567
91134
d8c3402ee3fa (FONT_ENTITY_NOT_LOADABLE)
Kenichi Handa <handa@m17n.org>
parents: 91114
diff changeset
568 extern struct font *font_prepare_composition P_ ((struct composition *cmp,
d8c3402ee3fa (FONT_ENTITY_NOT_LOADABLE)
Kenichi Handa <handa@m17n.org>
parents: 91114
diff changeset
569 FRAME_PTR f));
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
570
90885
ecd61e98251d * font.h (font_put_extra): Moved declaration from font.c.
Jason Rumney <jasonr@gnu.org>
parents: 90864
diff changeset
571 extern Lisp_Object font_put_extra P_ ((Lisp_Object font, Lisp_Object prop,
ecd61e98251d * font.h (font_put_extra): Moved declaration from font.c.
Jason Rumney <jasonr@gnu.org>
parents: 90864
diff changeset
572 Lisp_Object val));
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
573
91114
ce50ee0149be (struct font_bitmap): New member bits_per_pixel.
Kenichi Handa <handa@m17n.org>
parents: 91033
diff changeset
574 extern int font_put_frame_data P_ ((FRAME_PTR f,
ce50ee0149be (struct font_bitmap): New member bits_per_pixel.
Kenichi Handa <handa@m17n.org>
parents: 91033
diff changeset
575 struct font_driver *driver,
ce50ee0149be (struct font_bitmap): New member bits_per_pixel.
Kenichi Handa <handa@m17n.org>
parents: 91033
diff changeset
576 void *data));
ce50ee0149be (struct font_bitmap): New member bits_per_pixel.
Kenichi Handa <handa@m17n.org>
parents: 91033
diff changeset
577 extern void *font_get_frame_data P_ ((FRAME_PTR f,
ce50ee0149be (struct font_bitmap): New member bits_per_pixel.
Kenichi Handa <handa@m17n.org>
parents: 91033
diff changeset
578 struct font_driver *driver));
ce50ee0149be (struct font_bitmap): New member bits_per_pixel.
Kenichi Handa <handa@m17n.org>
parents: 91033
diff changeset
579
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
580 #ifdef HAVE_FREETYPE
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
581 extern struct font_driver ftfont_driver;
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
582 #endif /* HAVE_FREETYPE */
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
583 #ifdef HAVE_X_WINDOWS
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
584 extern struct font_driver xfont_driver;
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
585 extern struct font_driver ftxfont_driver;
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
586 #ifdef HAVE_XFT
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
587 extern struct font_driver xftfont_driver;
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
588 #endif /* HAVE_XFT */
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
589 #endif /* HAVE_X_WINDOWS */
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
590 #ifdef WINDOWSNT
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
591 extern struct font_driver w32font_driver;
93597
0dac12128e1c (uniscribe_font_driver) [WINDOWSNT]: Declare for w32fns.c.
Jason Rumney <jasonr@gnu.org>
parents: 91813
diff changeset
592 extern struct font_driver uniscribe_font_driver;
90400
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
593 #endif /* WINDOWSNT */
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
594 #ifdef MAC_OS
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
595 extern struct font_driver atmfont_driver;
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
596 #endif /* MAC_OS */
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
597
80fff33f74f5 New file.
Kenichi Handa <handa@m17n.org>
parents:
diff changeset
598 #endif /* not EMACS_FONT_H */
90427
ddb25860d044 Add arch tagline
Miles Bader <miles@gnu.org>
parents: 90400
diff changeset
599
ddb25860d044 Add arch tagline
Miles Bader <miles@gnu.org>
parents: 90400
diff changeset
600 /* arch-tag: 3b7260c3-5bec-4d6b-a0db-95c1b431b1a2
ddb25860d044 Add arch tagline
Miles Bader <miles@gnu.org>
parents: 90400
diff changeset
601 (do not change this comment) */