Eli Zaretskii [Fri, 16 May 2008 11:10:16 +0000 (11:10 +0000)]
frame.c (Fdelete_frame): Don't call font_update_drviers if
HAVE_WINDOW_SYSTEM is not defined.
xfaces.c (merge_face_ref, merge_face_vectors)
(Finternal_set_lisp_face_attribute): Use FONT_*_INDEX only when
HAVE_WINDOW_SYSTEM is defined.
(Fface_font): Fix non-HAVE_WINDOW_SYSTEM case.
Jonathan Yavner [Thu, 15 May 2008 19:24:57 +0000 (19:24 +0000)]
* ses.el (ses-goto-print): Use move-to-column rather than
forward-char.
(ses-print-cell): Use string-width, truncate-string-to-width,
delete-region rather than length, substring, delete-char.
(ses-setup): Set inhibit-point-motion-hooks to t. Calculate
position by actually moving point rather than just using unibyte
character length.
(ses-mode): Set indent-tabs-mode to nil.
(ses-center): Use string-width rather than length.
(ibuffer-assert-ibuffer-mode): New defsubst.
(ibuffer-mark-interactive, ibuffer-set-mark)
(ibuffer-insert-buffer-line, ibuffer-redisplay-current)
(ibuffer-map-lines, ibuffer-switch-format)
(ibuffer-update-title-and-summary)
(ibuffer-redisplay-engine): Use it.
Kenichi Handa [Wed, 14 May 2008 01:56:27 +0000 (01:56 +0000)]
(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.
Kenichi Handa [Wed, 14 May 2008 01:55:46 +0000 (01:55 +0000)]
(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.
Kenichi Handa [Wed, 14 May 2008 01:44:51 +0000 (01:44 +0000)]
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'.
Kenichi Handa [Wed, 14 May 2008 01:43:03 +0000 (01:43 +0000)]
(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.
Kenichi Handa [Wed, 14 May 2008 01:42:33 +0000 (01:42 +0000)]
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.
Kenichi Handa [Wed, 14 May 2008 01:42:09 +0000 (01:42 +0000)]
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.
Kenichi Handa [Wed, 14 May 2008 01:41:52 +0000 (01:41 +0000)]
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.
Kenichi Handa [Wed, 14 May 2008 01:40:23 +0000 (01:40 +0000)]
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.
Kenichi Handa [Wed, 14 May 2008 01:34:57 +0000 (01:34 +0000)]
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.
Kenichi Handa [Wed, 14 May 2008 01:34:02 +0000 (01:34 +0000)]
(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.
Kenichi Handa [Wed, 14 May 2008 01:28:01 +0000 (01:28 +0000)]
(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.