Kenichi Handa [Tue, 1 Aug 2006 01:28:43 +0000 (01:28 +0000)]
(font_parse_fcname): Don't change :name property of FONT.
(font_parse_name): Likewise.
(LGSTRING_HEADER_SIZE, LGSTRING_GLYPH_SIZE, check_gstring): Define
them unconditionally.
(font_matching_entity): New function.
(font_open_by_name): Try font_matching_entity if exact match is
not found.
(font_update_drivers): Delete the arg FONT. Return a list of
actually used backends. Don't free faces, font caches here.
Don't store data in frame parameters. Don't call x_set_font.
(Ffont_spec): Store :name property as is.
(Ffont_get): Check HAVE_LIBOTF before calling font_otf_capability.
(Ffont_otf_gsub): Call font->driver->otf_gsub instead of
font_otf_gsub.
(Ffont_otf_gpos): Call font->driver->otf_gpos instead of
font_otf_gpos.
(Ffont_otf_alternates): Check if the driver has otf_gsub function.
Call font->driver->otf_gsub instead of font_otf_gsub.
(font_otf_capability): Fix handling of the default
langsys.
(parse_gsub_gpos_spec): Type changed to void. New arg nbytes.
Check the contents of SPEC.
(LGSTRING_HEADER_SIZE, LGSTRING_GLYPH_SIZE): New macros.
(check_gstring): New function.
(REPLACEMENT_CHARACTER): New macro.
(font_otf_gsub): New arg alternate_subst. Be sure to set all
glyph codes of GSTRING.
(font_otf_gpos): Be sure to set all glyph codes of GSTRING.
(font_prepare_composition): Set cmp->glyph_len.
(font_open_entity): Set font->scalable.
(Ffont_get): Handle :otf property.
(Ffont_otf_gsub, Ffont_otf_gpos, Ffont_otf_alternates): New
functions.
(Fquery_font): Use font->font.full_name.
(syms_of_font): Defsubr Sfont_otf_gsub, Sfont_otf_gpos, and
Sfont_otf_alternates.
(ftxfont_create_gcs): New function.
(ftxfont_draw_bitmap): Fix arg to ftfont_driver.get_bitmap.
(ftxfont_draw_backgrond): Fix filling region.
(ftxfont_default_fid): New function.
(ftxfont_open): Set xfotn->fid to the return value of
ftxfont_default_fid.
(ftxfont_prepare_face): Use ftxfont_create_gcs to create GCs.
(ftxfont_done_face): Free only GCs that are created by
ftxfont_create_gcs.
(ftxfont_draw): If face->gc != s->gc, create proper GCs.
(LGLYPH_FROM, LGLYPH_TO, LGLYPH_SET_FROM)
(LGLYPH_SET_TO): New macros.
(LGLYPH_XOFF, LGLYPH_YOFF, LGLYPH_WADJUST): Check if adjustment
element of G is vector or not.
(font_at): Extern it.
Include window.h.
(font_lispy_object): New function.
(font_prepare_composition): Check LGLYPH_FORM (g) to detect the
end of valid glyph.
(font_close_object): Fix getting (struct font *).
(font_at): New function.
(Ffont_get): If FONT is a font-object, get entity from it.
(Ffont_make_gstring): Initialize elements of glyphs with nil.
(Ffont_fill_gstring): Use macro LGSTRING_XXX and LGLYPH_XXX. Fix
range check.
(Ffont_at): New function.
(syms_of_font): Defsubr Sfont_at.
(it_props): Move the entry for Qauto_composed to just
before the entry for Qcompostion.
(handle_auto_composed_prop): Call auto-composition-function with 4
args.
(handle_composition_prop) [USE_FONT_BACKEND]: Set it->face_id from
the font in gstring.
(fill_composite_glyph_string): Check LGLYPH_FORM (g) to detect the
end of valid glyph.
(x_produce_glyphs): Don't update it->face_id if we are composing
with gstring.
Kim F. Storm [Tue, 18 Jul 2006 13:28:34 +0000 (13:28 +0000)]
(Fload): Use xsignal2, signal_error.
(end_of_file_error): Use xsignal0, xsignal1.
(read0): Use xsignal1.
(invalid_syntax): New error function marked no-return.
(read_integer, read1, read_list): Use it.
Kim F. Storm [Tue, 18 Jul 2006 13:27:54 +0000 (13:27 +0000)]
(arith_error, range_error, domain_error): Use xsignal2.
(range_error2, domain_error2): Use xsignal3.
(rounding_driver, fmod_float): Use xsignal0.
(float_error): Use xsignal1.
(matherr): Use xsignal.
Kim F. Storm [Tue, 18 Jul 2006 13:27:48 +0000 (13:27 +0000)]
(report_file_error): Use xsignal.
(barf_or_query_if_file_exists, Fcopy_file, Fdelete_file)
(Finsert_file_contents): Use xsignal2.
(syms_of_fileio): Use list2, list3.
Kim F. Storm [Tue, 18 Jul 2006 13:26:38 +0000 (13:26 +0000)]
* eval.c (xsignal): New func. Like Fsignal, but marked no-return.
(xsignal0, xsignal1, xsignal2, xsignal3): New no-return functions.
(signal_error): New no-return function (from xfaces.c).
(Fthrow): Use xsignal2 instead of Fsignal + abort.
(error): Use xsignal1 instead of Fsignal + abort.
(FletX, Flet, grow_specpdl): Use signal_error.
(Feval, Ffuncall, funcall_lambda): Use xsignal1, xsignal2.
* xfaces.c (signal_error): Move to eval.c.
(resolve_face_name): Use xsignal1.
Kim F. Storm [Tue, 18 Jul 2006 13:26:19 +0000 (13:26 +0000)]
(circular_list_error): Use xsignal.
(wrong_type_argument): Use xsignal2. Don't care about return value.
(args_out_of_range, args_out_of_range_3): Use xsignal2, xsignal3.
Remove loop around Fsignal.
(indirect_variable, Fsymbol_value, set_internal, Fdefault_value)
(indirect_function, Findirect_function, Fstring_to_number)
(Fmakunbound, Ffmakunbound, Fsymbol_function, Ffset): Use xsignal1.
(arith_driver, float_arith_driver, Frem, Fmod, arith_error):
Use xsignal0.
(keycode_to_xkeysym): Remove function. All uses now
directly lookup keycode_to_xkeysym_table.
[USE_MAC_TSM] (mac_handle_text_input_event): Don't construct
ASCII_KEYSTROKE_EVENT for non-zero keycode_to_xkeysym_table entries.
(XTread_socket): Use character codes to construct keypad key events.
(mac_initialize_display_info) [MAC_OSX]: Use CGDisplaySamplesPerPixel.
(x_delete_display): Apply 2006-07-04 change for xterm.c.
Stefan Monnier [Mon, 17 Jul 2006 21:26:32 +0000 (21:26 +0000)]
(custom-autoload): Add `noset' argument.
(custom-push-theme): Don't autoload the variable, let callers do it.
(custom-theme-set-variables): Autoload the variable if necessary.