summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>2008-05-12 23:51:28 +0000
committerKenichi Handa <handa@m17n.org>2008-05-12 23:51:28 +0000
commit9bb7c0068c5e1c4cc4d8f25ad6ead6f1747d2c33 (patch)
treee72b068809e08507354f6e461bde5b9935348f2a
parent6010cb23234606e56f28387280b79dedb6a41110 (diff)
downloademacs-old-branches/font-backend.tar.gz
*** 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 @@
+2008-05-12 Kenichi Handa <handa@m17n.org>
+
+ * configure.in: Don't handle --disable-font-backend. Don't print
+ 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 @@
+2008-05-11 Kenichi Handa <handa@m17n.org>
+
+ * language/korean.el ("Korean"): Set `iso639-language'
+ property to `ko'.
+
+ * language/japanese.el ("Japanese"): Set `iso639-language'
+ property to `ja'.
+
+ * language/chinese.el ("Chinese-GB", "Chinese-BIG5")
+ ("Chinese-CNS", "Chinese-EUC-TW", "Chinese-GBK")
+ ("Chinese-GB18030"): Set `iso639-language' property to `zh'.
+
+ * international/mule-cmds.el (set-language-environment): Set
+ current-iso639-language
+
+ * international/fontset.el (setup-default-fontset): For kana, han,
+ hangul, and cjk-misc, move an entry with font-spec at the end.
+ (generate-fontset-menu): Exclue fontset-auto* from the list.
+
+ * composite.el (compose-chars-after): Assume that WINDOW is always
+ non-nil.
+
+ * faces.el (font-weight-table, font-slant-table)
+ (font-swidth-table): Declare them by defconst. Change the format
+ of elements. Call internal-set-font-style-table after their
+ declaration.
+ (face-valid-attribute-values): Call font-family-list. Get values
+ for width, weight, and slant from font-xxx-table.
+
+ * 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 @@
(const :tag "ultracondensed" ultra-condensed)
(const :tag "ultraexpanded" ultra-expanded)
(const :tag "wide" extra-expanded)))
+
(:height
(choice :tag "Height"
: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."
(bold 200)
(extra-bold 205 extrabold)
(ultra-bold 210 ultrabold black))
- "Alist of font weight symbols vs the corresponding numeric values.")
+ "Alist of font weight symbols vs the corresponding numeric values.
+Each element has the form:
+ \(SYMBOLIC-VALUE NUMERIC-VALUE ALISE-SYMBOL ...)
+")
(defconst font-slant-table
'((reverse-oblique 0 ro)
@@ -122,7 +125,8 @@ REGISTRY, ALTERNATIVE1, ALTERNATIVE2, and etc."
(normal 100 r)
(italic 200 i ot)
(oblique 210 o))
- "Alist of font slant symbols vs the corresponding numeric values.")
+ "Alist of font slant symbols vs the corresponding numeric values.
+See `font-weight-table' for the detailed format.")
(defconst font-width-table
'((ultra-condensed 50 ultracondensed)
@@ -134,7 +138,8 @@ REGISTRY, ALTERNATIVE1, ALTERNATIVE2, and etc."
(expanded 125)
(extra-expanded 150 extraexpanded)
(ultra-expanded 200 ultraexpanded wide))
- "Alist of font width symbols vs the corresponding numeric values.")
+ "Alist of font width symbols vs the corresponding numeric values.
+See `font-weight-table' for the detailed format.")
(internal-set-font-style-table
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 @@
-2008-05-04 Jason Rumney <jasonr@gnu.org>
+2008-05-12 Kenichi Handa <handa@m17n.org>
- * w32term.c (x_draw_glyph_string): Use underline position and
- thickness from font.
+ * coding.c (detect_coding_iso_2022): Ignore a coding category that
+ has no corresponding coding system.
- * w32font.c (w32font_open_internal): Get Outline metrics if possible.
- Use them to calculate underline position and thickness.
- (w32font_open_internal): Use xlfd name as name property.
+2008-05-12 Jason Rumney <jasonr@gnu.org>
-2008-05-02 Jason Rumney <jasonr@gnu.org>
+ * font.h (struct font) [WINDOWSNT]: Remove codepage member.
+
+ * w32font.h (w32font_open_internal): Update declaration.
+
+ * w32font.c (w32font_open_internal): Change last argument from
+ w32font_info struct to font object. Fill in font object from
+ font_entity. Get Outline metrics if possible. Use them to
+ calculate underline position and thickness. Use xlfd name as name
+ property. Don't set codepage.
+ (w32font_open): Pass font_object to w32font_open_internal. Don't
+ update dpyinfo->smallest_font_height and
+ dpyinfo->smallest_char_width.
+ (w32font_draw): Use s->font.
+ (clear_cached_metrics): Don't clear non-existent blocks.
* w32term.c (w32_compute_glyph_string_overhangs): Don't compute if
- font was not found.
+ font was not found.
+ (x_draw_glyph_string): Use underline position and thickness from
+ font.
-2008-05-01 Kenichi Handa <handa@m17n.org>
+ * w32uniscribe.c (uniscribe_open): Pass font_object to
+ w32font_open_internal.
- * xrdb.c (x_load_resources): Don't setup a fontset resource.
+2008-05-12 Kenichi Handa <handa@m17n.org>
-2008-05-02 Jason Rumney <jasonr@gnu.org>
+ These changes are to delete all legacy font-handling codes, and
+ make Emacs use only font-backends.
- * w32font.c (w32font_open_internal): Change last argument from
- w32font_info struct to font object. Fill in font object from
- font_entity.
- (w32font_open): Pass font_object to w32font_open_internal.
+ * Makefile.in: Delete USE_FONT_BACKEND conditionals.
+ (frame.o, image.o, print.o): Depend on $(FONTSRC).
- * w32font.h (w32font_open_internal): Update declaration.
+ * makefile.w32-in (WIN32OBJ): Add w32reg.$(O), remove w32bdf.$(O).
- * w32uniscribe.c (uniscribe_open): Pass font_object to
- w32font_open_internal.
+ * charset.h (Vcharset_non_preferred_head)
+ (Vcurrent_iso639_language): Extern them.
-2008-05-01 Jason Rumney <jasonr@gnu.org>
+ * charset.c (Vcharset_non_preferred_head): New variable.
+ (Vcurrent_iso639_language): New variable.
+ (syms_of_charset): Declare it as a Lisp variable.
+ (char_charset): Don't check non preferred charsets. As a last
+ resort, return charset_unicode.
+ (Fset_charset_priority): Update Vcharset_non_preferred_head.
- * font.h (struct font) [WINDOWSNT]: Remove codepage member.
+ * composite.c: Throughout the file, delete all USE_FONT_BACKEND
+ conditionals. Don't check enable_font_backend. Delete all codes
+ used only when USE_FONT_BACKEND is not defined.
- * w32font.c (w32font_open_internal): Don't set codepage.
+ * dispextern.h (struct glyph_string): Change type of `font' to
+ `struct font *'.
+ (struct glyph_string): New member underline_position and
+ underline_thickness.
+ (enum lface_attribute_index): Remove LFACE_AVGWIDTH_INDEX.
+ (struct face): Change type of `font' to `struct font *'. Remove
+ members `font_name', `font_info_id'.
+ (per_char_metric, encode_char): Delete externs.
+ (calc_pixel_width_or_height): Adjust the prototype.
- * w32font.c (w32font_draw): Use s->font.
- (clear_cached_metrics): Don't clear non-existant blocks.
+ * emacs.c (enable_font_backend): Delete extern.
+ (main): Don't set enable_font_backend. Don't check the command
+ line argument "-disable-font-backend".
-2008-04-30 Kenichi Handa <handa@m17n.org>
+ * font.h (Qfont_spec, Qfont_entity, Qfont_object): Extern them.
+ (enum font_property_index): New members FONT_DPI_INDEX,
+ FONT_SPACING_INDEX, FONT_AVGWIDTH_INDEX, FONT_NAME_INDEX,
+ FONT_FULLNAME_INDEX, FONT_FILE_INDEX, FONT_FORMAT_INDEX,
+ FONT_OBJECT_MAX. Delete FONT_FRAME_INDEX.
+ (FONT_WEIGHT_NUMERIC, FONT_SLANT_NUMERIC, FONT_WIDTH_NUMERIC)
+ (FONT_WEIGHT_SYMBOLIC, FONT_SLANT_SYMBOLIC, FONT_WIDTH_SYMBOLIC)
+ (FONT_WEIGHT_FOR_FACE, FONT_SLANT_FOR_FACE, FONT_WIDTH_FOR_FACE)
+ (FONT_WEIGHT_NAME_NUMERIC, FONT_SLANT_NAME_NUMERIC)
+ (FONT_WIDTH_NAME_NUMERIC, FONT_SET_STYLE): New macros.
+ (struct font_spec, struct font_entity): New structs.
+ (FONT_ENCODING_NOT_DECIDED): Moved from fontset.h.
+ (struct font): Many members from old "struct font_info" moved to
+ here. Members font and entity deleted.
+ (FONT_SPEC_P, FONT_ENTITY_P, FONT_OBJECT_P, FONTP): Modified for
+ the new font-related objects.
+ (CHECK_FONT_SPEC, CHECK_FONT_ENTITY, CHECK_FONT_OBJECT)
+ (CHECK_FONT_GET_OBJECT): Likewise.
+ (XFONT_SPEC, XFONT_ENTITY, XFONT_OBJECT, XSETFONT): New macros.
+ (PT_PER_INCH, POINT_TO_PIXEL, PIXEL_TO_POINT): Moved from font.h.
+ (struct font_driver): New members case_sensitive anc check. Type
+ of the member list and open changed.
+ (enable_font_backend, font_symbolic_weight, font_symbolic_slant)
+ (font_symbolic_width, font_find_object, font_get_spec)
+ (font_set_lface_from_name): Delete extern.
+ (Fcopy_font_spec, Fmerge_font_spec, Ffont_family_list): New
+ EXFUNs.
* font.c: Include <strings.h>.
(enable_font_backend): Delete it.
@@ -111,32 +166,321 @@
(syms_of_font): Delete "ifdef USE_FONT_BACKEND". DEFSYM new
symboles.
-2008-04-28 Kenichi Handa <handa@m17n.org>
+ * fontset.h (struct font_info): Delete it. Most memnbers go to
+ struct font.
+ (FONT_ENCODING_NOT_DECIDED): Moved to font.h.
+ (enum FONT_SPEC_INDEX): Delete it.
+ (font_info, list_fonts_func, load_font_func, query_font_func)
+ (set_frame_fontset_func, find_ccl_program_func)
+ (get_font_repertory_func, new_fontset_from_font_name): Delete
+ externs.
+ (fontset_from_font_name): Extern it.
+ (FS_LOAD_FONT, FONT_INFO_ID, FONT_INFO_FROM_ID)
+ (FONT_INFO_FROM_FACE): Deleted.
+ (face_for_font): Adjust prototype.
- * font.h (Qfont_spec, Qfont_entity, Qfont_object): Extern them.
- (enum font_property_index): New members FONT_DPI_INDEX,
- FONT_SPACING_INDEX, FONT_AVGWIDTH_INDEX, FONT_NAME_INDEX,
- FONT_FULLNAME_INDEX, FONT_FILE_INDEX, FONT_FORMAT_INDEX,
- FONT_OBJECT_MAX. Delete FONT_FRAME_INDEX.
- (FONT_WEIGHT_NUMERIC, FONT_SLANT_NUMERIC, FONT_WIDTH_NUMERIC)
- (FONT_WEIGHT_SYMBOLIC, FONT_SLANT_SYMBOLIC, FONT_WIDTH_SYMBOLIC)
- (FONT_WEIGHT_FOR_FACE, FONT_SLANT_FOR_FACE, FONT_WIDTH_FOR_FACE)
- (FONT_WEIGHT_NAME_NUMERIC, FONT_SLANT_NAME_NUMERIC)
- (FONT_WIDTH_NAME_NUMERIC, FONT_SET_STYLE): New macros.
- (struct font_spec, struct font_entity): New structs.
- (FONT_ENCODING_NOT_DECIDED): Moved from fontset.h.
- (struct font): Many members from old "struct font_info" moved to
- here. Members font and entity deleted.
- (FONT_SPEC_P, FONT_ENTITY_P, FONT_OBJECT_P, FONTP): Modified for
- the new font-related objects.
- (CHECK_FONT_SPEC, CHECK_FONT_ENTITY, CHECK_FONT_OBJECT)
- (CHECK_FONT_GET_OBJECT): Likewise.
- (XFONT_SPEC, XFONT_ENTITY, XFONT_OBJECT, XSETFONT): New macros.
- (PT_PER_INCH, POINT_TO_PIXEL, PIXEL_TO_POINT): Moved from font.h.
- (struct font_driver): New members case_sensitive anc check. Type
- of the member open changed.
- (enable_font_backend, font_symbolic_weight, font_symbolic_slant)
- (font_symbolic_width, font_find_object, font_get_spec)
- (font_set_lface_from_name): Delete extern.
- (Fcopy_font_spec, Fmerge_font_spec, Ffont_family_list): New
- EXFUNs.
+ * fontset.c: Throughout the file, delete all USE_FONT_BACKEND
+ conditionals. Don't check enable_font_backend. Delete all codes
+ used only when USE_FONT_BACKEND is not defined.
+ (get_font_info_func, list_font_func, load_font_func)
+ (query_font_func, set_frame_fontset_func, find_ccl_program_func)
+ (get_font_repertory_func): Delete them.
+ (FONTSET_SPEC, FONT_DEF_NEW, FONT_DEF_SPEC, FONT_DEF_ENCODING)
+ (FONT_DEF_REPERTORY, RFONT_DEF_FACE, RFONT_DEF_SET_FACE)
+ (RFONT_DEF_FONT_DEF, RFONT_DEF_SPEC, RFONT_DEF_REPERTORY)
+ (RFONT_DEF_OBJECT, RFONT_DEF_SET_OBJECT, RFONT_DEF_SCORE)
+ (RFONT_DEF_SET_SCORE, RFONT_DEF_NEW): New macros.
+ (fontset_compare_rfontdef): New function.
+ (reorder_font_vector): Remove the argument CHARSET-ID. Sort
+ ront-defs by qsort. Adjusted for the change of font-group vector.
+ (load_font_get_repertory): Deleted.
+ (fontset_find_font): Use new macros to ref/set elements of
+ font-def and rfont-def.
+ (fontset_font): Fix the timing of remembering that no font for C.
+ (free_face_fontset): Do nothing if the face has no fontset.
+ (face_suitable_for_char_p): Use new macros to ref/set elements of
+ rfont-def.
+ (face_for_char): Likewise. Call face_for_char with font_object.
+ (fs_load_font): Delete. Delete #pragma surrounding it.
+ (fs_query_fontset): Use strcasecmp instead of strcmp.
+ (generate_ascii_font_name): Adjusted for the format change of
+ font-spec.
+ (Fset_fontset_font): Likewise. Use new macros to set elements of
+ font-def.
+ (Fnew_fontset): Use font_unparse_xlfd to generate
+ FONTSET_ASCII (fontset).
+ (new_fontset_from_font_name): Deleted.
+ (fontset_from_font): Renamed from new_fontset_from_font. Check if
+ a fontset is already created for the font. FIx updating of
+ Vfontset_alias_alist.
+ (fontset_ascii_font): Deleted.
+ (Ffont_info): Adjusted for the format change of font-spec.
+ (Finternal_char_font): Likewise.
+ (Ffontset_info): Likewise.
+ (syms_of_fontset): Don't check load_font_func.
+
+ * fns.c (internal_equal): Handle PREV_FONT.
+
+ * frame.h: Delete USE_FONT_BACKEND conditional.
+
+ * ftfont.c (ftfont_pattern_entity): Argument FRAME removed. Make
+ a font-entity by font_make_entity. Use font_intern_prop instead
+ of intern_downcase. Use FONT_SET_STYLE to set a style-related
+ font property. If a font is scalable, set avgwidth property to 0.
+ Set font-entity property by font_put_extra.
+ (ftfont_list_generic_family): Argument SPEC and REGISTRY removed.
+ (ffont_driver): Adjusted for the change of struct font_driver.
+ (ftfont_spec_pattern): New function.
+ (ftfont_list): Return a list, not vector.
+ (ftfont_match): Use ftfont_spec_pattern to get a pattern.
+ (ftfont_list_family): Don't downcase names.
+ (ftfont_free_entity): Deleted.
+ (ftfont_open): Return a font-ojbect. Adjusted for the change of
+ struct font. Get underline_thickness and underline_position from
+ font property. Don't update dpyinfo->smallest_font_height and
+ dpyinfo->smallest_char_width.
+ (ftfont_close): Don't free `struct font'.
+ (ftfont_has_char): Adjusted for the format change of font-entity.
+ (ftfont_encode_char, ftfont_text_extents): Likewise.
+
+ * ftxfont.c (ftxfont_list): Return a list, not vector.
+ (ftxfont_open): Return a font-ojbect. Adjusted for the change of
+ struct font. Get underline_thickness and underline_position from
+ font property. Don't update dpyinfo->smallest_font_height and
+ dpyinfo->smallest_char_width.
+ (ftxfont_close): Don't decrese FRAME_X_DISPLAY_INFO (f)->n_fonts.
+ (ftxfont_draw): Adjusted for the change of struct font.
+
+ * frame.c: Throughout the file, delete all USE_FONT_BACKEND
+ conditionals. Don't check enable_font_backend. Delete all codes
+ used only when USE_FONT_BACKEND is not defined.
+ (x_set_font): Call x_new_font, not x_new_fontset2.
+ (x_set_font_backend): Use FRAME_FONT macro to check if a font is
+ already set for the frame.
+
+ * image.c (image_ascent): Don't include "charset.h". Include
+ "character.h" and "font.h".
+
+ * lisp.h (enum pvec_type): New member PREV_FONT.
+ (Fassoc_string): EXFUN it.
+
+ * print.c: Include font.h.
+ (print_object): Handle font-related objects.
+
+ * xdisp.c: Throughout the file, delete all USE_FONT_BACKEND
+ conditionals. Don't check enable_font_backend. Delete all codes
+ used only when USE_FONT_BACKEND is not defined.
+ (handle_auto_composed_prop): Do nothing if it->f is not on a
+ window system. Check how many following characters can be
+ displayed by the same font.
+ (calc_pixel_width_or_height): Type of the 4th arg is changed to
+ 'struct font *'.
+ (get_char_face_and_encoding): Assign the whole encoding task to
+ the `encode-char' method of a font driver.
+ (fill_composite_glyph_string): Adjusted for the change of `struct
+ face' and `struct glyph_string'.
+ (fill_glyph_string): Likewise.
+ (get_per_char_metric): Arguments changed.
+ (x_get_glyph_overhangs): Adjusted for the change of `struct face'
+ and `struct glyph_string'.
+ (produce_stretch_glyph, calc_line_height_property)
+ (x_produce_glyphs): Likewise.
+
+ * xfaces.c: Throughout the file, delete all USE_FONT_BACKEND
+ conditionals. Don't check enable_font_backend. Delete all codes
+ used only when USE_FONT_BACKEND is not defined. Use
+ FONT_XXX_NAME_NUMERIC instead of face_numeric_xxx.
+ (QCfoundry, QCadstyle, QCregistry, QCspacing, QCsize, QCavgwidth)
+ (Qp): Extern them.
+ (clear_font_table, load_face_font, xlfd_lookup_field_contents):
+ Deleted.
+ (struct font_name): Deleted.
+ (xlfd_numeric_value, xlfd_symbolic_value): Deleted.
+ (compare_fonts_by_sort_order): New function.
+ (xlfd_numeric_slant, xlfd_symbolic_slant, xlfd_numeric_weight)
+ (xlfd_symbolic_weight, xlfd_numeric_swidth, xlfd_symbolic_swidth):
+ Deleted.
+ (Fx_family_fonts): Use font_list_entities, and sort fonts by
+ compare_fonts_by_sort_order.
+ (Fx_font_family_list): Call Ffont_family_list.
+ (face_numeric_value, face_numeric_weight, face_numeric_slant)
+ (face_numeric_swidth, face_symbolic_value, face_symbolic_weight)
+ (face_symbolic_slant, face_symbolic_swidth)
+ (split_font_name_into_vector, build_font_name_from_vector)
+ (xlfd_fixed_p, xlfd_point_size, pixel_point_size)
+ (font_rescale_ratio, split_font_name, build_font_name)
+ (free_font_names, sort_fonts, x_face_list_fonts)
+ (face_font_available_p, sorted_font_list, cmp_font_names)
+ (font_list_1, concat_font_list, font_list, remove_duplicates):
+ Deleted.
+ (Fx_list_fonts): Use Ffont_list.
+ (LFACE_AVGWIDTH): Deleted.
+ (check_lface_attrs): Don't check LFACE_AVGWIDTH. Check LFACE_FONT
+ by FONTP.
+ (lface_fully_specified_p): Don't check LFACE_AVGWIDTH.
+ (set_lface_from_font_name): Delete it.
+ (set_lface_from_font): Renamed from
+ set_lface_from_font_and_fontset. Caller changed. Don't set
+ LFACE_AVGWIDTH. Use FONT_XXX_FOR_FACE to get a symbol suitable
+ for face.
+ (merge_face_vectors): Copy font-spec if necessary. Clear
+ properties of the font-spec if necessary.
+ (merge_face_ref): Clear properties of the font-spec if necessary.
+ (Finternal_set_lisp_face_attribute): Likewise.
+ (set_font_frame_param): Use font_load_for_lface to load a
+ font-object, and call Fmodify_frame_parameters with it.
+ (x_update_menu_appearance): Don't check LFACE_AVGWIDTH. Get XLFD
+ font name by Ffont_xlfd_name.
+ (Finternal_lisp_face_attribute_values): Don't check QCweight,
+ QCslant, and QCwidth.
+ (Fface_font): Get a font name from font->props[FONT_NAME_INDEX].
+ (lface_same_font_attributes_p): Don't check LFACE_AVGWIDTH.
+ Compare fonts by EQ.
+ (lookup_non_ascii_face): Deleted.
+ (face_for_font): The 2nd argument changed.
+ (x_supports_face_attributes_p): Don't check LFACE_AVGWIDTH. Check
+ atomic font properties by case insensitive.
+ (realize_non_ascii_face): Set face->overstrike correctly.
+ (realize_x_face): Likewise. Check if LFACE_FONT is a font_object.
+ (dump_realized_face): Get font name from
+ font->props[FONT_NAME_INDEX]. Don't print font_info_id.
+
+ * xfns.c: Throughout the file, delete all USE_FONT_BACKEND
+ conditionals. Don't check enable_font_backend. Delete all codes
+ used only when USE_FONT_BACKEND is not defined.
+ (xic_create_xfontset): Original code deleted and renamed from
+ xic_create_xfontset2. Use FRAME_FONT, not FRAME_FONT_OBJECT.
+ (x_make_gc): Don't set GCFont in GCs.
+ (Fx_create_frame) [USE_LUCID]: Set xlwmenu_default_font to a font
+ opened by "fixed".
+ (syms_of_xfns): Don't set get_font_info_func, load_font_func,
+ find_ccl_program_func, query_font_func, set_frame_fontset_func,
+ get_font_repertory_func.
+
+ * xfont.c: Include <stdlib.h> and "ccl.h".
+ (struct xfont_info): New structure.
+ (xfont_query_font): Deleted.
+ (xfont_find_ccl_program): Renamed from x_find_ccl_program and
+ moved from xterm.c.
+ (xfont_driver): Adjusted for the change of struct font_driver.
+ (compare_font_names): New function.
+ (xfont_list_pattern): Sort font names case insensitively. Make
+ font_entity by calling font_make_entity. Avoid auto-scaled fonts.
+ (xfont_list): Return a list, not vector.
+ (xfont_match): If the font doesn't have QCname property, generate
+ a name from the other font properties.
+ (xfont_open): Return a font-ojbect. Adjusted for the change of
+ struct font. Get underline_thickness and underline_position from
+ font property. Don't update dpyinfo->smallest_font_height and
+ dpyinfo->smallest_char_width.
+ (xfont_close): Don't free struct font.
+ (xfont_prepare_face): Adjusted for the change of struct font.
+ (xfont_done_face): Deleted.
+ (xfont_has_char): Adjusted for the change of struct font.
+ (xfont_encode_char, xfont_draw): Likewise.
+ (xfont_check): New function.
+
+ * xftfont.c (xftfont_list): Adjusted for the change of `list'
+ callback function.
+ (xftfont_match): Adjusted for the fontmat change of font-entity.
+ (xftfont_open): Adjusted for the format change of font-entity and
+ font-object. Adjusted for the change of struct font. Return a
+ font-object. Don't update dpyinfo->smallest_font_height and
+ dpyinfo->smallest_char_width.
+ (xftfont_close): Block input while calling XftFontClose.
+ (xftfont_prepare_face): Don't block input while calling
+ xftfont_get_colors. Adjusted for the change of struct font.
+ (xftfont_shape): Return value of error case fixed.
+
+ * xrdb.c (x_load_resources): Don't setup a fontset resource.
+
+ * xterm.h: Throughout the file, delete all USE_FONT_BACKEND
+ conditionals.
+ (FONT_WIDTH): Return (f)->max_width.
+ (struct x_display_info): Delete member `font'.
+ (x_list_fonts, x_get_font_info, x_load_font, x_query_font)
+ (x_find_ccl_program, x_get_font_repertory): Delete externs.
+ (struct x_output): Change type of `font' to `struct font *'.
+
+ * xterm.c: Throughout the file, delete all USE_FONT_BACKEND
+ conditionals. Don't check enable_font_backend. Delete all codes
+ used only when USE_FONT_BACKEND is not defined. Don't include
+ ccl.h.
+ (x_per_char_metric, x_encode_char): Deleted.
+ (x_set_cursor_gc, x_set_mouse_face_gc): Don't set GCFont.
+ (x_compute_glyph_string_overhangs): Adjusted for the change of
+ `struct face'
+ (x_draw_glyph_string_foreground)
+ (x_draw_composite_glyph_string_foreground): Likewise.
+ (x_draw_glyph_string): Likewise. Use font->underline_position and
+ font->underline_thickness.
+ (x_new_font): Renamed from x_new_fontset2.
+ (x_new_fontset, x_get_font_info, x_list_fonts): Deleted.
+ (x_check_font): Call `check' method of a font driver.
+ (x_font_min_bounds, x_compute_min_glyph_bounds, x_load_font)
+ (x_query_font, x_get_font_repertory): Deleted.
+ (x_find_ccl_program): Renamed and moved to xfont.c.
+ (x_redisplay_interface): Adjusted for the change of `struct
+ redisplay_interface'.
+
+ * w32fns.c: Throughout the file, delete all USE_FONT_BACKEND
+ conditionals. Don't check enable_font_backend. Delete all codes
+ used only when USE_FONT_BACKEND is not defined. Surround non-used
+ code by "#ifdef OLD_FONT" and "endif".
+ (Fw32_select_font): Use FONT_COMPAT to get old font structure.
+
+ * w32font.h (struct w32font_info): New member.
+ (FONT_COMPAT): New macro.
+ (w32font_open_internal): Prototype adjusted.
+
+ * w32gui.h (XGCValues): Surround `XFontStruct *font' by "if
+ OLD_FONT" and "endif".
+
+ * w32font.c: Throughout the file, delete all USE_FONT_BACKEND
+ conditionals. Don't check enable_font_backend. Delete all codes
+ used only when USE_FONT_BACKEND is not defined.
+ (w32font_open): Return a font-object. Make a font-object by
+ font_make_object. Adjusted for the change of struct w32font_info.
+ (w32font_close): Don't free struct font. Adjusted for the change
+ of struct w32font_info.
+ (w32font_encode_char, w32font_text_extents, w32font_draw):
+ Adjusted for the change of struct w32font_info.
+ (w32font_draw): Likewise.
+ (w32font_list_internal): Return a list, not vector.
+ (w32font_open_internal): Change the 4th arg to font-object.
+ Adjusted for the change of struct w32font_info and font-object
+ format.
+ (add_font_name_to_list): Don't downcase names.
+ (w32_enumfont_pattern_entity): Make a font-entity by
+ font_make_entity. Adjusted for the format change of font-entity.
+ Use FONT_SET_STYLE to set a style-related font property. If a
+ font is scalable, set avgwidth property to 0. Set font-entity
+ property by font_put_extra.
+ (font_matches_spec): Adjusted for the format change of
+ font-entity.
+ (w32_weight_table, w32_decode_weight): New variables.
+ (w32_encode_weight): New function.
+ (fill_in_logfont): Adjusted for the format change of font-spec.
+ (w32font_full_name): Use FONT_WEIGHT_SYMBOLIC to get a symbol
+ weight value.
+ (w32font_driver): Adjusted for the change of struct font_driver.
+
+ * w32term.h: Throughout the file, delete all USE_FONT_BACKEND
+ conditionals. Don't check enable_font_backend. Surround non-used
+ code by "#ifdef OLD_FONT" and "endif".
+ (FONT_WIDTH, FONT_HEIGHT, FONT_BASE, FONT_DESCENT)
+ (FONT_AVG_WIDTH): Adjusted for the change of struct font.
+
+ * w32term.c: Throughout the file, delete all USE_FONT_BACKEND
+ conditionals. Don't check enable_font_backend. Delete all codes
+ used only when USE_FONT_BACKEND is not defined. Surround non-used
+ code by "#ifdef OLD_FONT" and "endif".
+
+ * w32uniscribe.c: Delete USE_FONT_BACKEND conditional.
+ (uniscribe_open): Return value changed to font-object. Adjusted
+ for the format change of font-object.
+ (uniscribe_otf_capability): Adjusted for the change of struct
+ font.
+ (add_opentype_font_name_to_list): Don't downcase names.
+ (uniscribe_font_driver): Adjusted for the change of struct
+ 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 \
epaths.h $(config_h)
filemode.o: filemode.c $(config_h)
frame.o: frame.c xterm.h window.h frame.h termhooks.h commands.h keyboard.h \
- blockinput.h atimer.h systime.h buffer.h character.h fontset.h font.h \
+ blockinput.h atimer.h systime.h buffer.h character.h fontset.h $(FONTSRC) \
msdos.h dosfns.h dispextern.h w32term.h macterm.h termchar.h $(config_h)
fringe.o: fringe.c dispextern.h frame.h window.h buffer.h termhooks.h $(config_h)
font.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
no_loadup
= argmatch (argv, argc, "-nl", "--no-loadup", 6, NULL, &skip_args);
- if (argmatch (argv, argc, "-disable-font-backend", "--disable-font-backend",
- 4, NULL, &skip_args))
- ;
-
#ifdef HAVE_X_WINDOWS
/* Stupid kludge to catch command-line display spec. We can't
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
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
-#define FONTSET_DEBUG
+/* #define FONTSET_DEBUG */
#include <config.h>
@@ -626,7 +626,7 @@ fontset_find_font (fontset, c, face, id, fallback)
#if 0
/* The following code makes Emacs to find a font for C by fairly
- exhausitive search. But, that takes long time expecially for
+ exhausitive search. But, that takes long time especially for
X font backend. */
/* 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)
{
enum prop_handled handled = HANDLED_NORMALLY;
- if (FUNCTIONP (Vauto_composition_function))
+ if (FRAME_WINDOW_P (it->f) && FUNCTIONP (Vauto_composition_function))
{
Lisp_Object val = Qnil;
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)
fprintf (stderr, "background: 0x%lx (%s)\n",
face->background,
SDATA (face->lface[LFACE_BACKGROUND_INDEX]));
- fprintf (stderr, "font_name: %s (%s)\n",
- face->font->full_name,
- SDATA (face->lface[LFACE_FAMILY_INDEX]));
+ if (face->font)
+ fprintf (stderr, "font_name: %s (%s)\n",
+ SDATA (face->font->props[FONT_NAME_INDEX]),
+ SDATA (face->lface[LFACE_FAMILY_INDEX]));
#ifdef HAVE_X_WINDOWS
fprintf (stderr, "font = %p\n", face->font);
#endif