ChangeLog 316 KB
Newer Older
Kenichi Handa's avatar
Kenichi Handa committed
1 2 3 4
2008-02-05  Kenichi Handa  <handa@ni.aist.go.jp>

	* coding.c (decode_eol): Pay attention to coding->dst_multibyte.

5 6 7 8 9 10
2008-02-05  Miles Bader  <miles@gnu.org>

	* xfaces.c (get_lface_attributes, merge_named_face)
	(lookup_named_face, lookup_derived_face, realize_named_face):
	Revert 2008-02-01 change by cyd@stupidchicken.com.

11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
2008-02-04  Kenichi Handa  <handa@ni.aist.go.jp>

	* fontset.c (Ffontset_info): Handle the case of inhibitting the
	fallback fonts.
	(Ffontset_info) [USE_FONT_BACKEND]: Fix getting of opened font
	names.

2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>

	* ccl.c (CCL_WRITE_CHAR, CCL_WRITE_MULTIBYTE_CHAR, ccl_driver):
	Cancel previous change.

2008-01-31  Kenichi Handa  <handa@ni.aist.go.jp>

	* ccl.c (CCL_WRITE_CHAR): Increment extra_bytes only when
	ccl->eight_bit_control.  Fix check for buffer overflow.
	(CCL_WRITE_MULTIBYTE_CHAR): Fix check for buffer overflow.
	(ccl_driver): Initialize extra_bytes to 0.

30 31 32 33
2008-02-04  Jason Rumney  <jasonr@gnu.org>

	* w32font.c (w32font_open_internal): Use font_unparse_fcname to
	set full_name.
34
	(w32font_open_internal): Use xmalloc, xrealloc, xfree.
35

Jason Rumney's avatar
Jason Rumney committed
36 37 38 39 40
2008-02-03  Jason Rumney  <jasonr@gnu.org>

	* makefile.w32-in (OBJ1): Include font.o here.
	(FONTOBJ) [USE_FONTBACKEND]: Instead of here.

Jason Rumney's avatar
Jason Rumney committed
41 42
2008-02-02  Jason Rumney  <jasonr@gnu.org>

Jason Rumney's avatar
Jason Rumney committed
43
	* makefile.w32-in (temacs): Bump EMHEAP to 21.
Jason Rumney's avatar
Jason Rumney committed
44

Jason Rumney's avatar
Jason Rumney committed
45 46 47 48 49 50
2008-02-01  Jason Rumney  <jasonr@gnu.org>

	* s/cygwin.h: Define VIRT_ADDR_VARIES.

	* puresize.h [VIRT_ADDR_VARIES]: Don't include CYGWIN in condition.

51 52 53 54 55 56
2008-02-01  Andreas Schwab  <schwab@suse.de>

	* Makefile.in (shortlisp): Update for rename of
	../lisp/language/myanmar.el.
	(lisp): Likewise.

57 58 59 60 61 62 63
2008-02-01  Chong Yidong  <cyd@stupidchicken.com>

	* xfaces.c (get_lface_attributes): Function deleted.
	(merge_named_face, lookup_named_face, lookup_derived_face)
	(realize_named_face): Call lface_from_face_name directly, and use
	the fact that merge_face_vectors does not alter its FROM argument.

64
2008-02-01  Jason Rumney  <jasonr@gnu.org>
65 66 67 68

	* w32term.c (w32_read_socket) <WM_CHAR>: Decode non-Unicode
	input in the default locale. Handle non-Unicode multibyte input.

69
2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
70 71 72 73 74 75 76 77 78 79

	* fontset.c (reorder_font_vector): Exclude nil elements from the
	font group.  Don't try multiple fonts.
	(fontset_font): Adjusted for the above change.
	(Finternal_char_font): Return nil if the found font doesn't
	contain the character ch.

	* Makefile.in (lisp): Add cham.el.
	(shortlisp): Likewise.

80
2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100

	* font.h (FONTP): Make it return 1 also for a font-object.

	* .gdbinit (xfontset): New function.

	* font.c (font_find_for_lface): Check if the character C is
	supported or not only for the first font.

	* fontset.c (reorder_font_vector): Fix typo.
	(fontset_find_font): Don't add a font-spec specifying a script.
	Use 0 (not Qt) for the indication of empty font-group.  Change the
	format of RFONT-DEF.  Return Qt if no font in the font-group
	support the character.
	(fontset_font): Adjusted for the above change.  If no font was
	found the character, remember that.
	(face_for_char): Adjusted for the change of RFONT-DEF.
	(Fset_fontset_font): Allow nil for FONT-SPEC to explicitly specify
	no font for the target.
	(Finternal_char_font): Adjusted for the change of RFONT-DEF.

101
2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
102 103 104 105

	* font.c (font_load_for_face): Handle the case that the font in
	face->lface is a string.

106
2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
107 108 109 110

	* xfaces.c (set_lface_from_font_and_fontset): Set the fontname in
	lface.

111
2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
112 113 114 115 116

	* xfaces.c (Finternal_set_lisp_face_attribute) [USE_FONT_BACKEND]:
	Fix previous change.  If the frame is not on a window system,
	signal an error.

117
2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
118 119 120 121 122 123 124

	* coding.c (decode_coding_object): Adjuste marker positions after
	conversion.
	(encode_coding_object): Likewise.

	* lisp.h (struct Lisp_Marker): New member need_adjustment.

125
2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
126 127 128 129 130 131 132 133 134 135 136 137 138 139

	* font.c (font_find_for_lface): Fix the handling of the return
	value of font_has_char.
	(Ffont_shape_text): Fix previous change.

	* fontset.c (FONTSET_REF_AND_RANGE): Delete it.
	(fontset_ref_and_range): Delete it.
	(fontset_find_font): Call char_table_ref_and_range instead of
	FONTSET_REF_AND_RANGE.
	(make_fontset): Don't setup font groups of Latin here.
	(Fset_fontset_font): Don't overwrite the setting of FONTSET_ASCII.
	(new_fontset_from_font): Make the specified font the default for
	all Latin characters.

140
2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
141 142 143 144

	* xfaces.c (Finternal_set_lisp_face_attribute): Check if the frame
	is on a window system before accessing the fontset of the frame.

145
2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
146 147 148 149 150 151 152 153 154 155 156

	* Makefile.in (lisp): Add kherm.el and myanmar.el.
	(shortlisp): Likewise.

	* ftfont.c (ftfont_driver): Set ftfont_shape in ftfont_driver only
	when both HAVE_M17N_FLT and HAVE_LIBOTF are defined.

	* font.c (Ffont_shape_text): If the font driver doesn't have a
	shaper function, make zero-width glyphs to have at least one-pixel
	width.  Fix setting of `to' field of glyphs.

157
2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
158 159 160 161 162 163 164

	* ftfont.c (ftfont_drive_otf): Fix setting of FROM and TO slots of
	glyphs.

	* font.h (struct font_driver): Docstring of member `shape' is
	improved.

165
2008-02-01  Kenichi Handa  <handa@m17n.org>
166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189

	* composite.c (syms_of_composite): Fix docstring of
	auto-composition-function.

	* font.h (LGLYPH_SIZE): New macro.

	* font.c (Ffont_fill_gstring): Stop filling when a character not
	supported by the font is found.
	(Ffont_shape_text): When a shape callback function returns nil,
	try at most two more times with larger gstring.
	(Ffont_at): Fix getting of w.  Call font_at with correct 5th
	argument.

	* xdisp.c (handle_auto_composed_prop): Change the argument to
	auto-composition-function.

	* ftfont.c (ftfont_encode_char): Use the macro FONT_INVALID_CODE.
	(ftfont_shape_by_flt): If an element of lgstring is nil, make a
	Lispy glyph and store it in the lgstring.

	* xfont.c (xfont_encode_char): Use the macro FONT_INVALID_CODE.

	* xftfont.c (xftfont_encode_char): Use the macro FONT_INVALID_CODE.

190
2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
191 192 193 194 195 196 197 198 199 200 201

	* font.c (Ffont_shape_text): Avoid unnecessary composition.

	* fontset.c (Vfont_encoding_charset_alist): New variable.
	(syms_of_fontset): DEFVAR it.
	(reorder_font_vector): Optimize for the case of no need of
	reordring.
	(fontset_find_font): Likewise.
	(face_for_char): Map the charset property by
	Vfont_encoding_charset_alist.

202
2008-02-01  Jason Rumney  <jasonr@gnu.org>
203 204 205 206 207 208 209 210 211 212

	* w32font.c (logfonts_match): Don't check adstyle here.
	(font_matches_spec): Check here against physical font instead.
	(add_font_entity_to_list): Avoid some substitutions.

	* font.c (font_parse_fcname): Default weight and slant to normal.
	(font_score): Prefer normal fonts if weight or slant unspecified.
	(font_score) [WINDOWSNT]: Scale weight difference down to closer
	match freetype scores.

213
2008-02-01  Jason Rumney  <jasonr@gnu.org>
214 215 216 217 218 219 220 221 222 223 224

	* w32font.c (w32font_text_extents): Don't use the frame stored in the
	font, as it may have been deleted.
	(w32_enumfont_pattern_entity): Map generic family to adstyle using
	most common hyphenless variation.
	(logfonts_match): Check generic family.
	(font_matches_spec): Don't check generic family here.
	(fill_in_logfont): Set generic family based on adstyle.

	* w32font.h (w32font_get_cache): Update declaration.

225
2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251

	* ftfont.c (ftfont_get_cache): Adjust the argument type.

	* frame.c (x_set_font_backend): Don't call Fclear_font_cache.  If
	none of the new drivers are available, call font_update_drviers
	with the old drivers.

	* w32font.c (w32font_get_cache): Adjust the argument type.

	* xfont.c (xfont_get_cache): Adjust the argument type.

	* font.h (struct font_driver): Change argument type of get_cache.

	* xftfont.c (xftfont_start_for_frame): Delete prototype.

	* font.c (Ffont_get): Fix arguments to Fassoc.
	(font_prepare_cache, font_finish_cache, font_get_cache): New
	functions.
	(font_clear_cache): New function.
	(font_list_entities): Use font_get_cache.
	(font_matching_entity): Likewise.
	(font_update_drivers): Call font_clear_cache when finishing a
	driver.

	* fontset.c (fontset_find_font): Fix previous change.

252
2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
253 254 255 256 257 258 259 260 261 262 263 264 265 266

	* xterm.c (x_check_font) [USE_FONT_BACKEND]: Don't access
	dpyinfo->font_table.
	(x_delete_display) [USE_FONT_BACKEND]: Likewise.
	(x_delete_terminal) [USE_FONT_BACKEND]: Likewise

	* font.c (font_at): Handle the case that the arg C is negative.
	Handle the unibyte case.
	(Ffont_at): Call font_at with the arg C -1.

	* xdisp.c (handle_auto_composed_prop): Don't get a character at
	the position here, and call font_at with the arg C -1.  Don't
	check the range of the existing composition at the point.

267
2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
268 269 270 271 272 273 274 275 276 277 278

	* fontset.c (fontset_add): New args charset_id and famliy.  Caller
	changed.
	(load_font_get_repertory): Assume that font_spec is always a
	font-spec object.
	(fontset_find_font): Likewise.
	(Fset_fontset_font): Always store a font-spec object in a fontset.

	* xdisp.c (handle_auto_composed_prop): Use Fget_text_property
	instead of get_property_and_range.

279
2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
280 281 282 283 284 285 286 287 288 289

	* xftfont.c (struct xftfont_info): Delete the member ft_face.
	(xftfont_open): Don't keep locking face.
	(xftfont_close): Don't unlock face.
	(xftfont_anchor_point): Lock and unlock face.
	(xftfont_shape): Likewise.

	* fontset.c (fontset_find_font): Don't prefer a font of
	supplementary charset.

290
2008-02-01  Kenichi Handa  <handa@m17n.org>
291 292 293 294 295 296 297 298

	* ftfont.c (struct OpenTypeSpec): Members script_tag renamed to
	script, langsys_tag renamed to langsys, new member script.
	(OTF_TAG_STR): Terminate by '\0'.
	(ftfont_get_open_type_spec): If :otf prop is is spec, Limit the
	listing to the script specified in that property.  Fix arg to
	OTF_check_features.

299
2008-02-01  Jason Rumney  <jasonr@gnu.org>
300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321

	* w32font.h: New file.

	* w32font.c: Include it.
	(struct w32font_info): Add owning_frame field.  Move to w32font.h.
	(w32font_open): Set owning_frame.
	(w32font_text_extents): Use owning_frame.
	(struct font_callback_data): Add opentype_only field.
	(add_font_entity_to_list): Use it to filter fonts.
	Don't check against full name.
	(w32font_list_internal): New function.
	(w32font_list): Use it.
	(w32font_match_internal): New function.
	(w32font_match): Use it.
	(w32font_open_internal): New function.
	(w32font_open): Use it.
	(w32font_get_cache, w32font_close, w32font_has_char)
	(w32font_encode_char, w32font_text_extents, w32font_draw):
	Make non-static.

	* makefile.w32-in (w32font.o): Depend on w32font.h.

322
2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
323 324 325 326 327 328 329 330 331 332

	* charset.c (Fdefine_charset_internal): Record a supplementary
	charset at the tail of Vcharset_order_list.

	* font.c (Ffont_shape_text): Fix the return value.

	* ftfont.c (OTF_SYM_TAG, OTF_TAG_STR): Fix argument names.

	* xdisp.c (handle_auto_composed_prop): Fix previous change.

333
2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
334 335 336 337 338 339 340 341 342

	* ftfont.c (struct OpenTypeSpec): New struct.
	(OTF_SYM_TAG, OTF_TAG_STR): New macros.
	(ftfont_get_open_type_spec): New function.
	(ftfont_list) [HAVE_LIBOTF]: Check otf-spec property.

	* lread.c (read1): Redo the previous change with checking
	Vpurify_flag.

343
2008-02-01  Jason Rumney  <jasonr@gnu.org>
344 345 346 347

	* w32font.c (add_font_entity_to_list): Compare only the beginning
	of full name.

348
2008-02-01  Kenichi Handa  <handa@m17n.org>
349 350 351 352

	* xdisp.c (handle_auto_composed_prop): Simplify the code.  Never
	return HANDLED_RECOMPUTE_PROPS.

353
2008-02-01  Kenichi Handa  <handa@m17n.org>
354 355 356 357 358 359

	* font.c (font_gstring_produce): Delete it.

	* composite.h (COMPOSITION_METHOD): Handle
	COMPOSITION_WITH_GLYPH_STRING.

360
2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
361 362 363 364 365 366 367

	* xfont.c (Qx): Deleted.
	(syms_of_xfont): Don't initialize Qx.

	* composite.h (enum composition_method): Define
	COMPOSITION_WITH_GLYPH_STRING unconditionally.

368
2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391

	* xfaces.c [HAVE_WINDOW_SYSTEM]: Include "font.h" unconditionally.
	(choose_face_font): Accept new form of font-spec.

	* frame.h (font_driver_list): Declare it unconditionally.
	(struct frame): Define members font_driver_list and font_data_list
	unconditionally.

	* fontset.c: Include "font.h" unconditionally.
	(generate_ascii_font_name): Use font_parse_xlfd and
	font_unparse_xlfd.
	(Fset_fontset_font): Accept a font-spec object.

	* font.c (font_unparse_xlfd): If pixel_size is zero, make the
	PIXEL_SIZE part a wild card.

	* dispextern.h (struct glyph_string): Define members clip and
	num_clips unconditionally.
	(struct face): Define members font_info and extra unconditionally.

	* ftfont.c (ftfont_open): Set members maybe_otf and otf of
	ftfont_info only when HAVE_LIBOTF is defined.

392
2008-02-01  Andreas Schwab  <schwab@suse.de>
393 394 395 396

	* xdisp.c (back_to_previous_visible_line_start): Fix type of beg
	and end.

397
2008-02-01  Jason Rumney  <jasonr@gnu.org>
398 399 400

	* w32font.c (w32font_driver): Add new fields.

401
2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495

	* Makefile.in (ALL_CFLAGS): Add @M17N_FLT_CFLAGS@.
	(FONTSRC, FONTOBJ) [HAVE_WINDOW_SYSTEM]: Set them unconditionally.
	(LIBES): Add @M17N_FLT_CFLAGS@.

	* composite.c (compose_text): Don't treat the new style
	composition specially.

	* emacs.c (main): Call syms_of_font unconditionally.

	* font.h (FONT_ENTITY_NOT_LOADABLE)
	(FONT_ENTITY_SET_NOT_LOADABLE): New macros.
	(LGSTRING_XXXX, LGLYPH_XXX): Adjusted for the change of lispy
	gstring.
	(struct font_driver): New member shape.
	(font_registry_charsets): Extern. it.
	(font_find_for_lface): Prototype adjusted.
	(font_prepare_composition): Likewise.
	(font_otf_capability, font_drive_otf): Delete their externs.

	* font.c [HAVE_M17N_FLT]: Include <m17n-flt.h>.
	(font_charset_alist): Moved from xfont.c and renamed.
	(font_registry_charsets): Likewise.
	(font_prop_validate_otf): New function.
	(font_property_table): Register it for QCotf.
	(DEVICE_DELTA, adjust_anchor, REPLACEMENT_CHARACTER)
	(font_drive_otf): Deleted.
	(font_prepare_composition): New arg F.  Adjusted for the change of
	lispy gstring.
	(font_find_for_lface): New arg C.
	(font_load_for_face): Adjusted for the change of
	font_find_for_lface.
	(Ffont_make_gstring): Adjusted for the change of lispy gstring.
	(Ffont_fill_gstring): Likewise.
	(Ffont_shape_text): New function.
	(Fopen_font): If the font size is not given, use 12-pixel.
	(Ffont_at): New arg STRING.
	(syms_of_font): Initalize font_charset_alist.  Declare
	Ffont_shape_text as a Lisp function.  Call syms_of_XXfont
	conditionally.

	* fontset.c (fontset_find_font) [USE_FONT_BACKEND]: Try multiple
	fonts of the same font-spec.  Change the format of RFONT-DEF.
	(face_for_char): Adjusted for the change of RFONT-DEF.
	(make_fontset_for_ascii_face): Likewise.
	(Finternal_char_font): Likewise.
	(Fset_fontset_font) [USE_FONT_BACKEND]: Handle new format of
	font-spec.

	* ftfont.h: New file.

	* ftfont.c: Don't include Freetype headers.  Include "ftfont.h".
	(struct ftfont_info) [HAVE_LIBOTF]: New members maybe_otf and otf.
	(ftfont_open) [HAVE_LIBOTF]: Initialize the above members.
	(ftfont_driver) [HAVE_LIBOTF, HAVE_M17N_FLT]: Don't set
	font_otf_capability and font_drive_otf, set ftfont_shape.
	(ftfont_list): Adjusted for the change of :otf property value.
	(struct MFLTFontFT) [HAVE_LIBOTF, HAVE_M17N_FLT]: New struct.
	(ftfont_get_glyph_id, ftfont_get_metrics, ftfont_check_otf)
	(adjust_anchor, ftfont_drive_otf, ftfont_shape_by_flt)
	(ftfont_shape) [HAVE_LIBOTF, HAVE_M17N_FLT]: New function.s
	(DEVICE_DELTA) [HAVE_LIBOTF, HAVE_M17N_FLT]: New macro.
	(otf_gstring, gstring, m17n_flt_initialized): New variables.

	* w32term.c (x_draw_composite_glyph_string_foreground): Adjusted
	for the change of lispy gstring.

	* xdisp.c (handle_composition_prop): Adjusted for the change of
	lispy gstring.  Call a function for auto-composition with the
third arg it->window.
	(fill_composite_glyph_string): Adjusted for the change of lispy
	string.
	(x_produce_glyphs): Adjusted for the change of
	font_prepare_compositionl.

	* xfaces.c (set_font_frame_param): Adjusted for the change of
	font_find_for_lface.

	* xfont.c (x_font_charset_alist): Moved to font.c and renamed.
	(xfont_registry_charsets): Likewise.  Caller changed.
	(syms_of_xfont): Don't handle x_font_charset_alist.

	* xftfont.c: Include "ftfont.h".
	(struct xftfont_info) [HAVE_LIBOTF]: New members maybe_otf and
	otf.
	(xftfont_open) [HAVE_LIBOTF]: Initialize the above members.
	(xftfont_close) [HAVE_LIBOTF]: Close otf.
	(xftfont_shape) [HAVE_LIBOTF, HAVE_M17N_FLT]: New function.
	(syms_of_xftfont) [HAVE_LIBOTF, HAVE_M17N_FLT]: Set
	xftfont_driver.shape to xftfont_shape.

	* xterm.c (x_draw_composite_glyph_string_foreground): Adjusted for
	the change of lispy gstring.

496
2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
497 498 499

	* ftxfont.c (ftxfont_end_for_frame): Fix array indexing error.

500
2008-02-01  Jason Rumney  <jasonr@gnu.org>
501 502 503

	* w32font.c (w32font_draw): Fill background manually.

504
2008-02-01  Jason Rumney  <jasonr@gnu.org>
505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520

	* font.c (Qfontp): Remove unused symbol.
	(QCantialias): New symbol.
	(syms_of_font): Define it.
	(font_property_table): Set a validator for QCantialias.

	* w32font.c (CLEARTYPE_QUALITY, CLEARTYPE_NATURAL_QUALITY): Define
	if not already.
	(QCfamily): Share with xfaces.c.
	(Qstandard, Qsubpixel, Qnatural): New symbols.
	(syms_of_w32font): Define them. Don't define QCfamily here.
	(w32_antialias_type, lispy_antialias_type): New functions.
	(w32_enumfont_pattern_entity): New arg requested_font.
	Set antialias parameter if non-default was requested.
	(fill_in_logfont): Fill in lfQuality if :antialias specified.

521
2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
522 523 524

	* lread.c (read1): Undo the previous change.

525
2008-02-01  CHENG Gao  <chenggao@gmail.com>  (tiny change)
526 527 528 529

	* frame.c (Fdelete_frame): Call font_update_drivers only when
	USE_FONT_BACKEND is defined..

530
2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566

	* font.h (struct font_bitmap): New member bits_per_pixel.
	(struct font_driver): New members start_for_frame and end_for_frame.
	(struct font_data_list): New struct.
	(font_put_frame_data, font_get_frame_data): Extern them.

	* frame.h (struct frame): New member font_data_list.

	* font.c (font_update_drivers): Call driver->start_for_frame and
	driver->end_for_frame at proper timings.
	(font_put_frame_data, font_get_frame_data): New functions.
	(Ffont_spec): Add usage in the docstring.

	* frame.c (make_frame): Initialize f->font_data_list to NULL.
	(Fdelete_frame): Call font_update_drivers.

	* xftfont.c (struct xftface_info): Delete the member xft_draw.
	(xftfont_prepare_face): Adjusted for the above change.
	(xftfont_done_face): Likewise.
	(xftfont_get_xft_draw): New function.
	(xftfont_draw): Get XftDraw by xftfont_get_xft_draw.
	(xftfont_end_for_frame): New function.
	(syms_of_xftfont): Set xftfont_driver.end_for_frame.

	* ftxfont.c (ftxfont_get_gcs): Renamed from ftxfont_create_gcs.
	Argument changed.  Cache GCs in the per-frame data.
	(struct ftxfont_frame_data): New struct.
	(ftxfont_draw_bitmap): New arg gc_fore and flush.
	(ftxfont_prepare_face, ftxfont_done_face): Delete them.
	(ftxfont_draw): Get GCs by ftxfont_get_gcs.  Reflect s->clip in
	GCs.
	(ftxfont_end_for_frame): New function.
	(syms_of_ftxfont): Set ftxfont_driver.end_for_frame.

	* ftfont.c (ftfont_get_bitmap): Set bitmap->bits_per_pixel.

567
2008-02-01  Kenichi Handa  <handa@m17n.org>
568 569 570 571 572 573

	* xselect.c (Vselection_coding_system)
	(Vnext_selection_coding_system): Delete them.
	(syms_of_xselect): Don't declare selection-coding-system and
	next-selection-coding-system.  They are declared in select.el.

574
2008-02-01  Jason Rumney  <jasonr@gnu.org>
575 576 577 578 579 580 581 582 583 584 585 586 587 588

	* w32term.h (WM_UNICHAR, UNICODE_NOCHAR): Define if not already.

	* w32fns.c: Include imm.h.
	(get_composition_string_fn, get_ime_context_fn): New optional
	system functions.
	(globals_of_w32fns): Load them from imm32.dll.
	(ignore_ime_char): New flag.
	(w32_wnd_proc): Handle WM_UNICHAR, WM_IME_CHAR and
	WM_IME_ENDCOMPOSITION messages.

	* w32term.c (w32_read_socket) [WM_UNICHAR]: Handle as
	MULTIBYTE_CHAR_KEYSTROKE_EVENT.

589
2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
590 591 592 593 594 595 596 597

	* lread.c (READCHAR): Call readchar with the 2nd arg NULL.
	(READCHAR_REPORT_MULTIBYTE): New macro.
	(readchar): New 2nd arg MULTIBYTE.
	(read1): Use READCHAR_REPORT_MULTIBYTE for the first read.  Make
	symbol's name multibyte according to the multibyteness of the
	source.

598
2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
599 600 601 602

	* xfaces.c (face_for_overlay_string): Call lookup_face with
	correct arguments (fix of synching with the trunk).

603
2008-02-01  Kenichi Handa  <handa@m17n.org>
604 605 606 607 608 609 610 611 612 613

	* font.c (font_prop_validate_symbol): The argument prop_index is
	deleted.
	(font_prop_validate_style, font_prop_validate_non_neg)
	(font_prop_validate_spacing): Likewise.
	(font_property_table): Arguments to validater changed.  Callers
	changed.
	(font_lispy_object): Deleted.
	(font_at): Use font_find_object instead fo font_lispy_object.

614
2008-02-01  Kenichi Handa  <handa@ni.aist.go.jp>
615 616 617 618

	* fileio.c (Fexpand_file_name): Adjust multibyteness of directory
	and file names.

619
2008-02-01  Jason Rumney  <jasonr@gnu.org>
620 621 622 623 624

	* w32font.c (add_font_name_to_list): Avoid vertical fonts.
	(font_matches_spec): Remove debug output.
	(add_font_entity_to_list): Avoid using substituted fonts.

625
2008-02-01  Jason Rumney  <jasonr@gnu.org>
626 627 628 629

	* doc.c (Fsnarf_documentation):
	* Makefile.in (temacs${EXEEXT}, mostlyclean): Undo last change.

630
2008-02-01  Miles Bader  <miles@gnu.org>
631 632 633 634

	* src/dispextern.h (struct glyph_row): Only define "clip" field if
	HAVE_WINDOW_SYSTEM is defined.

635
2008-02-01  Stefan Monnier  <monnier@iro.umontreal.ca>
636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683

	Fix up multi-tty merge.

	* xterm.c (handle_one_xevent): Remove duplicate code and fix up nesting
	and indentation.

	* xfaces.c (free_realized_face, clear_face_gcs):
	Include font_done_for_face in the input_blocked section, just in case.

	* xdisp.c (decode_mode_spec): Use terminal-local coding systems.
	(get_char_face_and_encoding): Undo last change and remove the *other*
	duplicate definition (i.e. keep the one that's better scoped and that
	includes code for the font-backend).

	* terminal.c (create_terminal): Default keyboard_coding to
	`no-conversion' and terminal_coding to `undecided'.

	* lread.c (read1): Use XSETPVECTYPE to set a pseudovector's tag.

	* fontset.c (free_realized_fontsets): Check that the table entry does
	contain a fontset before trying to compare it to `base'.

	* emacs.c (main): Move syms_of_data, syms_of_fileio, syms_of_alloc,
	syms_of_charset, and syms_of_coding earlier because init_window_once
	now needs Vcoding_system_hash_table to be setup.

	* coding.h (default_buffer_file_coding): Remove.

	* coding.c (default_buffer_file_coding): Remove.
	(Fterminal_coding_system, Fkeyboard_coding_system): Use ->id rather
	than ->symbol, and use the terminal-local coding system.
	(syms_of_coding): Don't setup the coding-systems that are not
	terminal-local.
	(Fdefine_coding_system_internal): Use XCAR/XCDR.

	* chartab.c (Fmake_char_table, make_sub_char_table, copy_char_table):
	Use XSETPVECTYPE now that XSETCHAR_TABLE doesn't set the tag anymore.

	* alloc.c (Fmake_char_table, make_sub_char_table): Remove.  They're now
	in chartab.c and were re-added here by mistake.
	(Fpurecopy): Use XSETPVECTYPE after copying a COMPILED pseudovector.

	* doc.c (Fsnarf_documentation):
	* Makefile.in (temacs${EXEEXT}, mostlyclean): Move buildobj.lst from
	src to etc.

	* ChangeLog.10: Add mistakenly removed entry.

684
2008-02-01  Dan Nicolaescu  <dann@ics.uci.edu>
685 686 687

	* Makefile.in (fringe.o, minibuf.o): Fix dependencies.

688
2008-02-01  Miles Bader  <miles@gnu.org>
689 690 691 692

	* xdisp.c (get_char_face_and_encoding): Remove extraneous definition.
	Add extra args to FACE_FOR_CHAR.

693
2008-02-01  Kenichi Handa  <handa@m17n.org>
694 695 696 697 698 699 700 701 702

	* keymap.c (where_is_internal_1): If key is a cons, store the copy
	in sequence.

	* chartab.c (map_sub_char_table): If the range contains just one
	character, call the function with that character even if the depth
	is not 3.
	(map_char_table): Likewise.

703
2008-02-01  Jason Rumney  <jasonr@gnu.org>
704 705 706 707

	* w32font.c (w32font_text_extents): Calculate metrics for the
	whole string.

708
2008-02-01  Jason Rumney  <jasonr@gnu.org>
709 710 711

	* w32xfns.c (get_next_msg): Consolidate WM_PAINT messages.

712
2008-02-01  Jason Rumney  <jasonr@gnu.org>
713 714 715 716 717 718 719 720 721

	* w32term.c (x_set_glyph_string_clipping): Use
	get_glyph_string_clip_rects.
	(x_set_glyph_string_clipping_exactly): Adjusted for the change of
	struct glyph_string.
	(x_draw_glyph_string): Likewise.

	* w32font.c (w32font_draw): Do clipping here.

722
2008-02-01  Kenichi Handa  <handa@m17n.org>
723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742

	* xftfont.c (xftfont_draw): Adjusted for the change of struct
	glyph_string.

	* xterm.c (x_set_glyph_string_clipping): Use
	get_glyph_string_clip_rects.
	(x_set_glyph_string_clipping_exactly): Adjusted for the change of
	struct glyph_string.
	(x_draw_glyph_string): Likewise.

	* xdisp.c (get_glyph_string_clip_rects): Reflect s->row->clip to
	the resulting clip(s}.
	(expose_overlaps): Add arg r.  Callers changed.  Set it ot
	row->clip temporarily.
	(expose_window): Redraw rows overlapping the exposed area.

	* dispextern.h (struct glyph_row): New member clip.
	(struct glyph_string): Delete members clip_x, clip_y, clip_width,
	clip_height, new member clip, and num_clips.

743
2008-02-01  Kenichi Handa  <handa@m17n.org>
744 745 746

	* data.c (Fchar_or_string_p): Fix docstring.

747
2008-02-01  Kenichi Handa  <handa@m17n.org>
748 749 750 751

	* xftfont.c (xftfont_draw): If s->font_info != s->face->font_info,
	create a temporal XftDraw object.

752
2008-02-01  Kenichi Handa  <handa@m17n.org>
753 754 755 756 757 758

	* font.c (Ffontp): Fix docstring.

	* coding.c (detect_coding_iso_2022): Don't treat SI/SO codes as a
	strong evidence of ISO-2022.

759
2008-02-01  Kenichi Handa  <handa@m17n.org>
760 761 762 763

	* abbrev.c (abbrev_check_chars): Use CHAR_TABLE_REF, not
	SYNTAX_ENTRY_FOLLOW_PARENT.

764
2008-02-01  Stefan Monnier  <monnier@iro.umontreal.ca>
765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803

	* fns.c (weak_hash_tables): Rename from Vweak_hash_tables and change
	its type.
	(make_hash_table, copy_hash_table, sweep_weak_hash_tables, init_fns):
	Update to the new type of weak_hash_tables and next_weak.

	* lisp.h (struct Lisp_Hash_Table): Change next_weak from Lisp_Object to
	a plain C pointer to Lisp_Hash_Table.

	* lisp.h (XGCTYPE, GC_HASH_TABLE_P, GC_NILP, GC_NUMBERP, GC_NATNUMP)
	(GC_INTEGERP, GC_SYMBOLP, GC_MISCP, GC_VECTORLIKEP, GC_STRINGP)
	(GC_CONSP, GC_FLOATP, GC_VECTORP, GC_OVERLAYP, GC_MARKERP)
	(GC_INTFWDP, GC_BOOLFWDP, GC_OBJFWDP, GC_BUFFER_OBJFWDP)
	(GC_BUFFER_LOCAL_VALUEP, GC_SOME_BUFFER_LOCAL_VALUEP)
	(GC_KBOARD_OBJFWDP, GC_PSEUDOVECTORP, GC_WINDOW_CONFIGURATIONP)
	(GC_PROCESSP, GC_WINDOWP, GC_SUBRP, GC_COMPILEDP, GC_BUFFERP)
	(GC_SUB_CHAR_TABLE_P, GC_CHAR_TABLE_P, GC_BOOL_VECTOR_P, GC_FRAMEP)
	(GC_EQ): Remove since they've been identical to their non-GC_
	alter-egos ever since the markbit was eradicated.

	* src/alloc.c:
	* src/buffer.c:
	* src/buffer.h:
	* src/data.c:
	* src/fileio.c:
	* src/filelock.c:
	* src/fns.c:
	* src/frame.h:
	* src/lisp.h:
	* src/macterm.c:
	* src/print.c:
	* src/process.c:
	* src/w32fns.c:
	* src/w32menu.c:
	* src/w32term.c:
	* src/xfns.c:
	* src/xmenu.c:
	* src/xterm.c: Replace uses of GC_* macros with the non-GC_ versions.

804
2008-02-01  Kenichi Handa  <handa@m17n.org>
805 806 807 808 809

	* chartab.c (map_sub_char_table): Make it work for the top-level
	char-table.  Fix handling of parent char-table.
	(map_char_table):  Adjust for the above change.

810
2008-02-01  Jason Rumney  <jasonr@gnu.org>
811 812 813

	* w32font.c (Qgdi): Rename from Qw32.

814
2008-02-01  Jason Rumney  <jasonr@gnu.org>
815 816 817

	* w32bdf.c (get_quoted_string): Make function static.

818
2008-02-01  Kenichi Handa  <handa@m17n.org>
819 820 821 822 823

	* xftfont.c (xftfont_open): If one of font's ASCII glyph has
	bigger ascent and descent than those of the font, use them as
	font's ascent and descent.

824
2008-02-01  Kenichi Handa  <handa@m17n.org>
825 826 827 828

	* Makefile.in (${lispsource}international/charprop.el): Move this
	target within "#ifdef HAVE_UNIDATA" and "#endif".

829
2008-02-01  Kenichi Handa  <handa@m17n.org>
830 831 832 833

	* Makefile.in (lisp): Add ${lispsource}language/tai-viet.el.
	(shortlisp): Add ../lisp/language/tai-viet.el.

834
2008-02-01  Ulrich Mueller  <ulm@gentoo.org>  (tiny change)
835 836 837 838

	* Makefile.in (${lispsource}international/charprop.el): Depend on
	temacs${EXEEXT}.

839
2008-02-01  Jason Rumney  <jasonr@gnu.org>
840 841 842 843 844 845 846 847 848 849 850

	* w32font.c (w32font_close): Delete the GDI font object.

	* w32menu.c: Include character.h

	* w32proc.c: Likewise.

	* w32select.c: Likewise.

	* makefile.w32-in (w32proc.o): Depend on character.h

851
2008-02-01  Jason Rumney  <jasonr@gnu.org>
852 853 854 855 856 857 858 859 860 861 862

	* w32fns.c (syms_of_w32fns): Use DEFSYM macro.

	* w32menu.c (syms_of_w32menu): Likewise.

	* w32proc.c (syms_of_ntproc): Likewise.

	* w32select.c (syms_of_w32select): Likewise.

	* w32term.c (syms_of_w32term): Likewise.

863
2008-02-01  Jason Rumney  <jasonr@gnu.org>
864 865 866

	* w32font.c (w32font_draw): Delete brush after using it.

867
2008-02-01  Jason Rumney  <jasonr@gnu.org>
868 869 870 871 872 873

	* w32font.c (w32font_open): Don't set font_idx.
	(w32font_text_extents): Try GetTextExtentPoint32W before defaulting
	to font settings.
	(w32font_draw): Fill background explicitly.

874
2008-02-01  Jason Rumney  <jasonr@gnu.org>
875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919

	* w32term.c (w32_initialize): Don't call w32font_initialize.

	* w32font.c (w32font_info): Remove subranges.
	(QCsubranges, Qmodern, Qswiss, Qroman): Remove.
	(QCfamily, Qmonospace, Qsans_serif, Qmono, Qsans, Qsans__serif)
	(Qraster, Qoutline, Qlatin, Qgreek, Qcoptic, Qcyrillic, Qarmenian)
	(Qhebrew, Qarabic, Qsyriac, Qnko, Qthaana, Qdevanagari, Qbengali)
	(Qgurmukhi, Qgujarati, Qoriya, Qtamil, Qtelugu, Qkannada)
	(Qmalayalam, Qsinhala, Qthai, Qlao, Qtibetan, Qmyanmar, Qgeorgian)
	(Qhangul, Qethiopic, Qcherokee, Qcanadian_aboriginal, Qogham)
	(Qrunic, Qkhmer, Qmongolian, Qsymbol, Qbraille, Qhan)
	(Qideographic_description, Qcjk_misc, Qkana, Qbopomofo, Qkanbun)
	(Qyi, Qbyzantine_musical_symbol, Qmusical_symbol, Qmathematical):
	New symbols.
	(font_callback_data): New struct.
	(w32font_list, w32font_match): Use it.
	(w32font_open): Don't populate subranges.
	(w32font_has_char): Use script Lisp symbols, not subrange bitmask.
	(w32font_encode_char): Always return unicode code-point as-is.
	(w32font_text_extents): Supply a tranformation matrix to
	GetGlyphOutline. Never look up by glyph index. Avoid looping
	twice. Use unicode version of GetTexExtentPoint32 instead of
	glyph index version.
	(set_fonts_frame): Remove
	(w32_enumfont_pattern_entity): Add frame parameter, use it to
	set frame parameter. Use backward compatible fake foundries.
	Save generic family in extra slot under QCfamily. Make width slot
	constant. Save QCspacing value. Save list of scripts instead of
	binary subranges.
	(w32_generic_family, logfonts_match, font_matches_spec): New functions.
	(add_font_entity_to_list): Use font_callback_data struct. Filter
	unwanted fonts.
	(add_one_font_entity_to_list): Use font_callback_data struct.
	(w32_registry): Default to iso10646_1;
	(fill_in_logfont): Use dpi from extra slot. Don't bother with
	string font registries. Don't fill in font name if it is a generic
	family name, fill family instead. Use spacing, family and script
	extra info to fill pitch, family and charset fields.
	(list_all_matching_fonts): Use font_callback_data struct.
	(unicode_range_for_char): Remove.
	(font_supported_scripts): New function.
	(w32font_initialize): Remove.
	(syms_of_w32font): Update which symbols are defined.

920
2008-02-01  Jason Rumney  <jasonr@gnu.org>
921 922 923 924 925 926 927 928 929 930 931 932 933 934 935

	* font.c (font_pixel_size): Reverse assq_no_quit args.

	* w32term.h (FONT_WIDTH): Report max width, not average.
	(FONT_MAX_WIDTH): Remove.
	(FONT_AVG_WIDTH): New macro.

	* xfaces.c (Fx_list_fonts) [WINDOWSNT]: Remove Windows only
	redefinition of FONT_WIDTH.

	* w32term.c (x_font_min_bounds): Use FONT_AVG_WIDTH.
	(w32_cache_char_metrics): Use FONT_WIDTH.

	* w32fns.c (w32_load_system_font, w32_list_fonts): Use FONT_AVG_WIDTH.

936
2008-02-01  Jason Rumney  <jasonr@gnu.org>
937 938 939 940 941 942

	* w32font.c (w32font_open): Make lfHeight negative.

	* w32fns.c (x_default_font_parameter): Use new style font name.
	(Fx_create_frame, x_create_tip_frame): Initialize resx and resy.

943
2008-02-01  Jason Rumney  <jasonr@gnu.org>
944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995

	* w32font.c (QCsubranges): New symbol.
	(w32font_open, w32font_has_char): Get subranges from subproperty
	of extra.
	(w32_enumfont_pattern_entity): Set subranges as subproperty of extra.
	(syms_of_w32font): Define :subranges symbol.

	* font.c (font_put_extra): Expose externally.

	* font.h (font_put_extra): Moved declaration from font.c.

	* font.c (Ffont_get): Use font driver to determine otf capability.
	(adjust_anchor): Check if driver defines anchor_point before using.

	* w32font.c (w32font_open): Handle size, height and pixel_size better.
	(w32font_draw): Use options.
	(w32_enumfont_pattern_entity): Set size to 0 for scalable fonts.
	Fix detection of truetype fonts.
	(registry_to_w32_charset): Handle charsets other than iso8859-1
	expressed as lisp symbols.
	(w32_registry): Express charset as lisp symbol.
	(fill_in_logfont): Reverse pixel and point height logic.
	Don't set width here. Set quality to default.

	* w32fns.c (w32_load_system_font): Fix detecting FIXED_PITCH fonts.
	(x_to_w32_font): Fill in lfPitchAndFamily correctly.

	* xterm.c (x_draw_glyph_string_foreground) [USE_FONT_BACKEND]:
	Remove redundant loop and allocation.

	* makefile.w32-in (font.o, w32font.o): New objects.
	(fontset.o, xdisp.o, xfaces.o, w32fns.o, w32term.o): Depend on font.h
	(FONTOBJ): New group of objects conditioned on USE_FONT_BACKEND.

	* xdisp.c (fill_composite_glyph_string): Make the first arg to
	STORE_XCHARB a valid l-value.

	* w32term.c (w32_native_per_char_metric): Swap width and rbearing
	calculations for non-Truetype fonts.
	(x_draw_glyph_string): Sync with xterm.c.
	(x_draw_glyph_string_foreground) [USE_FONT_BACKEND]: Remove
	redundant code.
	(w32_initialize) [USE_FONT_BACKEND]: Call w32font_initialize.

	* w32term.h (w32_output_data) [USE_FONT_BACKEND]: Add fontp member.
	(FRAME_FONT_OBJECT) [USE_FONT_BACKEND]: New macro from xterm.h.

	* w32fns.c [USE_FONT_BACKEND]: Port font backend changes from xfns.c.
	(x_to_w32_charset, w32_to_x_charset): Expose externally.

	* w32font.c: New file for w32 font backend.

996
2008-02-01  Kenichi Handa  <handa@m17n.org>
997 998 999

	* term.c: Don't include "buffer.h" twice.

1000
2008-02-01  Kenichi Handa  <handa@m17n.org>
1001 1002 1003

	* syntax.c (skip_syntaxes): Synch with the trunk.

1004
2008-02-01  Kenichi Handa  <handa@m17n.org>
1005 1006 1007 1008

	* character.c (Funibyte_string): New function.
	(syms_of_character): Defsubr it.

1009
2008-02-01  Jason Rumney  <jasonr@gnu.org>
1010 1011 1012 1013 1014 1015 1016 1017

	* w32term.c [USE_FONT_BACKEND]:
	(x_get_font_repertory, note_mouse_movement, x_set_mouse_face_gc):
	(x_set_glyph_string_clipping, x_set_glyph_string_clipping_exactly):
	(x_draw_glyph_string, x_draw_glyph_string_foreground):
	(x_draw_composite_glyph_string_foreground, x_new_fontset2):
	(x_free_frame_resources): Sync with xterm.c.

1018
2008-02-01  Andreas Schwab  <schwab@suse.de>
1019 1020 1021 1022

	* lread.c (read1): Use CHAR_TABLE_STANDARD_SLOTS to validate
	char-table size.

1023
2008-02-01  Kenichi Handa  <handa@m17n.org>
1024 1025 1026 1027

	* font.c (check_otf_features): Define it regardless of
	HAVE_LIBOTF.

1028
2008-02-01  Kenichi Handa  <handa@m17n.org>
1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062

	* ftfont.c (ftfont_driver): Delete font_otf_gsub and
	font_otf_gpos, add font_drive_otf.

	* fontset.c (fontset_find_font): Pay attention to font size
	specified for a font.
	(reorder_font_vector): Check contents of font_def.

	* font.c (struct otf_list): Delete it.
	(otf_list): Make it a lisp variable..
	(otf_open): Use lispy otf_list.
	(generate_otf_features): Renamed from parse_gsub_gpos_spec.
	(check_otf_features): New function.
	(font_otf_DeviceTable, font_otf_ValueRecord, font_otf_Anchor): New
	functinos.
	(font_drive_otf): New function merging font_otf_gsub and
	font_otf_gpos.
	(font_open_for_lface): New arg spec.  Change argument order.
	(font_load_for_face): Adjusted for the change of
	font_open_for_lface.
	(Ffont_drive_otf): New function merging Ffont_otf_gsub and
	Ffont_otf_gpos.
	(syms_of_font): Staticpro otf_list.  Delete defsubr of
	Sfont_otf_gsub and Sfont_otf_gpos.  Defsubr Sfont_drive_otf.

	* xfaces.c (set_font_frame_param): Adjusted for the change of
	font_open_for_lface.

	* font.h (font_open_for_lface): Adjust prototype.
	(struct font_driver): Delete members otf_gsub and otf_gpos, add
	member otf_drive.
	(font_otf_gsub, font_otf_gpos): Delete externs.
	(font_drive_otf): Extern it.

1063
2008-02-01  Kenichi Handa  <handa@m17n.org>
1064 1065 1066 1067 1068 1069 1070 1071

	* font.c (font_at): If the window W is not on a window system,
	return Qnil.

	* coding.c (produce_chars): Don't call insert_from_gap if no
	characters to produce.
	(encode_coding): Likewise.

1072
2008-02-01  Kenichi Handa  <handa@m17n.org>
1073 1074 1075 1076 1077 1078

	* fontset.c (free_realized_fontsets): Avoid unnecessary call of
	Fclear_face_cache.

	* xfaces.c (face_for_font): Check also face->font==font->font.font.

1079
2008-02-01  Miles Bader  <miles@gnu.org>
1080 1081 1082 1083 1084

	* emacs.c (main): Change default value of `enable_font_backend' to 1.
	Parse "--disable-font-backend" option.
	(standard_args): Add "--disable-font-backend" option.

1085
2008-02-01  Kenichi Handa  <handa@m17n.org>
1086 1087 1088 1089 1090 1091 1092 1093 1094 1095

	* fontset.c (fontset_find_font): New function.
	(fontset_font): Use fontset_find_font.
	(make_fontset_for_ascii_face): Don't set face ID in rfont_def.
	Register the specified font for all Latin characters.
	(new_fontset_from_font): Register the specified font for all Latin
	characters.
	(dump_fontset): For a realized fontset, include the base fontset
	name in the returned vector.

1096
2008-02-01  Kenichi Handa  <handa@m17n.org>
1097 1098 1099 1100 1101 1102 1103 1104 1105 1106

	* character.h (CHAR_STRING): Cast C to unsigned on calling
	char_string.

	* character.c (char_string): Type of arg C changed to unsigned.
	Signal an error if C is an invalid character code.

	* editfns.c (general_insert_function): Use CHARACTERP, not INTEGERP.
	(Fchar_to_string): Likewise.

1107
2008-02-01  Kenichi Handa  <handa@m17n.org>
1108 1109 1110 1111 1112 1113 1114

	* character.h (MIN_MULTIBYTE_LEADING_CODE)
	(MAX_MULTIBYTE_LEADING_CODE): New macros.

	* regex.c (analyse_first): Fix for multibyte characters in "case
	charset:" and "case categoryspec:".

1115
2008-02-01  Andreas Schwab  <schwab@suse.de>
1116 1117 1118

	* Makefile.in (LIBES): Move standard libraries to the end.

1119
2008-02-01  Kenichi Handa  <handa@m17n.org>
1120 1121 1122

	* process.c: Cancel the change done by sync with HEAD.

1123
2008-02-01  Kenichi Handa  <handa@m17n.org>
1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136

	* alloc.c (Fgarbage_collect): If nextb->text->inhibit_shrinking is
	nonzero, don't shrink the buffer nextb.

	* buffer.h (struct buffer_text): New member inhibit_shrinking.

	* coding.c (coding_alloc_by_making_gap): New arg offset.
	(alloc_destination): Call coding_alloc_by_making_gap with the arg
	offset.
	(decode_coding_iso_2022): Update coding->safe_charsets.
	(decode_coding_gap): Temporarily set
	current_buffer->text->inhibit_shrinking to 1.

1137
2008-02-01  Kenichi Handa  <handa@m17n.org>
1138 1139 1140 1141

	* xterm.c (x_draw_composite_glyph_string_foreground): Fix
	indexing into elements of s->cmp and s->char2b.

1142
2008-02-01  Juanma Barranquero  <lekktu@gmail.com>
1143 1144 1145

	* regex.c (RE_STRING_CHAR_AND_LENGTH) [! emacs]: Add missing arg `len'.

1146
2008-02-01  Kenichi Handa  <handa@m17n.org>
1147 1148 1149 1150 1151 1152 1153

	* regex.c (GET_CHAR_BEFORE_2, GET_CHAR_AFTER): Check the variable
	target_multibyte instead of multibyte.
	(re_match_2_internal): Call bcmp_translate with target_multibyte.
	(bcmp_translate): Change the argument name from multibyte to
	target_multibyte.

1154
2008-02-01  Kenichi Handa  <handa@m17n.org>
1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189

	These changes are to compile a regexp into a pattern that can be
	used both for multibyte and unibyte targets.

	* Makefile.in (search.o): Depend on charset.h.

	* character.c (multibyte_char_to_unibyte_safe): New function.

	* search.c: Include "charset.h".
	(compile_pattern_1): Delete argument multibyte.  Don't set
	cp->buf.target_multibyte here.  Set cp->buf.charset_unibyte.
	(compile_pattern): Don't compare cp->buf.target_multibyte.
	Compare cp->buf.charset_unibyte.
	(compile_pattern): Set cp->buf.target_multibyte.

	* lisp.h (multibyte_char_to_unibyte_safe): Extern it.

	* regex.h (struct re_pattern_buffer): New member charset_unibyte.

	* regex.c (RE_STRING_CHAR, RE_STRING_CHAR_AND_LENGTH): New arg
	multibyte.  Callers changed.
	(RE_CHAR_TO_MULTIBYTE, RE_CHAR_TO_UNIBYTE): New macros.
	(MAKE_CHAR_MULTIBYTE, MAKE_CHAR_UNIBYTE): Deleted.  Callers
	changed to use RE_CHAR_TO_MULTIBYTE and RE_CHAR_TO_UNIBYTE
	respectively.
	(SETUP_ASCII_RANGE, SETUP_UNIBYTE_RANGE): New macros.
	(SETUP_MULTIBYTE_RANGE): Generate a more compact range_table.
	(regex_compile): Make the compiled pattern usable both for
	multibyte and unibyte targets.
	(analyse_first): Make the fastmap usable both for multibyte and
	unibyte targets.
	(TRANSLATE_VIA_MULTIBYTE): Deleted.
	(re_match_2_internal): Pay attention to the case that the
	multibyteness of bufp and target may be different.

1190
2008-02-01  Kenichi Handa  <handa@m17n.org>
1191 1192 1193 1194

	* xdisp.c (x_produce_glyphs): When a font is not found, make the
	empty box occupy at least one column width.

1195
2008-02-01  Miles Bader  <miles@gnu.org>
1196 1197 1198

	* Makefile.in: Remove redundant HAVE_XFT clause.

1199
2008-02-01  Kenichi Handa  <handa@m17n.org>
1200 1201 1202

	* xrdb.c (x_load_resources): Setup the default fontSet X reource.

1203
2008-02-01  Kenichi Handa  <handa@m17n.org>
1204 1205 1206

	* regex.c (regex_compile): Synch with HEAD.

1207
2008-02-01  Kenichi Handa  <handa@m17n.org>
1208 1209 1210

	* fontset.c (Finternal_char_font): Fix previous change.

1211
2008-02-01  Kenichi Handa  <handa@m17n.org>
1212 1213 1214 1215

	* fontset.c (Finternal_char_font): Fix for the case of POSITION
	being nil.

1216
2008-02-01  Kenichi Handa  <handa@m17n.org>
1217 1218 1219

	* xftfont.c (xftfont_open): Call FcConfigSubstitute.

1220
2008-02-01  Kenichi Handa  <handa@m17n.org>
1221 1222 1223

	* xftfont.c (xftfont_open): Don't enable antialias explicitly.

1224
2008-02-01  Kenichi Handa  <handa@m17n.org>
1225 1226 1227

	* search.c (simple_search): Fix previous change.

1228
2008-02-01  Kenichi Handa  <handa@m17n.org>
1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248

	* xftfont.c (ftfont_font_format): Extern declaration.

	* frame.c (x_set_font): Fix the second arg to fs_query_fontset.

	* xfont.c (xfont_driver): Initialize ftfont_driver.type by 0.
	(xfont_list): Don't directly use Lisp_Object as an operand of &&.

	* ftfont.c (ftfont_driver): Initialize ftfont_driver.type by 0.
	(ftfont_font_format): Fix previous change.

	* font.h (Ffont_xlfd_name): EXFUN it.

	* font.c (font_parse_xlfd): Fix the array size of `f'.
	(register_font_driver): Use EQ to compare driver->type.

	* xfns.c (xic_create_xfontset2) [USE_FONT_BACKEND]: New function.
	(create_frame_xic) [USE_FONT_BACKEND]: Call xic_create_xfontset2.
	(xic_set_xfontset) [USE_FONT_BACKEND]: Likewise.

1249
2008-02-01  Kenichi Handa  <handa@m17n.org>
1250 1251 1252 1253 1254 1255

	* ftfont.c (ftfont_pattern_entity): Check if FC_FONTFORMAT is
	defined.
	(ftfont_list_generic_family, ftfont_list, ftfont_font_format):
	Likewise.

1256
2008-02-01  Kenichi Handa  <handa@m17n.org>
1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273

	* xfont.c (xfont_open): Set font->format.

	* xftfont.c (xftfont_open): Set font->format.

	* ftfont.c (ftfont_pattern_entity): Add fontformat in a pattern.
	(ftfont_list): Include FC_FONTFORMAT in FcObject.
	(ftfont_open): Set font->format.
	(ftfont_font_format): New function.

	* font.h (struct font): New memeber format.

	* font.c (Qopentype): New variable.
	(syms_of_font): Defsym it.
	(Fquery_font): Change the format of the last element of the return
	value.

1274
2008-02-01  Kenichi Handa  <handa@m17n.org>
1275 1276 1277

	* search.c (simple_search): Fix sync with HEAD.

1278
2008-02-01  Kenichi Handa  <handa@m17n.org>
1279 1280 1281 1282

	* xfns.c (xic_create_xfontset): Try the default fontset name as a
	last resort.

1283
2008-02-01  Kenichi Handa  <handa@m17n.org>
1284 1285 1286 1287

	* coding.c (detect_coding_charset): Fix detection of multi-byte
	charset.

1288
2008-02-01  Bob Halley  <halley@play-bow.org>  (tiny change)
1289 1290 1291

	* ccl.c (ccl_driver): If DST is NULL, set ccl->produced to 0.

1292
2008-02-01  Kenichi Handa  <handa@m17n.org>
1293 1294 1295 1296 1297 1298

	* xdisp.c (get_next_display_element): Set it->face_id for the
	first component of a composition.
	(x_produce_glyphs): Check if the font is changed or not for
	composition.

1299
2008-02-01  Kenichi Handa  <handa@m17n.org>
1300 1301 1302 1303 1304 1305

	(get_next_display_element): Set it->face_id for the
	first component of a composition.
	(x_produce_glyphs): Check if the font is changed or not for
	composition.

1306
2008-02-01  Kenichi Handa  <handa@m17n.org>
1307 1308 1309 1310 1311 1312

	* fontset.c (Qlatin): New variable.
	(syms_of_fontset): Define it as a lisp symbol.
	(Fset_fontset_font): If TARGET is `latin', use FONT_SPEC for
	ASCII.

1313
2008-02-01  Kenichi Handa  <handa@m17n.org>
1314 1315 1316 1317

	* font.c (font_unparse_fcname): Pay attention to the case that
	some of font property is a null string.

1318
2008-02-01  Kenichi Handa  <handa@m17n.org>
1319 1320 1321 1322 1323 1324 1325 1326 1327 1328

	* term.c: Include "composite.h".
	(encode_terminal_code): Output all components of composition.
	Check the size of encode_terminal_src.
	(produce_glyphs): For compostion, call produce_composite_glyph.
	(append_composite_glyph, produce_composite_glyph): New functions.

	* xdisp.c (x_produce_glyphs): In handling composition, if a font
	is not found, get font_info from the current ascii face.

1329
2008-02-01  Kenichi Handa  <handa@m17n.org>
1330 1331 1332 1333 1334 1335 1336

	* fileio.c (Finsert_file_contents): On replacing, temporarily bind
	buffer-file-name to Qnil before calling insert_from_buffer.

	* font.c (font_unparse_fcname): Pay attention to the case that
	foundry is a null string.

1337
2008-02-01  Kenichi Handa  <handa@m17n.org>
1338 1339 1340 1341 1342 1343 1344 1345

	* ftfont.c (ftfont_list): Allow registry "unicode-sip".

	* font.c (Qunicode_sip): New variable.
	(syms_of_font): Declare it as a Lisp symbol.

	* font.h (Qunicode_sip): Extern it.

1346
2008-02-01  Kenichi Handa  <handa@m17n.org>
1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363

	* composite.c (get_composition_id): Pay attention to TAB
	component.

	* xterm.c (x_draw_composite_glyph_string_foreground): Don't draw
	TAB.  Adjusted for the change of s->char2b which always points to
	the first elememnt of allocated memory.

	* xftfont.c (xftfont_text_extents): Fix calculation of descent
	value.

	* xdisp.c (handle_composition_prop): Set it->c to the first
	non-TAB component.
	(fill_composite_glyph_string): Argument changed.
	(BUILD_COMPOSITE_GLYPH_STRING): Adjusted for the above change.
	(x_produce_glyphs): Fix handling of left/right padding.

1364
2008-02-01  Kenichi Handa  <handa@m17n.org>
1365 1366 1367 1368

	* regex.c (analyse_first): Cancel the change for synching with
	HEAD.

1369
2008-02-01  Kenichi Handa  <handa@m17n.org>
1370 1371 1372 1373 1374

	* coding.c (detect_coding_system): Fix for handling off
	inhibit_iso_escape_detection.  Fix for the case that no coding
	system is defined for a specific coding category.

1375
2008-02-01  Kenichi Handa  <handa@m17n.org>
1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391

	* font.c (font_matching_entity): Dolete unused local var.

	* xftfont.c (xftfont_open): Call XftDefaultSubstitute before
	opening a font.

	* fileio.c (Finsert_file_contents): On recovering a file, assume
	Unix-like eol.
	(choose_write_coding_system): On auto-saving a file, force
	Unix-like eol.

	* coding.c (setup_coding_system): Fix setting of
	coding->common_flags based on eol_type.
	(coding_inherit_eol_type): If PARENT is not nil, be sure to
	inherit from it.

1392
2008-02-01  Kenichi Handa  <handa@m17n.org>
1393 1394 1395

	* alloc.c (NSTATICS): Increased to 0x600.

1396
2008-02-01  Kenichi Handa  <handa@m17n.org>
1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439

	* ftfont.c (ftfont_driver): Set ftfont_driver.match to
	ftfont_match.
	(ftfont_list): Don't check :name property.
	(ftfont_match): New function.
	(ftfont_pattern_entity): If the pattern doesn't contain
	FC_SPACING, don't assuce FC_MONO.

	* font.h (struct font_driver): New member `match'.
	(font_update_drivers): Prototype adjusted.

	* font.c (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.

	* frame.c (x_set_font_backend): Do more works that were done in
	font_update_drivers before.

	* xfont.c (xfont_match): New function.
	(xfont_driver): Set xfont_driver.match to xfont_match.
	(xfont_draw): Set font in GC if necessary.

	* ftxfont.c (ftxfont_match): New function.
	(syms_of_ftxfont): Set ftxfont_driver.match to ftxfont_match.

	* xftfont.c (xftfont_match): New function.
	(syms_of_xftfont): Set xftfont_driver.match to xftfont_match.

1440
2008-02-01  Kenichi Handa  <handa@m17n.org>
1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485

	* font.h (struct font): New member scalable.
	(struct font_driver): New arg ALTERANTE_SUBST to otf_gsub.
	(font_otf_gsub): Prototype adjusted.

	* font.c (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.

	* ftfont.c (ftfont_open): Set font->font.full_name and
	font->font.name properly.  Fix calculation of font->font.height
	and font->min_width.

	* ftxfont.c (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.

	* xterm.c (x_set_glyph_string_clipping_exactly) [USE_FONT_BACKEND]:
	Clip to src->width, etc (not src->clip_XXX).

	* xfns.c (x_create_tip_frame) [USE_FONT_BACKEND]: Handle
	FontBackend frame parameter.

1486
2008-02-01  Kenichi Handa  <handa@m17n.org>
1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512

	* font.h (struct font_driver_list): New member `on'.
	(Fclear_font_cache): EXFUN it.
	(font_update_drivers): Extern it.

	* font.c (font_unparse_fcname): Fix typo (swidth->width).
	(font_list_entities): Check driver_list->on.
	(register_font_driver): Initalize `on' member to 0.
	(font_update_drivers): New function.
	(Fclear_font_cache): Check driver_list->on.

	* frame.h (Qfont_backend): Extern it.
	(x_set_font_backend): Extern it.

	* frame.c (Qfont_backend): New variable.
	(frame_parms): New element for font-backend.
	(x_set_font_backend): New function.

	* xfns.c (Fx_create_frame) [USE_FONT_BACKEND]: Handle
	FontBackend frame parameter.
	(x_frame_parm_handlers) [USE_FONT_BACKEND]: New element
	x_set_font_backend.

	* xfont.c (xfont_list): Don't try listing by :name property if the
	name is not for XLFD.

1513
2008-02-01  Kenichi Handa  <handa@m17n.org>
1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549

	* font.h (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.

	* font.c: 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.

	* xdisp.c (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) [USE_FONT_BACKEND]: Check
	LGLYPH_FORM (g) to detect the end of valid glyph.
	(x_produce_glyphs) [USE_FONT_BACKEND]: Don't update it->face_id if
	we are composing with gstring.

	* xterm.c (x_draw_composite_glyph_string_foreground) [USE_FONT_BACKEND]:
	Check if adjustment is vector or not.

	* Makefile.in (font.o): Make it depends on window.h.

1550
2008-02-01  Kenichi Handa  <handa@m17n.org>
1551 1552 1553 1554

	* xterm.c (x_draw_composite_glyph_string_foreground): Check if
	adjustment is vector or not.

1555
2008-02-01  Kenichi Handa  <handa@m17n.org>
1556 1557 1558

	* casefiddle.c (casify_object): Sync with HEAD.

1559
2008-02-01  Miles Bader  <miles@gnu.org>
1560 1561 1562

	* character.h (CHECK_CHARACTER): Redefine in terms of CHECK_TYPE.

1563
2008-02-01  Kenichi Handa  <handa@m17n.org>