aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2008-05-12 23:51:28 +0000
committerKenichi Handa2008-05-12 23:51:28 +0000
commit9bb7c0068c5e1c4cc4d8f25ad6ead6f1747d2c33 (patch)
treee72b068809e08507354f6e461bde5b9935348f2a
parent6010cb23234606e56f28387280b79dedb6a41110 (diff)
downloademacs-old-branches/font-backend.tar.gz
emacs-old-branches/font-backend.zip
*** empty log message ***old-branches/font-backend
-rw-r--r--ChangeLog.fb4
-rw-r--r--lisp/ChangeLog.fb30
-rw-r--r--lisp/cus-face.el1
-rw-r--r--lisp/faces.el11
-rw-r--r--src/ChangeLog.fb448
-rw-r--r--src/Makefile.in2
-rw-r--r--src/emacs.c4
-rw-r--r--src/fontset.c4
-rw-r--r--src/xdisp.c2
-rw-r--r--src/xfaces.c7
10 files changed, 447 insertions, 66 deletions
diff --git a/ChangeLog.fb b/ChangeLog.fb
new file mode 100644
index 00000000000..c89da575a38
--- /dev/null
+++ b/ChangeLog.fb
@@ -0,0 +1,4 @@
12008-05-12 Kenichi Handa <handa@m17n.org>
2
3 * configure.in: Don't handle --disable-font-backend. Don't print
4 a message about a font backend.
diff --git a/lisp/ChangeLog.fb b/lisp/ChangeLog.fb
new file mode 100644
index 00000000000..ac548df61b9
--- /dev/null
+++ b/lisp/ChangeLog.fb
@@ -0,0 +1,30 @@
12008-05-11 Kenichi Handa <handa@m17n.org>
2
3 * language/korean.el ("Korean"): Set `iso639-language'
4 property to `ko'.
5
6 * language/japanese.el ("Japanese"): Set `iso639-language'
7 property to `ja'.
8
9 * language/chinese.el ("Chinese-GB", "Chinese-BIG5")
10 ("Chinese-CNS", "Chinese-EUC-TW", "Chinese-GBK")
11 ("Chinese-GB18030"): Set `iso639-language' property to `zh'.
12
13 * international/mule-cmds.el (set-language-environment): Set
14 current-iso639-language
15
16 * international/fontset.el (setup-default-fontset): For kana, han,
17 hangul, and cjk-misc, move an entry with font-spec at the end.
18 (generate-fontset-menu): Exclue fontset-auto* from the list.
19
20 * composite.el (compose-chars-after): Assume that WINDOW is always
21 non-nil.
22
23 * faces.el (font-weight-table, font-slant-table)
24 (font-swidth-table): Declare them by defconst. Change the format
25 of elements. Call internal-set-font-style-table after their
26 declaration.
27 (face-valid-attribute-values): Call font-family-list. Get values
28 for width, weight, and slant from font-xxx-table.
29
30 * cus-face.el (custom-face-attributes): Add "thin" for :weight.
diff --git a/lisp/cus-face.el b/lisp/cus-face.el
index c5665990732..2c389c15397 100644
--- a/lisp/cus-face.el
+++ b/lisp/cus-face.el
@@ -86,6 +86,7 @@
86 (const :tag "ultracondensed" ultra-condensed) 86 (const :tag "ultracondensed" ultra-condensed)
87 (const :tag "ultraexpanded" ultra-expanded) 87 (const :tag "ultraexpanded" ultra-expanded)
88 (const :tag "wide" extra-expanded))) 88 (const :tag "wide" extra-expanded)))
89
89 (:height 90 (:height
90 (choice :tag "Height" 91 (choice :tag "Height"
91 :help-echo "Face's font height." 92 :help-echo "Face's font height."
diff --git a/lisp/faces.el b/lisp/faces.el
index 556497a6a12..78d35895f9c 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -114,7 +114,10 @@ REGISTRY, ALTERNATIVE1, ALTERNATIVE2, and etc."
114 (bold 200) 114 (bold 200)
115 (extra-bold 205 extrabold) 115 (extra-bold 205 extrabold)
116 (ultra-bold 210 ultrabold black)) 116 (ultra-bold 210 ultrabold black))
117 "Alist of font weight symbols vs the corresponding numeric values.") 117 "Alist of font weight symbols vs the corresponding numeric values.
118Each element has the form:
119 \(SYMBOLIC-VALUE NUMERIC-VALUE ALISE-SYMBOL ...)
120")
118 121
119(defconst font-slant-table 122(defconst font-slant-table
120 '((reverse-oblique 0 ro) 123 '((reverse-oblique 0 ro)
@@ -122,7 +125,8 @@ REGISTRY, ALTERNATIVE1, ALTERNATIVE2, and etc."
122 (normal 100 r) 125 (normal 100 r)
123 (italic 200 i ot) 126 (italic 200 i ot)
124 (oblique 210 o)) 127 (oblique 210 o))
125 "Alist of font slant symbols vs the corresponding numeric values.") 128 "Alist of font slant symbols vs the corresponding numeric values.
129See `font-weight-table' for the detailed format.")
126 130
127(defconst font-width-table 131(defconst font-width-table
128 '((ultra-condensed 50 ultracondensed) 132 '((ultra-condensed 50 ultracondensed)
@@ -134,7 +138,8 @@ REGISTRY, ALTERNATIVE1, ALTERNATIVE2, and etc."
134 (expanded 125) 138 (expanded 125)
135 (extra-expanded 150 extraexpanded) 139 (extra-expanded 150 extraexpanded)
136 (ultra-expanded 200 ultraexpanded wide)) 140 (ultra-expanded 200 ultraexpanded wide))
137 "Alist of font width symbols vs the corresponding numeric values.") 141 "Alist of font width symbols vs the corresponding numeric values.
142See `font-weight-table' for the detailed format.")
138 143
139(internal-set-font-style-table 144(internal-set-font-style-table
140 font-weight-table font-slant-table font-width-table) 145 font-weight-table font-slant-table font-width-table)
diff --git a/src/ChangeLog.fb b/src/ChangeLog.fb
index 863c671a8c8..1474a3811f1 100644
--- a/src/ChangeLog.fb
+++ b/src/ChangeLog.fb
@@ -1,43 +1,98 @@
12008-05-04 Jason Rumney <jasonr@gnu.org> 12008-05-12 Kenichi Handa <handa@m17n.org>
2 2
3 * w32term.c (x_draw_glyph_string): Use underline position and 3 * coding.c (detect_coding_iso_2022): Ignore a coding category that
4 thickness from font. 4 has no corresponding coding system.
5 5
6 * w32font.c (w32font_open_internal): Get Outline metrics if possible. 62008-05-12 Jason Rumney <jasonr@gnu.org>
7 Use them to calculate underline position and thickness.
8 (w32font_open_internal): Use xlfd name as name property.
9 7
102008-05-02 Jason Rumney <jasonr@gnu.org> 8 * font.h (struct font) [WINDOWSNT]: Remove codepage member.
9
10 * w32font.h (w32font_open_internal): Update declaration.
11
12 * w32font.c (w32font_open_internal): Change last argument from
13 w32font_info struct to font object. Fill in font object from
14 font_entity. Get Outline metrics if possible. Use them to
15 calculate underline position and thickness. Use xlfd name as name
16 property. Don't set codepage.
17 (w32font_open): Pass font_object to w32font_open_internal. Don't
18 update dpyinfo->smallest_font_height and
19 dpyinfo->smallest_char_width.
20 (w32font_draw): Use s->font.
21 (clear_cached_metrics): Don't clear non-existent blocks.
11 22
12 * w32term.c (w32_compute_glyph_string_overhangs): Don't compute if 23 * w32term.c (w32_compute_glyph_string_overhangs): Don't compute if
13 font was not found. 24 font was not found.
25 (x_draw_glyph_string): Use underline position and thickness from
26 font.
14 27
152008-05-01 Kenichi Handa <handa@m17n.org> 28 * w32uniscribe.c (uniscribe_open): Pass font_object to
29 w32font_open_internal.
16 30
17 * xrdb.c (x_load_resources): Don't setup a fontset resource. 312008-05-12 Kenichi Handa <handa@m17n.org>
18 32
192008-05-02 Jason Rumney <jasonr@gnu.org> 33 These changes are to delete all legacy font-handling codes, and
34 make Emacs use only font-backends.
20 35
21 * w32font.c (w32font_open_internal): Change last argument from 36 * Makefile.in: Delete USE_FONT_BACKEND conditionals.
22 w32font_info struct to font object. Fill in font object from 37 (frame.o, image.o, print.o): Depend on $(FONTSRC).
23 font_entity.
24 (w32font_open): Pass font_object to w32font_open_internal.
25 38
26 * w32font.h (w32font_open_internal): Update declaration. 39 * makefile.w32-in (WIN32OBJ): Add w32reg.$(O), remove w32bdf.$(O).
27 40
28 * w32uniscribe.c (uniscribe_open): Pass font_object to 41 * charset.h (Vcharset_non_preferred_head)
29 w32font_open_internal. 42 (Vcurrent_iso639_language): Extern them.
30 43
312008-05-01 Jason Rumney <jasonr@gnu.org> 44 * charset.c (Vcharset_non_preferred_head): New variable.
45 (Vcurrent_iso639_language): New variable.
46 (syms_of_charset): Declare it as a Lisp variable.
47 (char_charset): Don't check non preferred charsets. As a last
48 resort, return charset_unicode.
49 (Fset_charset_priority): Update Vcharset_non_preferred_head.
32 50
33 * font.h (struct font) [WINDOWSNT]: Remove codepage member. 51 * composite.c: Throughout the file, delete all USE_FONT_BACKEND
52 conditionals. Don't check enable_font_backend. Delete all codes
53 used only when USE_FONT_BACKEND is not defined.
34 54
35 * w32font.c (w32font_open_internal): Don't set codepage. 55 * dispextern.h (struct glyph_string): Change type of `font' to
56 `struct font *'.
57 (struct glyph_string): New member underline_position and
58 underline_thickness.
59 (enum lface_attribute_index): Remove LFACE_AVGWIDTH_INDEX.
60 (struct face): Change type of `font' to `struct font *'. Remove
61 members `font_name', `font_info_id'.
62 (per_char_metric, encode_char): Delete externs.
63 (calc_pixel_width_or_height): Adjust the prototype.
36 64
37 * w32font.c (w32font_draw): Use s->font. 65 * emacs.c (enable_font_backend): Delete extern.
38 (clear_cached_metrics): Don't clear non-existant blocks. 66 (main): Don't set enable_font_backend. Don't check the command
67 line argument "-disable-font-backend".
39 68
402008-04-30 Kenichi Handa <handa@m17n.org> 69 * font.h (Qfont_spec, Qfont_entity, Qfont_object): Extern them.
70 (enum font_property_index): New members FONT_DPI_INDEX,
71 FONT_SPACING_INDEX, FONT_AVGWIDTH_INDEX, FONT_NAME_INDEX,
72 FONT_FULLNAME_INDEX, FONT_FILE_INDEX, FONT_FORMAT_INDEX,
73 FONT_OBJECT_MAX. Delete FONT_FRAME_INDEX.
74 (FONT_WEIGHT_NUMERIC, FONT_SLANT_NUMERIC, FONT_WIDTH_NUMERIC)
75 (FONT_WEIGHT_SYMBOLIC, FONT_SLANT_SYMBOLIC, FONT_WIDTH_SYMBOLIC)
76 (FONT_WEIGHT_FOR_FACE, FONT_SLANT_FOR_FACE, FONT_WIDTH_FOR_FACE)
77 (FONT_WEIGHT_NAME_NUMERIC, FONT_SLANT_NAME_NUMERIC)
78 (FONT_WIDTH_NAME_NUMERIC, FONT_SET_STYLE): New macros.
79 (struct font_spec, struct font_entity): New structs.
80 (FONT_ENCODING_NOT_DECIDED): Moved from fontset.h.
81 (struct font): Many members from old "struct font_info" moved to
82 here. Members font and entity deleted.
83 (FONT_SPEC_P, FONT_ENTITY_P, FONT_OBJECT_P, FONTP): Modified for
84 the new font-related objects.
85 (CHECK_FONT_SPEC, CHECK_FONT_ENTITY, CHECK_FONT_OBJECT)
86 (CHECK_FONT_GET_OBJECT): Likewise.
87 (XFONT_SPEC, XFONT_ENTITY, XFONT_OBJECT, XSETFONT): New macros.
88 (PT_PER_INCH, POINT_TO_PIXEL, PIXEL_TO_POINT): Moved from font.h.
89 (struct font_driver): New members case_sensitive anc check. Type
90 of the member list and open changed.
91 (enable_font_backend, font_symbolic_weight, font_symbolic_slant)
92 (font_symbolic_width, font_find_object, font_get_spec)
93 (font_set_lface_from_name): Delete extern.
94 (Fcopy_font_spec, Fmerge_font_spec, Ffont_family_list): New
95 EXFUNs.
41 96
42 * font.c: Include <strings.h>. 97 * font.c: Include <strings.h>.
43 (enable_font_backend): Delete it. 98 (enable_font_backend): Delete it.
@@ -111,32 +166,321 @@
111 (syms_of_font): Delete "ifdef USE_FONT_BACKEND". DEFSYM new 166 (syms_of_font): Delete "ifdef USE_FONT_BACKEND". DEFSYM new
112 symboles. 167 symboles.
113 168
1142008-04-28 Kenichi Handa <handa@m17n.org> 169 * fontset.h (struct font_info): Delete it. Most memnbers go to
170 struct font.
171 (FONT_ENCODING_NOT_DECIDED): Moved to font.h.
172 (enum FONT_SPEC_INDEX): Delete it.
173 (font_info, list_fonts_func, load_font_func, query_font_func)
174 (set_frame_fontset_func, find_ccl_program_func)
175 (get_font_repertory_func, new_fontset_from_font_name): Delete
176 externs.
177 (fontset_from_font_name): Extern it.
178 (FS_LOAD_FONT, FONT_INFO_ID, FONT_INFO_FROM_ID)
179 (FONT_INFO_FROM_FACE): Deleted.
180 (face_for_font): Adjust prototype.
115 181
116 * font.h (Qfont_spec, Qfont_entity, Qfont_object): Extern them. 182 * fontset.c: Throughout the file, delete all USE_FONT_BACKEND
117 (enum font_property_index): New members FONT_DPI_INDEX, 183 conditionals. Don't check enable_font_backend. Delete all codes
118 FONT_SPACING_INDEX, FONT_AVGWIDTH_INDEX, FONT_NAME_INDEX, 184 used only when USE_FONT_BACKEND is not defined.
119 FONT_FULLNAME_INDEX, FONT_FILE_INDEX, FONT_FORMAT_INDEX, 185 (get_font_info_func, list_font_func, load_font_func)
120 FONT_OBJECT_MAX. Delete FONT_FRAME_INDEX. 186 (query_font_func, set_frame_fontset_func, find_ccl_program_func)
121 (FONT_WEIGHT_NUMERIC, FONT_SLANT_NUMERIC, FONT_WIDTH_NUMERIC) 187 (get_font_repertory_func): Delete them.
122 (FONT_WEIGHT_SYMBOLIC, FONT_SLANT_SYMBOLIC, FONT_WIDTH_SYMBOLIC) 188 (FONTSET_SPEC, FONT_DEF_NEW, FONT_DEF_SPEC, FONT_DEF_ENCODING)
123 (FONT_WEIGHT_FOR_FACE, FONT_SLANT_FOR_FACE, FONT_WIDTH_FOR_FACE) 189 (FONT_DEF_REPERTORY, RFONT_DEF_FACE, RFONT_DEF_SET_FACE)
124 (FONT_WEIGHT_NAME_NUMERIC, FONT_SLANT_NAME_NUMERIC) 190 (RFONT_DEF_FONT_DEF, RFONT_DEF_SPEC, RFONT_DEF_REPERTORY)
125 (FONT_WIDTH_NAME_NUMERIC, FONT_SET_STYLE): New macros. 191 (RFONT_DEF_OBJECT, RFONT_DEF_SET_OBJECT, RFONT_DEF_SCORE)
126 (struct font_spec, struct font_entity): New structs. 192 (RFONT_DEF_SET_SCORE, RFONT_DEF_NEW): New macros.
127 (FONT_ENCODING_NOT_DECIDED): Moved from fontset.h. 193 (fontset_compare_rfontdef): New function.
128 (struct font): Many members from old "struct font_info" moved to 194 (reorder_font_vector): Remove the argument CHARSET-ID. Sort
129 here. Members font and entity deleted. 195 ront-defs by qsort. Adjusted for the change of font-group vector.
130 (FONT_SPEC_P, FONT_ENTITY_P, FONT_OBJECT_P, FONTP): Modified for 196 (load_font_get_repertory): Deleted.
131 the new font-related objects. 197 (fontset_find_font): Use new macros to ref/set elements of
132 (CHECK_FONT_SPEC, CHECK_FONT_ENTITY, CHECK_FONT_OBJECT) 198 font-def and rfont-def.
133 (CHECK_FONT_GET_OBJECT): Likewise. 199 (fontset_font): Fix the timing of remembering that no font for C.
134 (XFONT_SPEC, XFONT_ENTITY, XFONT_OBJECT, XSETFONT): New macros. 200 (free_face_fontset): Do nothing if the face has no fontset.
135 (PT_PER_INCH, POINT_TO_PIXEL, PIXEL_TO_POINT): Moved from font.h. 201 (face_suitable_for_char_p): Use new macros to ref/set elements of
136 (struct font_driver): New members case_sensitive anc check. Type 202 rfont-def.
137 of the member open changed. 203 (face_for_char): Likewise. Call face_for_char with font_object.
138 (enable_font_backend, font_symbolic_weight, font_symbolic_slant) 204 (fs_load_font): Delete. Delete #pragma surrounding it.
139 (font_symbolic_width, font_find_object, font_get_spec) 205 (fs_query_fontset): Use strcasecmp instead of strcmp.
140 (font_set_lface_from_name): Delete extern. 206 (generate_ascii_font_name): Adjusted for the format change of
141 (Fcopy_font_spec, Fmerge_font_spec, Ffont_family_list): New 207 font-spec.
142 EXFUNs. 208 (Fset_fontset_font): Likewise. Use new macros to set elements of
209 font-def.
210 (Fnew_fontset): Use font_unparse_xlfd to generate
211 FONTSET_ASCII (fontset).
212 (new_fontset_from_font_name): Deleted.
213 (fontset_from_font): Renamed from new_fontset_from_font. Check if
214 a fontset is already created for the font. FIx updating of
215 Vfontset_alias_alist.
216 (fontset_ascii_font): Deleted.
217 (Ffont_info): Adjusted for the format change of font-spec.
218 (Finternal_char_font): Likewise.
219 (Ffontset_info): Likewise.
220 (syms_of_fontset): Don't check load_font_func.
221
222 * fns.c (internal_equal): Handle PREV_FONT.
223
224 * frame.h: Delete USE_FONT_BACKEND conditional.
225
226 * ftfont.c (ftfont_pattern_entity): Argument FRAME removed. Make
227 a font-entity by font_make_entity. Use font_intern_prop instead
228 of intern_downcase. Use FONT_SET_STYLE to set a style-related
229 font property. If a font is scalable, set avgwidth property to 0.
230 Set font-entity property by font_put_extra.
231 (ftfont_list_generic_family): Argument SPEC and REGISTRY removed.
232 (ffont_driver): Adjusted for the change of struct font_driver.
233 (ftfont_spec_pattern): New function.
234 (ftfont_list): Return a list, not vector.
235 (ftfont_match): Use ftfont_spec_pattern to get a pattern.
236 (ftfont_list_family): Don't downcase names.
237 (ftfont_free_entity): Deleted.
238 (ftfont_open): Return a font-ojbect. Adjusted for the change of
239 struct font. Get underline_thickness and underline_position from
240 font property. Don't update dpyinfo->smallest_font_height and
241 dpyinfo->smallest_char_width.
242 (ftfont_close): Don't free `struct font'.
243 (ftfont_has_char): Adjusted for the format change of font-entity.
244 (ftfont_encode_char, ftfont_text_extents): Likewise.
245
246 * ftxfont.c (ftxfont_list): Return a list, not vector.
247 (ftxfont_open): Return a font-ojbect. Adjusted for the change of
248 struct font. Get underline_thickness and underline_position from
249 font property. Don't update dpyinfo->smallest_font_height and
250 dpyinfo->smallest_char_width.
251 (ftxfont_close): Don't decrese FRAME_X_DISPLAY_INFO (f)->n_fonts.
252 (ftxfont_draw): Adjusted for the change of struct font.
253
254 * frame.c: Throughout the file, delete all USE_FONT_BACKEND
255 conditionals. Don't check enable_font_backend. Delete all codes
256 used only when USE_FONT_BACKEND is not defined.
257 (x_set_font): Call x_new_font, not x_new_fontset2.
258 (x_set_font_backend): Use FRAME_FONT macro to check if a font is
259 already set for the frame.
260
261 * image.c (image_ascent): Don't include "charset.h". Include
262 "character.h" and "font.h".
263
264 * lisp.h (enum pvec_type): New member PREV_FONT.
265 (Fassoc_string): EXFUN it.
266
267 * print.c: Include font.h.
268 (print_object): Handle font-related objects.
269
270 * xdisp.c: Throughout the file, delete all USE_FONT_BACKEND
271 conditionals. Don't check enable_font_backend. Delete all codes
272 used only when USE_FONT_BACKEND is not defined.
273 (handle_auto_composed_prop): Do nothing if it->f is not on a
274 window system. Check how many following characters can be
275 displayed by the same font.
276 (calc_pixel_width_or_height): Type of the 4th arg is changed to
277 'struct font *'.
278 (get_char_face_and_encoding): Assign the whole encoding task to
279 the `encode-char' method of a font driver.
280 (fill_composite_glyph_string): Adjusted for the change of `struct
281 face' and `struct glyph_string'.
282 (fill_glyph_string): Likewise.
283 (get_per_char_metric): Arguments changed.
284 (x_get_glyph_overhangs): Adjusted for the change of `struct face'
285 and `struct glyph_string'.
286 (produce_stretch_glyph, calc_line_height_property)
287 (x_produce_glyphs): Likewise.
288
289 * xfaces.c: Throughout the file, delete all USE_FONT_BACKEND
290 conditionals. Don't check enable_font_backend. Delete all codes
291 used only when USE_FONT_BACKEND is not defined. Use
292 FONT_XXX_NAME_NUMERIC instead of face_numeric_xxx.
293 (QCfoundry, QCadstyle, QCregistry, QCspacing, QCsize, QCavgwidth)
294 (Qp): Extern them.
295 (clear_font_table, load_face_font, xlfd_lookup_field_contents):
296 Deleted.
297 (struct font_name): Deleted.
298 (xlfd_numeric_value, xlfd_symbolic_value): Deleted.
299 (compare_fonts_by_sort_order): New function.
300 (xlfd_numeric_slant, xlfd_symbolic_slant, xlfd_numeric_weight)
301 (xlfd_symbolic_weight, xlfd_numeric_swidth, xlfd_symbolic_swidth):
302 Deleted.
303 (Fx_family_fonts): Use font_list_entities, and sort fonts by
304 compare_fonts_by_sort_order.
305 (Fx_font_family_list): Call Ffont_family_list.
306 (face_numeric_value, face_numeric_weight, face_numeric_slant)
307 (face_numeric_swidth, face_symbolic_value, face_symbolic_weight)
308 (face_symbolic_slant, face_symbolic_swidth)
309 (split_font_name_into_vector, build_font_name_from_vector)
310 (xlfd_fixed_p, xlfd_point_size, pixel_point_size)
311 (font_rescale_ratio, split_font_name, build_font_name)
312 (free_font_names, sort_fonts, x_face_list_fonts)
313 (face_font_available_p, sorted_font_list, cmp_font_names)
314 (font_list_1, concat_font_list, font_list, remove_duplicates):
315 Deleted.
316 (Fx_list_fonts): Use Ffont_list.
317 (LFACE_AVGWIDTH): Deleted.
318 (check_lface_attrs): Don't check LFACE_AVGWIDTH. Check LFACE_FONT
319 by FONTP.
320 (lface_fully_specified_p): Don't check LFACE_AVGWIDTH.
321 (set_lface_from_font_name): Delete it.
322 (set_lface_from_font): Renamed from
323 set_lface_from_font_and_fontset. Caller changed. Don't set
324 LFACE_AVGWIDTH. Use FONT_XXX_FOR_FACE to get a symbol suitable
325 for face.
326 (merge_face_vectors): Copy font-spec if necessary. Clear
327 properties of the font-spec if necessary.
328 (merge_face_ref): Clear properties of the font-spec if necessary.
329 (Finternal_set_lisp_face_attribute): Likewise.
330 (set_font_frame_param): Use font_load_for_lface to load a
331 font-object, and call Fmodify_frame_parameters with it.
332 (x_update_menu_appearance): Don't check LFACE_AVGWIDTH. Get XLFD
333 font name by Ffont_xlfd_name.
334 (Finternal_lisp_face_attribute_values): Don't check QCweight,
335 QCslant, and QCwidth.
336 (Fface_font): Get a font name from font->props[FONT_NAME_INDEX].
337 (lface_same_font_attributes_p): Don't check LFACE_AVGWIDTH.
338 Compare fonts by EQ.
339 (lookup_non_ascii_face): Deleted.
340 (face_for_font): The 2nd argument changed.
341 (x_supports_face_attributes_p): Don't check LFACE_AVGWIDTH. Check
342 atomic font properties by case insensitive.
343 (realize_non_ascii_face): Set face->overstrike correctly.
344 (realize_x_face): Likewise. Check if LFACE_FONT is a font_object.
345 (dump_realized_face): Get font name from
346 font->props[FONT_NAME_INDEX]. Don't print font_info_id.
347
348 * xfns.c: Throughout the file, delete all USE_FONT_BACKEND
349 conditionals. Don't check enable_font_backend. Delete all codes
350 used only when USE_FONT_BACKEND is not defined.
351 (xic_create_xfontset): Original code deleted and renamed from
352 xic_create_xfontset2. Use FRAME_FONT, not FRAME_FONT_OBJECT.
353 (x_make_gc): Don't set GCFont in GCs.
354 (Fx_create_frame) [USE_LUCID]: Set xlwmenu_default_font to a font
355 opened by "fixed".
356 (syms_of_xfns): Don't set get_font_info_func, load_font_func,
357 find_ccl_program_func, query_font_func, set_frame_fontset_func,
358 get_font_repertory_func.
359
360 * xfont.c: Include <stdlib.h> and "ccl.h".
361 (struct xfont_info): New structure.
362 (xfont_query_font): Deleted.
363 (xfont_find_ccl_program): Renamed from x_find_ccl_program and
364 moved from xterm.c.
365 (xfont_driver): Adjusted for the change of struct font_driver.
366 (compare_font_names): New function.
367 (xfont_list_pattern): Sort font names case insensitively. Make
368 font_entity by calling font_make_entity. Avoid auto-scaled fonts.
369 (xfont_list): Return a list, not vector.
370 (xfont_match): If the font doesn't have QCname property, generate
371 a name from the other font properties.
372 (xfont_open): Return a font-ojbect. Adjusted for the change of
373 struct font. Get underline_thickness and underline_position from
374 font property. Don't update dpyinfo->smallest_font_height and
375 dpyinfo->smallest_char_width.
376 (xfont_close): Don't free struct font.
377 (xfont_prepare_face): Adjusted for the change of struct font.
378 (xfont_done_face): Deleted.
379 (xfont_has_char): Adjusted for the change of struct font.
380 (xfont_encode_char, xfont_draw): Likewise.
381 (xfont_check): New function.
382
383 * xftfont.c (xftfont_list): Adjusted for the change of `list'
384 callback function.
385 (xftfont_match): Adjusted for the fontmat change of font-entity.
386 (xftfont_open): Adjusted for the format change of font-entity and
387 font-object. Adjusted for the change of struct font. Return a
388 font-object. Don't update dpyinfo->smallest_font_height and
389 dpyinfo->smallest_char_width.
390 (xftfont_close): Block input while calling XftFontClose.
391 (xftfont_prepare_face): Don't block input while calling
392 xftfont_get_colors. Adjusted for the change of struct font.
393 (xftfont_shape): Return value of error case fixed.
394
395 * xrdb.c (x_load_resources): Don't setup a fontset resource.
396
397 * xterm.h: Throughout the file, delete all USE_FONT_BACKEND
398 conditionals.
399 (FONT_WIDTH): Return (f)->max_width.
400 (struct x_display_info): Delete member `font'.
401 (x_list_fonts, x_get_font_info, x_load_font, x_query_font)
402 (x_find_ccl_program, x_get_font_repertory): Delete externs.
403 (struct x_output): Change type of `font' to `struct font *'.
404
405 * xterm.c: Throughout the file, delete all USE_FONT_BACKEND
406 conditionals. Don't check enable_font_backend. Delete all codes
407 used only when USE_FONT_BACKEND is not defined. Don't include
408 ccl.h.
409 (x_per_char_metric, x_encode_char): Deleted.
410 (x_set_cursor_gc, x_set_mouse_face_gc): Don't set GCFont.
411 (x_compute_glyph_string_overhangs): Adjusted for the change of
412 `struct face'
413 (x_draw_glyph_string_foreground)
414 (x_draw_composite_glyph_string_foreground): Likewise.
415 (x_draw_glyph_string): Likewise. Use font->underline_position and
416 font->underline_thickness.
417 (x_new_font): Renamed from x_new_fontset2.
418 (x_new_fontset, x_get_font_info, x_list_fonts): Deleted.
419 (x_check_font): Call `check' method of a font driver.
420 (x_font_min_bounds, x_compute_min_glyph_bounds, x_load_font)
421 (x_query_font, x_get_font_repertory): Deleted.
422 (x_find_ccl_program): Renamed and moved to xfont.c.
423 (x_redisplay_interface): Adjusted for the change of `struct
424 redisplay_interface'.
425
426 * w32fns.c: Throughout the file, delete all USE_FONT_BACKEND
427 conditionals. Don't check enable_font_backend. Delete all codes
428 used only when USE_FONT_BACKEND is not defined. Surround non-used
429 code by "#ifdef OLD_FONT" and "endif".
430 (Fw32_select_font): Use FONT_COMPAT to get old font structure.
431
432 * w32font.h (struct w32font_info): New member.
433 (FONT_COMPAT): New macro.
434 (w32font_open_internal): Prototype adjusted.
435
436 * w32gui.h (XGCValues): Surround `XFontStruct *font' by "if
437 OLD_FONT" and "endif".
438
439 * w32font.c: Throughout the file, delete all USE_FONT_BACKEND
440 conditionals. Don't check enable_font_backend. Delete all codes
441 used only when USE_FONT_BACKEND is not defined.
442 (w32font_open): Return a font-object. Make a font-object by
443 font_make_object. Adjusted for the change of struct w32font_info.
444 (w32font_close): Don't free struct font. Adjusted for the change
445 of struct w32font_info.
446 (w32font_encode_char, w32font_text_extents, w32font_draw):
447 Adjusted for the change of struct w32font_info.
448 (w32font_draw): Likewise.
449 (w32font_list_internal): Return a list, not vector.
450 (w32font_open_internal): Change the 4th arg to font-object.
451 Adjusted for the change of struct w32font_info and font-object
452 format.
453 (add_font_name_to_list): Don't downcase names.
454 (w32_enumfont_pattern_entity): Make a font-entity by
455 font_make_entity. Adjusted for the format change of font-entity.
456 Use FONT_SET_STYLE to set a style-related font property. If a
457 font is scalable, set avgwidth property to 0. Set font-entity
458 property by font_put_extra.
459 (font_matches_spec): Adjusted for the format change of
460 font-entity.
461 (w32_weight_table, w32_decode_weight): New variables.
462 (w32_encode_weight): New function.
463 (fill_in_logfont): Adjusted for the format change of font-spec.
464 (w32font_full_name): Use FONT_WEIGHT_SYMBOLIC to get a symbol
465 weight value.
466 (w32font_driver): Adjusted for the change of struct font_driver.
467
468 * w32term.h: Throughout the file, delete all USE_FONT_BACKEND
469 conditionals. Don't check enable_font_backend. Surround non-used
470 code by "#ifdef OLD_FONT" and "endif".
471 (FONT_WIDTH, FONT_HEIGHT, FONT_BASE, FONT_DESCENT)
472 (FONT_AVG_WIDTH): Adjusted for the change of struct font.
473
474 * w32term.c: Throughout the file, delete all USE_FONT_BACKEND
475 conditionals. Don't check enable_font_backend. Delete all codes
476 used only when USE_FONT_BACKEND is not defined. Surround non-used
477 code by "#ifdef OLD_FONT" and "endif".
478
479 * w32uniscribe.c: Delete USE_FONT_BACKEND conditional.
480 (uniscribe_open): Return value changed to font-object. Adjusted
481 for the format change of font-object.
482 (uniscribe_otf_capability): Adjusted for the change of struct
483 font.
484 (add_opentype_font_name_to_list): Don't downcase names.
485 (uniscribe_font_driver): Adjusted for the change of struct
486 font_driver.
diff --git a/src/Makefile.in b/src/Makefile.in
index b048ef18284..20531addf08 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -1080,7 +1080,7 @@ filelock.o: filelock.c buffer.h character.h charset.h coding.h systime.h \
1080 epaths.h $(config_h) 1080 epaths.h $(config_h)
1081filemode.o: filemode.c $(config_h) 1081filemode.o: filemode.c $(config_h)
1082frame.o: frame.c xterm.h window.h frame.h termhooks.h commands.h keyboard.h \ 1082frame.o: frame.c xterm.h window.h frame.h termhooks.h commands.h keyboard.h \
1083 blockinput.h atimer.h systime.h buffer.h character.h fontset.h font.h \ 1083 blockinput.h atimer.h systime.h buffer.h character.h fontset.h $(FONTSRC) \
1084 msdos.h dosfns.h dispextern.h w32term.h macterm.h termchar.h $(config_h) 1084 msdos.h dosfns.h dispextern.h w32term.h macterm.h termchar.h $(config_h)
1085fringe.o: fringe.c dispextern.h frame.h window.h buffer.h termhooks.h $(config_h) 1085fringe.o: fringe.c dispextern.h frame.h window.h buffer.h termhooks.h $(config_h)
1086font.o: font.c dispextern.h frame.h window.h ccl.h character.h charset.h \ 1086font.o: font.c dispextern.h frame.h window.h ccl.h character.h charset.h \
diff --git a/src/emacs.c b/src/emacs.c
index e24a0fe2553..7074076cf66 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -1423,10 +1423,6 @@ main (argc, argv
1423 no_loadup 1423 no_loadup
1424 = argmatch (argv, argc, "-nl", "--no-loadup", 6, NULL, &skip_args); 1424 = argmatch (argv, argc, "-nl", "--no-loadup", 6, NULL, &skip_args);
1425 1425
1426 if (argmatch (argv, argc, "-disable-font-backend", "--disable-font-backend",
1427 4, NULL, &skip_args))
1428 ;
1429
1430#ifdef HAVE_X_WINDOWS 1426#ifdef HAVE_X_WINDOWS
1431 /* Stupid kludge to catch command-line display spec. We can't 1427 /* Stupid kludge to catch command-line display spec. We can't
1432 handle this argument entirely in window system dependent code 1428 handle this argument entirely in window system dependent code
diff --git a/src/fontset.c b/src/fontset.c
index 3625028a7da..80d4ea7780b 100644
--- a/src/fontset.c
+++ b/src/fontset.c
@@ -26,7 +26,7 @@ along with GNU Emacs; see the file COPYING. If not, write to
26the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 26the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
27Boston, MA 02110-1301, USA. */ 27Boston, MA 02110-1301, USA. */
28 28
29#define FONTSET_DEBUG 29/* #define FONTSET_DEBUG */
30 30
31#include <config.h> 31#include <config.h>
32 32
@@ -626,7 +626,7 @@ fontset_find_font (fontset, c, face, id, fallback)
626 626
627#if 0 627#if 0
628 /* The following code makes Emacs to find a font for C by fairly 628 /* The following code makes Emacs to find a font for C by fairly
629 exhausitive search. But, that takes long time expecially for 629 exhausitive search. But, that takes long time especially for
630 X font backend. */ 630 X font backend. */
631 631
632 /* Try to find the different font maching with the current spec 632 /* Try to find the different font maching with the current spec
diff --git a/src/xdisp.c b/src/xdisp.c
index e3ecc6236bc..7bccdc10520 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -4571,7 +4571,7 @@ handle_auto_composed_prop (it)
4571{ 4571{
4572 enum prop_handled handled = HANDLED_NORMALLY; 4572 enum prop_handled handled = HANDLED_NORMALLY;
4573 4573
4574 if (FUNCTIONP (Vauto_composition_function)) 4574 if (FRAME_WINDOW_P (it->f) && FUNCTIONP (Vauto_composition_function))
4575 { 4575 {
4576 Lisp_Object val = Qnil; 4576 Lisp_Object val = Qnil;
4577 EMACS_INT pos, limit = -1; 4577 EMACS_INT pos, limit = -1;
diff --git a/src/xfaces.c b/src/xfaces.c
index b861e217fe6..37b8913913c 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -6485,9 +6485,10 @@ dump_realized_face (face)
6485 fprintf (stderr, "background: 0x%lx (%s)\n", 6485 fprintf (stderr, "background: 0x%lx (%s)\n",
6486 face->background, 6486 face->background,
6487 SDATA (face->lface[LFACE_BACKGROUND_INDEX])); 6487 SDATA (face->lface[LFACE_BACKGROUND_INDEX]));
6488 fprintf (stderr, "font_name: %s (%s)\n", 6488 if (face->font)
6489 face->font->full_name, 6489 fprintf (stderr, "font_name: %s (%s)\n",
6490 SDATA (face->lface[LFACE_FAMILY_INDEX])); 6490 SDATA (face->font->props[FONT_NAME_INDEX]),
6491 SDATA (face->lface[LFACE_FAMILY_INDEX]));
6491#ifdef HAVE_X_WINDOWS 6492#ifdef HAVE_X_WINDOWS
6492 fprintf (stderr, "font = %p\n", face->font); 6493 fprintf (stderr, "font = %p\n", face->font);
6493#endif 6494#endif