1 2005-04-19 Kenichi Handa <handa@m17n.org>
3 * word-thai.c (wordseg_propertize): Always unref the attached
5 (thai_wordseg): Don't unref the property.
7 2005-04-18 Kenichi Handa <handa@m17n.org>
9 * word-thai.c: Include stdlib.h.
10 (wordseg_propertize): Add dummy function for the case that wordcut
11 library doesn't exist.
12 (wordseg_propertize): Fix for old wordcut library.
14 2005-04-16 Kenichi Handa <handa@m17n.org>
16 * word-thai.c: Include <stdio.h>.
18 2005-04-15 Kenichi Handa <handa@m17n.org>
20 * draw.c: Include mtext.h.
21 (linebreak_table, M_break_at_space, M_break_at_word)
22 (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
23 (compose_glyph_string): Check POS before getting Mface text
25 (truncate_gstring): Give correct TO arg to line_break function.
26 (GET_LB_TYPE): New macro.
27 (find_break_backward, find_break_forward): New functions.
28 (mdraw__init): Initialize the above new variables.
29 (mdraw__fini): Free linebreak_table.
30 (mdraw_default_line_break): Use find_break_backward and
33 * word-thai.c: New file.
35 * word-thai.h: New file.
37 * mtext.c: Include word-thai.h.
38 (wordseg_func_table): New variable.
39 (mtext__init): Initialize wordseg_func_table and call
40 mtext__word_thai_init.
41 (mtext__fini): Call mtext__word_thai_fini, free
43 (MTextWordsegFunc): New type.
44 (mtext__word_segment): New function.
46 * mtext.h (wordseg_func_table): Extern it.
47 (mtext__word_segment): Extern it.
49 * m17n.c (m17n_init): Fix typo (== -> =).
51 * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
52 (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
54 * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
55 (MTEXTPROP_VAL): New macros.
57 * input.c (DLOPEN_SHLIB_EXT): Don't define it.
59 2005-04-07 Kenichi Handa <handa@m17n.org>
61 * database.c (load_chartable): Fix pursing of symbol name.
63 2005-03-24 Kenichi Handa <handa@m17n.org>
65 * m17n.c (m17n_init): Fix typo (== -> =).
67 2005-03-11 Kenichi Handa <handa@m17n.org>
69 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
71 * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
73 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
76 2005-03-09 handa <handa@m17n.org>
78 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
81 * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
82 calling m17n_init_core ().
84 2005-02-28 Kenichi Handa <handa@m17n.org>
86 * font-flt.c (mfont__flt_run): Add resulting code sequence in
89 2005-02-17 Kenichi Handa <handa@m17n.org>
91 * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
92 (M_description, M_command, M_variable): New variables.
93 (load_im_info_keys): New variables.
94 (load_im_info, check_command_keyseq, get_description_advance)
95 (parse_command_list, get_command_list, parse_variable_list)
96 (get_variable_list, input_method_hook): New functions.
97 (command_list, variable_list): New variables.
98 (minput__init): Put input_method_hook to Minput_method.
99 Initialize M_description, M_command, M_variable, Mdetail_text,
100 load_im_info_keys, command_list, variable_list.
101 (minput__fini): Unref command_list, variable_list, load_im_info_keys.
102 (Mdetail_text): New variable.
103 (minput_get_description, minput_get_commands)
104 (minput_assign_command_keys, minput_get_variables)
105 (minput_set_variable): New functions.
107 * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
108 (minput_assign_command_keys, minput_get_variables)
109 (minput_set_variable): Extern them.
111 * plist.c (UNGETC): Just decrement st->p.
112 (read_mtext_element): New arg skip.
113 (read_integer_element): Likewise.
114 (read_symbol_element): Likewise.
115 (read_element): New arg KEYS.
116 (mplist__from_plist): Don't increment ref-count of NULL object.
117 (mplist__from_file): New arg KEYS.
118 (mplist_put): Don't increment ref-count of NULL object.
119 (mplist_add): Likewise.
120 (mplist_push): Likewise.
121 (mplist_set): Likewise. Call M17N_OBJECT_UNREF unconditionally.
123 * plist.h (mplist__from_file): Prototype adjusted.
125 * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
126 (get_database_stream): New function.
127 (load_database): Use get_database_stream.
128 (M_database_hook): New variable
129 (mdatabase__init): Initialize M_database_hook.
130 (mdatabase__load_for_keys): New function.
131 (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
133 (mdatabase_define): Free mdb->extra_info if necessary.
135 * database.h (mdatabase__dir_list, M_database_hook)
136 (mdatabase__load_for_keys): Extern them.
137 (MDatabaseHookFunc): New type.
139 * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
141 2004-12-27 Kenichi Handa <handa@m17n.org>
143 * Version 1.2.0 released.
145 2004-12-27 Kenichi Handa <handa@m17n.org>
147 * input.c (minput_filter): Don't reset ic->xxx_changed.
149 * mtext.c (mtext_from_data): Fix documentation.
151 2004-12-25 Kenichi Handa <handa@m17n.org>
153 * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
154 (M17NLIB_VERSION_NAME): Update to "1.2.".
156 2004-12-24 Kenichi Handa <handa@m17n.org>
158 * input.c (reset_ic): Set key_unhandled to 0.
160 2004-12-21 Kenichi Handa <handa@m17n.org>
162 * m17n-gui.h (mfont_from_spec): Delete extern.
164 * input-gui.c (win_callback): Handle Minput_reset.
165 (minput__win_init): Register reset_ic as a callback for
168 * input.c (reset_ic): New arg IGNORE which is ignored. Caller
169 changed. At first, shift to the initial state.
170 (minput__init): Initialize Minput_reset. Register reset_ic as a
171 callback for Minput_reset.
172 (Minput_reset): New variable.
173 (minput_filter): Always set ic->xxx_changed to 0.
174 (minput_reset_ic): New function.
175 (integer_value): Fix typo ('>' -> '<') and calculation of length
178 * m17n-core.c (merror_code): Change type to `int'.
180 * m17n-misc.h (merror_code): Adjust type.
182 * m17n.h (Minput_reset, minput_reset_ic): Extern them.
184 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
185 (mtext_change_prop): Delete extern.
187 * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
188 to `int'. Move the documents to m17n-core.h.
190 2004-12-13 Kenichi Handa <handa@m17n.org>
192 * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
193 (MTextProperty): Document it.
195 2004-12-09 Kenichi Handa <handa@m17n.org>
197 * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
199 2004-12-03 Kenichi Handa <handa@m17n.org>
201 * internal.h (m17n__core_initialized, m17n__shell_initialized,
202 m17n__gui_initialized): New externs.
204 * m17n-core.h (enum M17NStatus): New enum.
205 (m17n_status): Extern it.
207 * m17n-core.c (core_initialized): Delete this variable.
208 (m17n__core_initialized, m17n__shell_initialized,
209 m17n__gui_initialized): New variables.
210 (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
211 instead of core_initialized.
212 (m17n_status): New function.
214 * m17n.c (shell_initialized): Delete this variable.
215 (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
218 * m17n-gui.h (m17n_init_win): Adjust the prototype.
220 * m17n-gui.c (win_initialized): Delete this variable.
221 (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
222 instead of gui_initialized.
224 2004-11-19 Kenichi Handa <handa@m17n.org>
226 * input.c (reset_ic): Check if ic_info->state is NULL.
227 (filter): If ic_info->state is NULL, return 0.
228 (load_input_method): Don't unref `maps' it it's not created.
230 2004-11-15 Kenichi Handa <handa@m17n.org>
232 * input.c (find_candidates_group): If INDEX is -1, find the last
234 (take_action_list): If the previous of the first candidate is
235 requested, select the last candidate.
237 2004-11-08 Kenichi Handa <handa@m17n.org>
239 * m17n-X.c (device_open): Try at most 32 fonts to find a
242 * font.c (xlfd_parse_name): Fix previous change.
244 2004-11-05 Kenichi Handa <handa@m17n.org>
246 * font.c: (commont_style): Include dummy elements "slanted" and
247 "rslanted" to prefer "o" to "r" if "i" is requested.
249 * font-ft.c (ft_to_prop): Fix "oblique" entry.
251 2004-10-29 Kenichi Handa <handa@m17n.org>
253 * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
255 * m17n-X.c (MXFont): Change type of the member `sizes' to int.
256 New members smallest and larger.
257 (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
258 (xfont_registry_list): Likewise.
259 (xfont_select): Likewise.
262 2004-10-28 Kenichi Handa <handa@m17n.org>
264 * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
265 font name comparison.
266 (xfont_select): Fix logic for selecting a larger size font.
268 2004-10-25 Kenichi Handa <handa@m17n.org>
270 * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
273 2004-10-22 Kenichi Handa <handa@m17n.org>
275 * input.c (update_candidate): Renamed from udpate_candidate.
276 (take_action_list): Show more debugging info on arithmetic commands.
278 * m17n-X.c (device_open): Fix previous change.
280 * draw.c (compose_glyph_string): Don't get face property at the
283 2004-10-21 Kenichi Handa <handa@m17n.org>
285 * draw.c (compose_glyph_string): Fix for the case of category
288 2004-10-19 Kenichi Handa <handa@m17n.org>
290 * input.c (mdebug_mask): New variable.
291 (shift_state): Print debug information.
292 (take_action_list): Likewise.
293 (handle_key): Likewise.
295 2004-10-14 Kenichi Handa <handa@m17n.org>
297 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
299 2004-10-13 Kenichi Handa <handa@m17n.org>
301 * m17n-X.c (device_open): Be sure to register at least one font
304 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
305 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
307 2004-10-12 Kenichi Handa <handa@m17n.org>
309 * draw.c (alloc_gstring): Fix previous change.
311 * font-ft.c (ft_list_generic): Fix for the case of not
314 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
316 * font.c (mfont_list): If no font is found, return NULL.
317 (load_font_encoding_table): Put entries of nil registry first.
318 (find_encoding): Adjust for the above change.
320 2004-10-11 Kenichi Handa <handa@m17n.org>
322 * m17n-gui.h (mfont_list): Adjust prototype.
324 * m17n-X.c (xfont_list): New arg maxnum.
326 * font.h (struct MFontDriver): Change prototype of <list>.
328 * font-ft.c (fc_generic_family_list): Delete it.
329 (Mserif, Msans_serif, Mmonospace): Delete them.
330 (M_generic_family_info): New variable.
331 (enum GenericFamilyType): New enum.
332 (struct GenericFamilyInfo): New struct.
333 (generic_family_table): New variable.
334 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
336 (add_font_info): Get style here.
337 (ft_list_family): Don't initialize fc_config here. Don't list
339 (ft_list_generic): New function.
340 (ft_select): Pay attention to generic familes here.
341 (ft_open): Fix calculation of ascent and descent.
342 (ft_list): Pay attention to generic families.
343 (mfont__ft_init): Initialize M_generic_family_info,
344 generic_family_table, and fc_config..
345 (mfont__ft_fini): Finalize generic_family_table.
347 * draw.c (compose_glyph_string): Use more constant font for
348 glyphs. Adjust for the member change in MGlyph.
349 (layout_glyph_string): Adjust for the member change in MGlyph.
350 (alloc_gstring): Intilize scracth_glyph to avoid
351 compose_glyph_string on it.
352 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
353 (mdraw_coordinates_position): Fix previous change.
355 * internal-gui.h (glyph_category): New enum.
356 (MGlyph): Change type of <category> to enum glyph_category.
358 * face.c (mface__realize): Delete args langauge and charset.
359 (mface__for_chars): Fix for the case that glyphs have different
361 (mface__update_frame_face): Adjust for mface__realize change.
363 * face.h (mface__realize): Adjust prototype.
365 2004-10-05 Kenichi Handa <handa@m17n.org>
367 * language.c (mlang__init): Add Akan.
369 2004-10-04 Kenichi Handa <handa@m17n.org>
371 * font-ft.c (add_font_info): Add instead of push the element.
372 (ft_list_family): For generic fonts, try all
373 substituted. families.
375 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
376 (run_rule): Don't update cluster range here.
377 (run_command): Update cluster range on appending a glyph.
378 (run_otf): Update cluster range for glyphs generated by OTF.
380 2004-10-02 Kenichi Handa <handa@m17n.org>
382 * m17n-X.c (device_open): Handle Mfont key in PLIST.
384 2004-09-30 Kenichi Handa <handa@m17n.org>
386 * font-ft.c (ft_select): Ignore family on calling mfont__score.
388 2004-09-30 Kenichi Handa <handa@m17n.org>
390 * font.h: Include <fontconfig/fontconfig.h>.
391 (MFTInfo): New member langset.
392 (mfont__encoding_list): Extern it.
394 * font.c (mfont__encoding_list): New function.
395 (mdebug_dump_font_list): New function.
397 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
398 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
400 (ft_family_list): New variable.
401 (set_font_info): New arg basep. Callers changed.
402 (fc_list): Check the return value of FcPatternGetString.
403 (add_font_info): New arg plist. Callers changed. Update
405 (ft_list_family): New function (merged fc_list and ft_list_all).
406 (ft_select): Use ft_list_family.
407 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
409 (mfont__ft_init): Initialize above new variables.
410 (mfont__ft_fini): Free ft_family_list.
411 (STRDUP_LOWER): New macro.
412 (set_font_info): Use STRDUP_LOWER.
413 (ft_list_family): Avoid duplicate addition of font path. Use
415 (fc_decode_prop): Fix typo.
417 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
418 (xfont_registry_list): Change argument disp_info to frame.
420 (xfont_list_all): New function.
421 (xfont_list): If FONT is not NULL, check all fonts.
423 2004-09-28 Kenichi Handa <handa@m17n.org>
425 * m17n-X.c (MXFont, MXFontList): New types.
426 (MDisplayInfo): Delete members font_registry_list,
427 iso8859_1_family_list, iso10646_1_family_list, new members
428 font_list, base_font_list.
429 (free_display_info): Adusted for the change of MDisplayInfo.
430 (xfont_driver): Initialize with xfont_list.
431 (font_compare): New function.
432 (build_font_list): Deleted.
433 (xfont_registry_list): New function.
434 (xfont_select): Use xfont_registry_list.
435 (xfont_list): New function.
436 (device_open): Adusted for the change of MDisplayInfo.
438 * font-ft.c (add_font_info): New arg languages. Callers changed.
439 (fc_list): Get languages from fonts..
440 (ft_list_all): Renamed from ft_list. Callers changed.
441 (ft_list): New function.
442 (mfont__ft_driver): Initalize with ft_list.
444 * font.c (mfont_list): New function.
446 * font.h (struct MFontDriver): New member `list'.
447 (MFTInfo): New member languages.
449 * m17n-gui.h (mfont_list): Extern it.
451 2004-09-27 Kenichi Handa <handa@m17n.org>
453 * internal-gui.h (struct MGlyphString): Delete members mt,
454 sub_width, sub_lbrearing, sub_rbearing, and region.
456 * draw.c (MSubTextExtents): New type.
457 (layout_glyphs): New arg extents. Set its members.
458 (layout_glyph_string): Adjusted for the above change.
459 (alloc_gstring): Don't set gstring->mt.
460 (truncate_gstring): Call line_break function with mt instead of
463 2004-09-22 Kenichi Handa <handa@m17n.org>
465 * mtext.c (count_utf_16_chars): Count each code of invalid
468 2004-09-19 Kenichi Handa <handa@m17n.org>
470 * mtext.c (default_utf_16, default_utf_32): Rename them to
471 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
474 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
477 2004-09-13 Kenichi Handa <handa@m17n.org>
479 * draw.c (Mlatin): Don't declare it here.
480 (visual_order): Fix reordering of combining characters.
481 (compose_glyph_string): Fix detection of script.
482 (layout_glyphs): Don't fix reordering of combining characters
484 (layout_glyph_string): Pay attention to
485 control->disable_overlapping_adjustment.
486 (truncate_gstring): Include at least on character in a line.
487 (get_gstring): Always scan one full line.
488 (mdraw__init): Don't initialize Mlatin here.
489 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
490 have a font, use ascent/descent of an ASCII font. Allow
491 ink_array_return and logical_array_return to be NULL.
492 (mdraw_coordinates_position): Fix iteration.
494 * font-ft.c (MFTtoProp): Member completely changed.
495 (ft_to_prop): Adjusted for the above change.
496 (ft_to_prop_size): Likewise.
497 (set_font_info): Adjusted for the change of MFTtoProp.
498 (fc_generic_family_list): New variable.
499 (fc_list): Add special handling of generic font names.
500 (mfont__ft_init): Adjusted for the change of MFTtoProp.
501 Initialize fc_generic_family_list.
502 (mfont__ft_fini): Don't free ft_to_prop. Free
503 fc_generic_family_list.
504 (FC_vs_M17N_font_prop): New type.
505 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
506 (fc_decode_prop, fc_encode_prop): New functions.
507 (mfont__ft_parse_name): Use fc_decode_prop.
508 (mfont__ft_unparse_name): Use fc_encode_prop.
510 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
511 (MWDevice): Add member realized_font_list.
512 (free_display_info): Don't free disp_info->realized_font_list.
513 (free_device): Free device->realized_fontset_list.
514 (xft_find_metric): Use gstring->frame instead of rfont->frame.
515 (device_open): Don't initialize disp_info->realized_font_list.
516 (device_open): Initialize device->realized_font_list and set it to
517 frame->realized_font_list.
519 * fontset.c (try_font_group): New function.
520 (mfont__lookup_fontset): Use try_font_group.
522 * font.c (common_weight): Change the order of "regular".
524 * face.c (Mlatin): Don't make it static.
525 (mface__realize): Be sure to set work_gstring.frame.
526 (mface__for_chars): Likewise.
528 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
531 * internal-gui.h (Mlatin): Extern it.
533 * m17n-gui.h (MDrawControl): New member
534 disable_overlapping_adjustment.
536 2004-09-06 Kenichi Handa <handa@m17n.org>
538 * font-flt.c (run_otf): Fix typo ('}'->']').
540 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
541 (COMBINING_PRECOMPUTED_P): New macros.
543 * draw.c (layout_glyphs): Handle precomputed combining code.
545 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
546 precomupted combining code.
548 2004-09-03 Kenichi Handa <handa@m17n.org>
550 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
553 2004-08-27 Kenichi Handa <handa@m17n.org>
555 * face.c (mface_put_prop): If the new value is the same as the
556 current one, don't increment frame->tick.
558 2004-08-25 Kenichi Handa <handa@m17n.org>
560 * fontset.c (mfontset): Initialize font_spec_list member.
561 (mfontset_copy): Load fontset if necessary.
563 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
564 'metrics' to for C++.
566 * draw.c (mdraw_glyph_info): Adjusted for the member name change
569 2004-08-16 Kenichi Handa <handa@m17n.org>
571 * Version 1.1.0 released.
573 2004-08-13 Kenichi Handa <handa@m17n.org>
575 * language.c (mlang__init): Add Dhivehi.
577 * m17n-gui.c (Mx, Mfreetype): Delete it.
578 (m17n_init_win): Don't initialize Mx and Mfreetype here.
580 * m17n-gui.h (Mfreetype, Mxft): Extern them.
581 (mfont_resize_ratio): Extern it.
582 (MDrawGlyphInfo): New member logical_width;
583 (MDrawGlyph): New type.
584 (mdraw_glyph_list): Prototype adjusted.
586 * m17n-X.c (xfont_open): Set type and fontp members.
587 (xft_open): Likewise.
589 * internal-gui.h (Mx, Mfreetype): Delete extern.
591 * font.h (struct MRealizedFont): New member type and fontp.
593 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
594 (Mx, Mfreetype): Declare here.
595 (Mxft): New variable.
596 (mfont_resize_ratio): New function.
598 * font-ft.c (ft_open): Set type and fontp members.
600 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
603 2004-08-11 Kenichi Handa <handa@m17n.org>
605 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
608 2004-08-06 Kenichi Handa <handa@m17n.org>
610 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
613 * font-flt.c (run_otf): Print debugging information if necessary.
615 2004-08-05 Kenichi Handa <handa@m17n.org>
617 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
618 positioning_type 5 and 6. Switch simplified.
620 2004-08-04 Kenichi Handa <handa@m17n.org>
622 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
624 2004-08-02 Kenichi Handa <handa@m17n.org>
626 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
627 set val to 1 even if it is greater than 1.
629 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
631 2004-07-29 Kenichi Handa <handa@m17n.org>
633 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
634 debugging information.
636 * internal.h (MDEBUG_PRINT5): New macro.
638 * draw.c (layout_glyphs): Don't combine a zero width glyph with
639 the previous one if the zero width glyph has left or right
642 2004-07-26 Kenichi Handa <handa@m17n.org>
644 * m17n-X.c (xft_render): Pay attention to members left_padding and
645 right_padding of MGlyph.
647 * draw.c (visual_order): Allocate one more elements for arrays as
648 a workaround of fribidi bug.
649 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
650 instead of MGlyph->bidi_sensitive.
651 (layout_glyph_string): Pay attentinon to
652 control->orientation_reversed when padding at the head or tail.
653 Fix adjustment of space glyph width.
654 (get_gstring): If cursor_width or cursor_bidi is changed, don't
657 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
658 instead of MGlyph->bidi_sensitive.
660 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
662 2004-07-26 Kenichi Handa <handa@m17n.org>
664 * draw.c (visual_order): Don't treat combined glyphs specially.
665 (layout_glyphs): Don't get metrics glyphs that are already ready.
666 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
667 width with the previous one.
668 (draw_background): Fix bar cursor position on a r2l glyph.
670 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
671 (run_rule): Fix place of updating cluster_begin_pos and
672 cluster_end_pos here.
673 (run_otf): Don't set left_padding.
675 * font-ft.c (adjust_anchor): Type of argument `code' changed.
677 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
678 Fix handling of GPOS.
679 (mfont__ft_drive_gpos): Delete this function.
681 * font.h (mfont__ft_drive_otf): Renamed back from
682 mfont__ft_drive_gsub.
683 (mfont__ft_drive_gpos): Delete extern.
685 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
686 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
688 2004-07-23 Kenichi Handa <handa@m17n.org>
690 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
693 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
695 2004-07-22 Kenichi Handa <handa@m17n.org>
697 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
699 2004-07-20 Kenichi Handa <handa@m17n.org>
701 * draw.c (render_glyphs): Fix checking of g->code validity.
703 * face.c (mface__realize): Set g.type.
705 2004-07-18 Kenichi Handa <handa@m17n.org>
707 * Makefile.am: Prepend ${top_srcdir} to all *.la in
710 * m17n-gui.c (mframe): Print error message give by dlopen to
713 2004-07-16 Kenichi Handa <handa@m17n.org>
715 * draw.c (compose_glyph_string): Improve the way of deciding a
716 script. For a character that doesn't have script property, use
717 the last non-latin script.
719 * font-ft.c (fc_list): Cancel previous change.
720 (mfont__ft_init): Add more entries in ft_to_prop_name.
722 2004-07-15 Kenichi Handa <handa@m17n.org>
724 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
725 previous or next character glyphs.
727 2004-07-14 Kenichi Handa <handa@m17n.org>
729 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
732 * fontset.c (mfont__lookup_fontset): If glyph type is
733 GLYPH_SPACE, get codes for SPACE.
735 * internal-gui.h (Mfont): Delete extern.
737 * m17n-gui.h (Mfont): Delete duplicated extern.
739 2004-07-13 Kenichi Handa <handa@m17n.org>
741 * font-ft.c (DEVICE_DELTA): New macro.
742 (adjust_anchor): New function.
743 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
745 (mfont__ft_drive_gpos): New function.
747 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
748 (FontLayoutContext): Delete member `rfont'.
749 (run_otf): Set g->otf_cmd. Call
750 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
751 only whne HAVE_OTF is defined.
753 * fontset.c: Include "config.h".
755 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
756 (MGlyph): New member otf_cmd.
758 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
759 (mfont__ft_drive_gpos): Extern it.
761 * face.c: Include "config.h".
763 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
765 * input-gui.c: Include "config.h".
767 * plist.c: Include "config.h".
769 2004-07-06 Kenichi Handa <handa@m17n.org>
771 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
772 internal-gui.h: Cancel previous changes.
774 * m17n-gd.h: Delete it.
776 * Makefile.am (libm17n_core_la_LIBADD): New variable.
777 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
778 @XML2_LD_FLAGS@ to above.
779 (libm17n_la_LIBADD): Add -ldl.
780 (libm17n_la_LDFLAGS): Add -export-dynamic.
781 (X_LD_FLAGS): Fix the order of linking.
782 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
783 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
784 (libm17n_X_la_LDFLAGS): Add -module.
785 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
786 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
787 (libm17n_gd_la_LDFLAGS): Add -module.
788 (include_HEADERS): Delete m17n-gd.h.
790 2004-06-30 Kenichi Handa <handa@m17n.org>
792 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
793 (MDeviceLibraryInterface): Delete it.
794 (register_device_library): Delete it.
795 (m17n__device_library_list): Renamed from device_library_list.
797 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
798 (m17n_init_win): Adjust prototype.
800 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
801 (m17n_init_gd): New function.
803 * m17n-gd.h: New file.
805 * m17n-X.h: Include <m17n-gui.h>.
806 (m17n_init_X): Extern it.
807 (M17N_INIT): Redefine it.
809 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
810 (m17n_init_X): New function.
812 * internal-gui.h (m17n__device_library_list): Extern it.
813 (struct MDeviceDriver): New members initialized, init, and fini.
815 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
817 (libm17n_X_la_LIBADD): Delete aboves.
818 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
819 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
820 (libm17n_gd_la_LDFLAGS): Delete it.
821 (include_HEADERS): Add m17n-gd.h.
823 2004-06-25 Kenichi Handa <handa@m17n.org>
825 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
826 (libm17n_gd_la_LDFLAGS): Cancel previous change.
828 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
830 * font-ft.c (fc_list): If FcFontList finds no font, try
833 * draw.c (compose_glyph_string): Terminate the last loop after
834 doing default combining if necessary.
836 2004-06-24 Kenichi Handa <handa@m17n.org>
838 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
840 * character.c (mchar_define_property): Add const to an arg.
842 * charset.c (mchar_define_charset): Add const to an arg.
844 * coding.c (MCodingSystem): Add const to an arg or decoder.
845 (finish_decoding): Add const to an arg.
846 (decode_coding_charset, decode_coding_utf_8)
847 (decode_coding_utf_16, decode_coding_utf_32)
848 (decode_coding_iso_2022, decode_coding_sjis)
849 (mconv_define_coding): Likewise.
851 * m17n-X.c (xft_find_metric): Delete unused variable.
853 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
856 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
859 * mtext.c (count_utf_8_chars, count_utf_16_chars)
860 (mtext__from_data, mtext_from_data): Add `const' to an arg.
862 * mtext.h (mtext__from_data): Ajust prototype.
864 2004-06-23 Kenichi Handa <handa@m17n.org>
866 * draw.c (compose_glyph_string): Always get glyph codes by
868 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
869 (mdraw_glyph_list): New function.
871 * font-flt.c (mfont__flt_run): Be sure to call
872 rfont->driver->encode_char.
874 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
875 (ft_encode_char): Delete arg C.
876 (ft_render): Don't call FT_Get_Char_Index.
878 * font.c (mfont__encodable_p): Delete it.
879 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
881 * font.h (struct MFontDriver): Delete arg C of encode_char.
882 (mfont__encodable_p): Delete extern.
884 * m17n-X.c (xfont_encode_char): Delete arg C.
885 (xft_find_metric): Don't cal FT_Get_Char_Index.
886 (xft_render): Likewise.
888 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
890 (mdraw_glyph_list): Extern it.
892 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
894 2004-06-22 Kenichi Handa <handa@m17n.org>
896 * m17n-gui.h (mfontset_lookup): Extern it.
898 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
900 * fontset.c (realize_fontset_elements)
901 (free_realized_fontset_elements, update_fontset_elements): New
903 (mfont__realize_fontset): Call realize_fontset_elements.
904 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
905 (mfont__lookup_fontset): If a fontset was modified, update
906 the realized fontset.
907 (mfontset_modify_entry): Increment fontset->tick.
908 (mfontset_lookup): New function.
910 2004-06-21 Kenichi Handa <handa@m17n.org>
912 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
914 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
915 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
916 length of source text 0.
918 2004-06-21 Kenichi Handa <handa@m17n.org>
920 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
921 (compare): Pay attention to format other than utf-8.
922 (copy): Delete this function.
923 (count_by_utf_8, count_by_utf_16, insert): New functions.
924 (count_utf_16_chars): Fix handling of a surrogate pair.
925 (find_char_forward, find_char_backward): Likewise.
926 (mtext__from_data): Delete unnecessary check. Fix number of
928 (mtext_from_data): Don't count items.
929 (mtext_ref_char): Optimize the code.
930 (mtext_set_char): Pay attention to format other than utf-8.
931 (mtext_cat_char): Likewise.
932 (mtext_dup): Don't call copy, instead do allocation here.
933 (mtext_cat): Call insert instead of copy.
934 (mtext_ncat): Likewise.
935 (mtext_cpy): Delete character at first and call insert instead of
937 (mtext_ncpy): Likewise.
938 (mtext_copy): Likewise.
939 (mtext_duplicate): Call insert instead of copy.
940 (mtext_del): Pay attention to format other than utf-8.
941 (mtext_ins): Simply call insert.
942 (mtext_ins_char): Pay attention to format other than utf-8.
943 (mtext_tok): Call insert instead of copy.
944 (mtext_text): Call UNIT_BYTES.
946 * textprop.c (mtext__adjust_plist_for_change): New function.
948 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
949 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
950 (CHAR_UNITS_AT): Fix typo.
951 (CHAR_UNITS_BY_HEAD): Fix typo.
952 (STRING_CHAR_AND_UNITS): Fix typo.
954 * internal.h (MTEXT_READ_ONLY_P): New macro.
956 * mtext.h (mtext__replace): Delete the extern.
957 (mtext__adjust_foramt): Adjust prototype.
959 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
960 if possible. Otherwise make a copy of mmt.
962 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
965 2004-06-18 Kenichi Handa <handa@m17n.org>
967 * character.h (CHAR_STRING_UTF16): Fix syntax.
969 2004-06-16 Kenichi Handa <handa@m17n.org>
971 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
972 (libm17n_X_la_LIBADD): Delete it.
973 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
975 * m17n-X.c (device_open): Add parens in `if' condition.
977 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
978 (DEC_POSITION): Likewise.
979 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
981 2004-06-15 Kenichi Handa <handa@m17n.org>
983 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
986 * draw.c (compose_glyph_string): If langauge is specified, call
987 mface__for_chars even if a text is all latin. Fix condition for
988 setting non_ascii_found.
990 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
992 * m17n.h (minput_char_to_key): Delete extern.
994 * m17n-gui.h (minput_event_to_key): Cancel previous change.
996 * m17n-gui.c (null_device_open): Set several members of frame.
998 2004-06-14 Kenichi Handa <handa@m17n.org>
1000 * m17n-gui.h (minput_event_to_key): Delete extern.
1002 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
1004 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
1006 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
1008 2004-06-08 Kenichi Handa <handa@m17n.org>
1010 * character.c (mchar_put_prop): Don't increment the ref-count of
1013 2004-06-04 Kenichi Handa <handa@m17n.org>
1015 * m17n-core.c (mdebug__register_object): New function.
1016 (mdebug__unregister_object): Likewise.
1018 * internal.h (mdebug__register_object, mdebug__unregister_object):
1020 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
1023 * charset.c (mcharset__load_from_database): Don't call
1024 mconv__register_charset_coding here.
1026 * coding.c (find_coding): Get a real name from an element of
1027 coding_definition_list.
1028 (mconv__register_charset_coding): Set the real name at the top of
1030 (mcoding__load_from_database): Likewise.
1031 (mconv_list_codings): Adjusted for the above change.
1033 2004-06-03 Kenichi Handa <handa@m17n.org>
1035 * coding.c (find_coding): Find by canonicalized name. Don't have
1036 to modify the element of coding_definition_list by
1038 (mconv__define_coding_from_charset): Delete it.
1039 (mconv__register_charset_coding): Canonicalize sym.
1040 (mcoding__load_from_database): Register plist modified by
1043 * coding.h (mconv__define_coding_from_charset): Don't extern it.
1045 * font-ft.c (ft_open): Fix setting of rfont->descent.
1047 2004-06-02 Kenichi Handa <handa@m17n.org>
1049 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
1050 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
1051 (xlfd_unparse_name): Renamed from xfont_build_name.
1052 (mfont__init): Initialized Mfontconfig.
1053 (mfont__free_realized): Unconditionally unref rfont->info.
1054 (mfont__select): Free `this' if it's not best.
1055 (mfont__open): Don't check frame->realized_font_list.
1056 (mfont__parse_name_into_font): New function.
1057 (Mfontconfig): New variable.
1058 (mfont_from_name): Call mfont_parse_name.
1059 (mfont_name): Call mfont_unparse_name.
1060 (mdebug_dump_font): Likewise.
1062 * font.h (struct MFontDriver): Delete members parse_name and
1064 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
1065 (mfont__parse_name_into_font): Extern it.
1067 * font-ft.c: Include "symbol.h".
1068 (close_ft): Unconditionally free filename and charmap_list of
1070 (ft_open): Duplicate base->filename. Increment ref-count of
1071 ft_info->charmap_list. Free ft_info->charmap_list and
1072 ft_info->filename on error.
1073 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
1075 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
1077 (enum xlfd_field_idx): Moved to font.c.
1078 (split_font_name, build_font_name): Likewise.
1079 (build_font_list): Call mfont__parse_name_info_font.
1080 (xfont_open): Call mfont__unparse_name. Free name.
1081 (xfont_parse_name, xfont_build_name): Moved to font.c
1082 (xft_select): Prototype deleted.
1083 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
1084 Call mfont_pase_name.
1086 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
1087 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
1090 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
1093 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
1095 2004-06-01 Kenichi Handa <handa@m17n.org>
1097 * fontset.c (mfontset_modify_entry): Pay attention to the case
1098 that fontset->font_spec_list is NULL.
1100 2004-05-31 Kenichi Handa <handa@m17n.org>
1102 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
1104 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
1106 * font.c (mfont__select): Print score the a font for debugging.
1108 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
1110 * coding.c (reset_coding_sjis): Check kanji and kana instead of
1111 kanji_sym and kana_sym.
1113 2004-05-28 Kenichi Handa <handa@m17n.org>
1115 * Makefile.am (VINFO): New variable.
1116 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
1117 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
1119 2004-05-27 Kenichi Handa <handa@m17n.org>
1121 The following chanages are to make device dependent functions
1122 accessible only from MDeviceDriver structure, and to add GD and
1123 null device drivers. Font drivers get also device dependent.
1125 * m17n.c (m17n_init): Increament shell_initialized.
1126 (m17n_fini): Decremented shell_initialized.
1128 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
1130 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
1131 (Mwidget, Mcolormap, Mx): Extern them.
1133 * m17n-gui.c: Include <dlfcn.h> and "config.h".
1134 (free_frame): Call frame->driver->close instead of
1136 (DLOPEN_SHLIB_EXT): New macro.
1137 (MDeviceLibraryInterface): New type.
1138 (device_library_list): New variable.
1139 (register_device_library): New function.
1140 (null_device): New variable.
1141 (null_device_close, null_device_get_prop)
1142 (null_device_realize_face, null_device_free_realized_face): New
1144 (null_driver): New variable.
1145 (null_device_init, null_device_fini, null_device_open): New
1147 (null_interface): New variable.
1148 (Mfreetype, Mdevice): Declare them.
1149 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
1150 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
1151 Mwin__Close_Device. Register drivers for Mx and Mgd.
1152 (m17n_fini_win): Decremented win_initialized. Call "fini"
1153 function of all opened devices. Don't call mwin__fini.
1154 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
1156 (mframe): Handle Mdevice key of PLIST.
1157 (mframe_get_prop): Call frame->device->get_prop instead of
1158 mwin__device_get_prop.
1160 * m17n-gd.c: New file.
1162 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
1163 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
1165 * m17n-core.c (m17n_init_core): Increate core_initialized.
1166 (m17n_fini_core): Decremented core_initialized.
1168 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
1169 (Mcolormap): Don't extern them here.
1171 * m17n-X.c (FRAME_DEVICE): New macro.
1172 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
1173 (free_display_info): Use MPLIST_DO.
1174 (free_device): Free rface->info.
1175 (xft_close): Delete it.
1176 (device_init): Renamed from mwin__init.
1177 (device_fini): Renamed from mwin__fini.
1178 (device_open): Renamed from mwin__open_device.
1179 (x_driver): New variable.
1180 (MXFontInfo): Delete member frame, add member display.
1181 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
1182 Don't declare them here.
1184 * internal-gui.h (MDeviceType): New enum.
1185 (MWDefice): Delete it.
1186 (struct MFrame): Change type of device to void *. New members
1187 device_type, driver, font_driver_list.
1188 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
1189 (MDeviceDriver): New type.
1190 (Mx, Mgd, Mfreetype): Extern them.
1191 (mwin__XXX): Delete all of them.
1193 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
1195 (win_destroy_ic): Likewise.
1196 (adjust_window_and_draw): Likewise.
1197 (win_callback): Likewise.
1198 (Mxim): Declare it here.
1199 (minput_event_to_key): Call M_CHECK_READABLE.
1201 * fontset.c (mfont__lookup_fontset): Delete local variable
1204 * font.h (struct MFontDriver): Delete member close, add members
1205 parse_name and build_name.
1206 (mfont__driver_list): Delete extern.
1207 (mfont__close): Delete extern.
1209 * font.c (mfont__init): Don't set mfont__driver_list.
1210 (mfont__fini): Don't unref mfont__driver_list.
1211 (mfont__select): Try font drivers in frame->font_driver_list. Set
1212 driver member of a realized font.
1213 (mfont__close): Delete it.
1214 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
1215 functions of the default frame.
1217 * font-ft.c (close_ft): Check ft_info->ft_face and work
1219 (add_font_info): Allocate ft_info by M17N_OBJECT.
1220 (ft_close): Delete it.
1221 (mfont__ft_driver): Don't set ft_close.
1222 (ft_select): Increment ref-count of best_font.
1223 (ft_open): Decremented ref-count of base. On error, call
1224 FT_Done_Face and free ft_info.
1225 (ft_find_metric): Always use XXX_MONO in load_flags.
1226 (ft_render): Fix setting of width. Call
1227 frame->driver->draw_points instead of mwin__draw_points.
1228 (ft_to_prop): Don't set mfont__driver_list.
1229 (mfont__ft_fini): Just unref ft_info.
1231 * face.c (mface__init): Exchange foreground and background of
1232 mface__default. Call mface_put_prop to set hline of
1234 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
1235 (mface__free_realized): Don't call mwin__free_realized_face.
1237 * draw.c (Mdepth): Don't declare it here.
1238 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
1239 (render_glyphs, render_glyph_string): Likewise.
1240 (mdraw__init): Don't set Mdepth.
1241 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
1243 (mdraw_text_per_char_extents): Return 0 on success and -1 on
1245 (mdraw_text_items): Check FRAME is writable.
1246 (mdraw_per_char_extents): Implement body.
1248 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
1250 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
1251 (GUI_SOURCES): Delete it.
1252 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
1253 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
1254 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
1255 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
1256 (linkgui_LDADD): Set to libm17n-gui.la
1257 (linkgui_LDFLAGS): New target.
1258 (SRC): Include ${libm17n_gui_la_SOURCES} and
1259 ${libm17n_gd_la_SOURCES}.
1261 2004-05-24 Kenichi Handa <handa@m17n.org>
1263 * draw.c (draw_background): Don't draw background even if
1264 rface->face.property[MFACE_BACKGROUND] is not Mnil.
1266 2004-05-22 Kenichi Handa <handa@m17n.org>
1268 * m17n-X.c (xft_open_font): Fix anti_alias setting.
1270 2004-05-20 Kenichi Handa <handa@m17n.org>
1272 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
1274 * m17n-gui.c: Include "plist.h".
1275 (mframe): If PLIST is NULL, initialize it to emply plist.
1277 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
1278 (xft_driver): New variable.
1279 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
1280 (xft_find_metric, xft_render): New function.
1281 (mwin__init): Adjusted for the new mfont__driver_list.
1282 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
1283 generated face to PARAM.
1284 (mwin__realize_face): Fix setting of box colors. Don't call hook
1286 (mwin__draw_hline): New function.
1287 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
1288 (mwin__xft_render): Delete these function.
1290 * internal-gui.h (struct MFrame): New member tick.
1291 (struct MGlyphString): New member tick.
1292 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
1293 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
1294 (mwin__xft_render): Delete extern.
1296 * fontset.c (mfont__lookup_fontset): Make the code simpler.
1297 (mfontset): Always increment the reference count of returned
1300 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
1301 (MFTInfo): Moved to font.h.
1302 (ft_iso8859_1_font_list): Delete this variable.
1303 (set_font_info): Don't set font->property[MFONT_TYPE].
1304 (set_font_info): Don't udpate ft_iso8859_1_font_list.
1305 (add_font_info): Change type to void.
1306 (fc_list): Change anme from xft_list. Caller changed. Include
1307 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
1308 (mfont__ft_driver): Change name from ft_driver. Caller changed.
1309 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
1310 (close_ft): Don't call mwin__xft_close. Unref
1311 ft_info->extra_info.
1312 (ft_open): Don't setup ft_info->fontname. Don't call
1314 (ft_find_metric): Don't call mwin__xft_get_metric.
1315 (ft_encode_char): Call rfont->driver->open instead of ft_open.
1316 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
1317 (mfont__ft_init): Adjusted for new mfont__driver_list.
1318 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
1320 * font.c (mfont__driver_list): Make it MPlist.
1321 (mfont__init): Adjust initialization of mfont__driver_list.
1322 (mfont__fini): Free mfont__driver_list.
1323 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
1324 (mfont__select): Adjusted for the new mfont__driver_list.
1326 * font.h (enum MFontProperty): Delete MFONT_TYPE.
1327 (mfont__drirver_list): Adjust prototype.
1328 (MFTInfo): Move to here from fron.c. Deleve member fontname.
1330 * face.h (struct MFace): Delete member realized_face_list, add
1332 (struct MRealizedFace): Delete member need_update
1333 andnofont_rface, add member non_ascii_list.
1334 (mface__update_frame_face): Extern it.
1336 * face.c (hline_prop_list, box_prop_list, noop_hook): New
1338 (get_hline_create, get_box_create): New functions.
1339 (find_realized_face): Cancel previous change. Arg RFONT deleted.
1341 (free_face): Cancep previous change. Free face->frame_list.
1342 (serialize_hline): Do nothing if hline->width is zero.
1343 (serialize_box): Do nothing if box->width is zero.
1344 (mface__init): Setup all properties of mface__default.
1345 (mface__fini): Free hline_prop_list and box_prop_list.
1346 (mface__realize): Cancel previous change. Update
1347 face->frame_list. Setup rface->non_ascii_list.
1348 (mface__for_chars): Update rface->non_ascii_list.
1349 (mface__free_realized): Free rface->non_ascii_list.
1350 (mface__update_frame_face): New function.
1351 (mface): Initialize face->frame_list.
1352 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
1354 (mface_merge): Likewise.
1355 (mface_put_prop): If key is Mhline or Mbox, get value by
1356 get_hline_create or get_box_create respectively.
1357 (mface_put_prop): Update frame->tick and call
1358 mface__update_frame_face if necessary.
1359 (mface_update): Do nothing if func is noop_hook.
1361 * draw.c (render_glyphs): If a font is not found, use
1362 mwin__draw_empty_boxes.
1363 (alloc_gstring): Initialize gstring->tick.
1364 (get_gstring): Check gstring->tick.
1366 2004-05-17 Kenichi Handa <handa@m17n.org>
1368 * face.c (find_realized_face): Return value changed. If RFONT is
1369 NULL, avoid unnecessary checking.
1370 (free_face): Free face->realized_face_list.
1371 (mface__realize): Adjusted for the change of find_realized_face.
1372 If it returns a realized face that needs update, free it and
1373 realize a new one. Push a new realized face to
1374 frame->realized_face_list instead of appending.
1375 (mface__for_chars): Adjusted for the change of find_realized_face.
1376 Short cut if the required font is in rface->ascii_rface.
1377 (mface_put_prop): Free old value if necessary. Set need_update
1378 member of realized faces to 1.
1380 * face.h (struct MFace): Delete member tick, add member
1382 (struct MRealizedFace): Delete member tick, add member
1385 2004-05-13 Kenichi Handa <handa@m17n.org>
1387 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
1389 2004-05-12 Kenichi Handa <handa@m17n.org>
1391 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
1393 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
1394 parse it XftNameParse.
1396 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
1397 (all_fonts_scaned): New variable.
1398 (set_font_info): FAMILY may be Mnil.
1399 (add_font_info): Argument changed.
1400 (xft_list): Call add_font_info in it.
1401 (ft_list): Likewise.
1402 (ft_select): Make it work in the case family is Mnil.
1403 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
1404 (mfont__ft_fini): Set all_fonts_scaned to 0.
1406 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
1407 that is failed to open.
1409 2004-05-10 Kenichi Handa <handa@m17n.org>
1411 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
1412 device's depth is 1 (i.e. monochrome).
1414 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
1415 to work around the problem of libtool.
1417 * font-ft.c: Include <freetype/ftbdf.h>.
1418 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
1420 (mfont__ft_init): Initialize them.
1421 (ft_iso8859_1_font_list): New variable.
1422 (set_font_info): Detect a font containing iso8859-1 glyphs and
1423 register it in ft_iso8859_1_font_list. If the font is not
1424 scalable, assume it as BDF or PCF font and setup SIZE and RESY
1425 properties of the font from its properties.
1426 (add_font_list): If the font is not scalable, check if it is BDF
1427 or PCF font. If not, ignore it.
1428 (ft_select): If FAMILY is Mnil, return NULL only if the requested
1429 registry is not iso8859-1.
1430 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
1431 ft_iso8859_1_font_list.
1432 (ft_find_metric): If the font is not scalable, assume it as BDF
1433 or PCF, and get a metric from its properties.
1434 (mfont__ft_fini): Free ft_iso8859_1_font_list.
1436 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
1438 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
1439 (libm17n_la_LDFLAGS): Delete it.
1440 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
1441 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
1443 2004-05-06 Kenichi Handa <handa@m17n.org>
1445 * draw.c (compose_glyph_string): Fix previous change.
1447 2004-04-30 Kenichi Handa <handa@m17n.org>
1449 * font-ft.c (ft_list): Delete unused variable `result'.
1450 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
1452 2004-04-27 Kenichi Handa <handa@m17n.org>
1454 * m17n-X.c: Include config.h
1455 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
1456 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
1457 (MWDevice) [HAVE_XFT2]: New member xft_draw.
1458 (FRAME_CMAP, FRAME_VISUAL): New macros.
1459 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
1460 (xfont_driver): Make it static.
1461 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
1462 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
1463 info->xft_color_back.
1464 (MXftFontInfo) [HAVE_XFT2]: New type.
1465 (mwin__xft_close) [HAVE_XFT2]: New function.
1466 (mwin__xft_open) [HAVE_XFT2]: New function.
1467 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
1468 (mwin__xft_render) [HAVE_XFT2]: New function.
1470 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
1471 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
1472 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
1475 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
1477 * font-ft.c: Don't include FT_FREETYPE_H here.
1478 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
1479 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
1480 (MFTInfo): New member charmap_index.
1481 (MFTInfo) [HAVE_XFT2]: New member xft_info.
1482 (check_otf_filename): Renamed from check_filename. Return value
1484 (ft_set_property): This function deleted.
1485 (set_font_info): New function.
1486 (add_font_list): Argument changed. Add multiple fonts.
1487 (xft_list) [HAVE_XFT2]: New function.
1488 (ft_list) [not HAVE_XFT2]: New function.
1489 (ft_select): Add code for Xft.
1490 (close_ft): Likewise.
1491 (ft_open): Likewise.
1492 (ft_find_metric): Likewise.
1493 (ft_encode_char): Likewise.
1494 (ft_render): Likewise.
1496 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
1498 2004-04-26 Kenichi Handa <handa@m17n.org>
1500 * textprop.c (mtext_attach_property): Declare the return type as
1503 2004-04-21 Kenichi Handa <handa@m17n.org>
1505 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
1507 2004-04-09 Kenichi Handa <handa@m17n.org>
1509 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
1511 (load_command): Setup above members.
1513 2004-04-05 Kenichi Handa <handa@m17n.org>
1515 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
1517 2004-03-30 Kenichi Handa <handa@m17n.org>
1519 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
1522 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
1523 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
1525 2004-03-29 Kenichi Handa <handa@m17n.org>
1527 * Version 1.0 Patch Level 2 released.
1529 2004-03-29 Kenichi Handa <handa@m17n.org>
1531 * charset.c (make_charset): Set charset->fully_loaded and
1532 charset->simple correctly. Don't try to get charset->min_char and
1533 charset->max_char for a charset of method subset and superset.
1534 Don't load a mapping file here.
1535 (mcharset__init): Set unified_max.
1536 (mcharset__load_from_database): Free a working plist.
1538 * coding.c (mcoding__fini): Free all malloced data.
1540 * input-gui.c (win_create_ic): Set control.as_image for preediting
1543 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
1544 `count') to initialize the array.
1546 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
1549 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
1551 (mwin__create_window): Fix bug of setting a background pixel of a
1553 (mwin__adjust_window): Clear the window before drawing.
1555 * m17n-core.c (mdebug__report_object): Free array->objectes if
1557 (m17n_init_core): Don't set report_header_printed to 0 here.
1558 Fix debugging information.
1559 (m17n_fini_core): Set report_header_printed to 0 here.
1561 * m17n-core.h (mplist_deserialize): Extern it.
1563 * m17n-gui.c (m17n_fini_win): Fix debugging information.
1565 * m17n.c (m17n_fini): Fix debugging information.
1567 * mtext.c (mtext__adjust_foramt): New function.
1569 * mtext.h (mtext__adjust_foramt): Extern it.
1571 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
1573 * plist.h (mplist__deserialize): Don't extern it.
1575 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
1576 elements of symbol_table to NULL. Report about created and freed
1577 symbols if MDEBUG_FINI is set.
1579 2004-03-22 Kenichi Handa <handa@m17n.org>
1581 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
1583 * m17n.c (m17n_init): Fix the way of checking merror_code.
1585 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
1587 2004-03-22 Kenichi Handa <handa@m17n.org>
1589 * fontset.c (realize_font_group): Adjust the font size by
1590 mfont__resize before selecting a font.
1592 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
1594 2004-03-19 Kenichi Handa <handa@m17n.org>
1596 * Version 1.0 Patch Level 1 released.
1598 2004-03-19 Kenichi Handa <handa@m17n.org>
1600 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
1602 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
1604 2004-03-19 Kenichi Handa <handa@m17n.org>
1606 Re-apply the changes forgotten in the released version.
1608 * charset.c (mcharset__load_from_database): Call
1609 mchar_define_charset.
1611 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
1612 (mconv_encode_range): Put Mcoding text property.
1614 2004-03-18 Kenichi Handa <handa@m17n.org>
1616 * draw.c (Mdepth): New variable.
1617 (visual_order): Delete unused local var `pos'.
1618 (compose_glyph_string): Fix for the case that gstring->glyphs is
1619 realloced. Stop generating glyphs at TO. Fix handling of
1621 (layout_glyphs): Get metrics of all glyphs in advance. Set
1622 lbearing and rbearing of base of composition glyph correctly.
1623 Handle left-overhang glyphs correctly.
1624 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
1626 (dump_combining_code): Change the defualt off_x character to ".".
1627 (mdraw__init): Initialize Mdepth.
1629 * face.c (work_gstring): New variable
1630 (mface__init): Initialize work_gstring.
1631 (mface__fini): Free work_gstring.glyphs.
1632 (mface__realize): Don't handle videomode property here. Adjusted
1633 for the change of mfont__get_metric.
1634 (mface__for_chars): Adjusted for the change of mfont__get_metric.
1636 * face.h (enum face_gc): Moved to m17n-X.c.
1638 * font.h (struct MFontDriver): Arguments of find_metric changed.
1639 (mfont__select): Prototype adjusted.
1640 (mfont__get_metric): Likewise.
1641 (mfont__ft_drive_otf): Likewise.
1642 (mfont__flt_run): Likewise.
1644 * font.c (mfont__select): New argument layouter. If layouter is
1645 different in the registered font, make a new copy of realized
1647 (mfont__get_metric): Argument changed. Get metrics of multiple
1649 (mfont_find): Call mfont__select with layouter as Mnil.
1651 * font-flt.c (FontLayoutContext): New member rfont.
1652 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
1653 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
1655 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
1657 (NUM_POINTS): New macro.
1658 (MPointTable): New type.
1659 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
1660 (mfont__ft_drive_otf): New argument rfont.
1662 * fontset.c (realize_font_group): Adjusted for the changed of
1664 (check_fontset_element): This function deleted.
1666 * input-gui.c (adjust_window_and_draw): Locate a preedit window
1667 off the parent window if the preedit text is zero length.
1669 * internal-gui.h (struct MFrame): New members foreground,
1670 background, videomode, font.
1671 (struct MGlyphString): New member anti_alias.
1672 (MDrawPoint): New type.
1673 (mwin__draw_bitmap): Prototype deleted.
1674 (mwin__draw_points): Prototype added.
1676 * m17n-gui.h (MDrawControl): New member anti_alias.
1678 * m17n-gui.c (free_frame): Free frame->font.
1679 (mframe): Set the fontset of frame->face to the default fontset.
1681 * m17n-X.c (RGB_GC): New type.
1682 (enum gc_index): Renamed from enum face_gc. Member names changed.
1684 (struct MWDevice): Members foreground and background deleted. New
1685 member scratch_gc, gc_list.
1686 (DEFAULT_FONT, FALLBACK_FONT): New macros.
1687 (free_device): Free GCs in device->gc_list.
1688 (get_rgb_gc): New function.
1689 (get_gc): Renamed and argument changed from get_color.
1690 (get_gc_for_anti_alias): New function.
1691 (xfont_find_metric): Arguments changed. Get metrics of multiple
1693 (set_region): Argument changed. Caller changed.
1694 (xfont_render): Allways set a font in gc.
1695 (x_error_handler, x_io_error_handler): Define only if
1696 X_SET_ERROR_HANDLER is defined.
1697 (mwin__open_device): Create device->scratch_gc. Set members
1698 foreground, background, and videomode of frame. Call
1699 XSetErrorHandler and XSetIOErrorHandler only if
1700 X_SET_ERROR_HANDLER is defined.
1701 (struct gc_list): Deleted.
1702 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
1703 (mwin__realize_face): Adjusted for the change of the format of
1704 rface->info and the charge of set_region.
1705 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
1706 (mwin__draw_box): Likewise.
1707 (mwin__draw_bitmap): This function deleted.
1708 (mwin__draw_points): New function.
1709 (mwin__verify_region): Adjusted for the change of the format of
1710 rface->info and the charge of set_region.
1711 (mwin__create_window): Inherit backgound pixel from parent.
1712 (mwin__dump_gc): Adjusted for the change of the format of
1715 2004-03-16 Kenichi Handa <handa@m17n.org>
1717 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
1719 * input.c (M_key_alias): New variable.
1720 (handle_key): Try M_key_alias property of a key too.
1721 (minput__init): Initialize M_key_alias. Give that property to
1722 symbols in one_char_symbol. Fix bug of initializing
1725 * draw.c (compose_glyph_string): Don't handle
1726 ignore_formatting_char here. Include formatting characters in the
1727 range processed by a FTL.
1728 (layout_glyph_string): Handle ignore_formatting_char here.
1730 2004-03-12 Kenichi Handa <handa@m17n.org>
1732 * input-gui.c (win_create_ic): Enable bidi in status control.
1734 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
1736 2004-03-09 Kenichi Handa <handa@m17n.org>
1738 * input.c (load_input_method): If title is not specified, use the
1739 input method name as title.
1741 * m17n-X.c (get_color): Make it static.
1742 (xim_create_ic, xim_destroy_ic, x_error_handler)
1743 (x_io_error_handler): Likewise.
1745 2004-03-01 Kenichi Handa <handa@m17n.org>
1747 * Version 1.0 released.
1750 Copyright (C) 2003, 2004
1751 National Institute of Advanced Industrial Science and Technology (AIST)
1752 Registration Number H15PRO112
1754 This file is part of the m17n library.
1756 The m17n library is free software; you can redistribute it and/or
1757 modify it under the terms of the GNU Lesser General Public License
1758 as published by the Free Software Foundation; either version 2.1 of
1759 the License, or (at your option) any later version.
1761 The m17n library is distributed in the hope that it will be useful,
1762 but WITHOUT ANY WARRANTY; without even the implied warranty of
1763 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1764 Lesser General Public License for more details.
1766 You should have received a copy of the GNU Lesser General Public
1767 License along with the m17n library; if not, write to the Free
1768 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA