32b86e2ee5298db376b2cb222e8c735700b120fa
[m17n/m17n-lib.git] / src / ChangeLog
1 2005-12-13  Kenichi Handa  <handa@m17n.org>
2
3         * font.h (mfont__resize): Delete extern.
4
5         * font.c (mfont__list): Check resize ratio.
6         (mfont__resize): Delete it.
7         (mfont_resize_ratio): Include the code of mfont__resize.
8
9         * font-ft.c (ft_open): Check resize ratio.
10
11         * m17n-X.c (xfont_open): Check resize ratio.
12         (xft_open): Likewise.
13
14 2005-12-07  Kenichi Handa  <handa@m17n.org>
15
16         * input.c (take_action_list): If take_action_list return -1,
17         return -1.
18         (handle_key): Likewise.
19
20         * face.c (mface__for_chars): When font is specified and layouter
21         is found for it, if the layouter doesn't support one of a
22         character, use a face sans layouter for it.
23
24 2005-12-06  Kenichi Handa  <handa@m17n.org>
25
26         * fontset.c (mfont__lookup_fontset): If only a fallback font is
27         found, don't use it for more than one character.
28
29 2005-12-05  Kenichi Handa  <handa@m17n.org>
30
31         * face.c (mface__realize): Set rfont->layouter to Mnil.
32         (mface__for_chars): Fix handling of layouter.
33
34         * character.h (mchar__define_prop): Extern it.
35
36         * database.c (update_database_list): Call mchar__define_prop if
37         necessary.
38
39         * character.c (mchar__init): Don't call mchar_define_property.
40         Instead just initialize property keys.
41         (mchar__fini): Free char_prop_list only if it's not NULL.
42         (mchar__define_prop): New function.
43         (mchar_define_property): Call mchar__define_prop.
44
45         * m17n-core.c (m17n_fini_core): Call mtext__prop_fini at after
46         mplist__fini.
47
48 2005-12-02  Kenichi Handa  <handa@m17n.org>
49
50         * language.c (mlang__init): Handle extra chars.
51
52         * m17n-gui.h (mfont_check): Adjust prototype.
53
54         * m17n-X.c (xfont_driver): Specify xfont_check_capability.
55         (xfont_check_capability): New function.
56         (xft_driver): Specify xft_check_capability.
57         (xft_check_capability): New function.
58
59         * font-ft.c (M0_3): Delete it.
60         (M0): New variable.
61         (ft_get_charmaps): Refer to M0.
62         (fc_parse_pattern): Fix previous change.
63         (ft_list_language): Check also extra chars.
64         (ft_check_otf): Define it even if HAVE_OTF is undef.
65         (ft_check_lang): Check the result of FcLangSetHasLang against
66         FcLangDifferentLang.  Check also extra chars.
67         (ft_list_capability): Delete ifdef HAVE_OTF.
68         (ft_select): Likewise.
69         (ft_open): Improve debug information.
70         (ft_check_capability): New function.
71         (mfont__ft_driver): Specify ft_check_capability.
72         (mfont__ft_init): Initialize M0.
73
74         * fontset.c (get_font_from_group): New function.
75         (mfontset__get_font): New function.
76
77         * fontset.h (mfontset__get_font): Extern it.
78
79         * font.c (OTF_tag): Define it if HAVE_OTF is undef.
80         (mfont__fini): Delete ifdef HAVE_OTF.
81         (free_font_capability): Likewise.
82         (mfont__get_capability): Likewise.
83         (mfont__check_capability): New function.
84         (mfont_check): Change the order of arguments.  Use
85         mfontset__get_font.
86
87         * font.h (struct MFontDriver): New member check_capability.
88         (MFontCapability): Delete ifdef HAVE_OTF.
89         (mfont__check_capability): Extern it.
90
91         * face.c (mface__realize): Fix handling of FONT arg.
92         (mface__for_chars): Fix handling of explicitly specified font.
93
94 2005-11-25  Kenichi Handa  <handa@m17n.org>
95
96         * font-flt.c (run_command): Print debug info for
97         left/rigth_padding
98
99         * draw.c (layout_glyphs): Fix handling of left/right_padding.
100
101         * face.c (mface__for_chars): Check rfont before accessing the
102         members.
103
104 2005-11-21  Kenichi Handa  <handa@m17n.org>
105
106         * Makefile.am (lib_LTLIBRARIES): Define it conditionaly on
107         WITH_GUI.
108
109         * fontset.c (fontset_table): New variable.
110         (free_fontset): Call M17N_OBJECT_UNREGISTER.
111         (mfont__fontset_init): Add fontset_table as an object array.
112         (mfont__realize_fontset): Ref FONTSET.
113         (mfont__free_realized_fontset): Unref REALIZED->fontset.
114         (mfontset): Call M17N_OBJECT_REGISTER.
115         (mfontset_copy): Likewise.
116
117         * input.c (handle_key): For debugging, print information about
118         alias key.
119         (filter): Add an alias for Meta and Alt modifiers.
120         (Mcond, Mplus, Mminus, Mstar, Mslush, Mand, Mor, Mnot): New
121         variables.
122         (minput__init): Initialize them.
123         (parse_expression): New function.
124         (resolve_expression): New function.
125         (parse_action_list): Handle expressions by parse_expression.
126         (take_action_list): Handle expressions by resolve_expression.
127         (parse_nested_list_value): Fix previous change.
128         (resolve_command): Fix handling of the return value of
129         get_nested_list.
130
131 2005-11-18  Kenichi Handa  <handa@m17n.org>
132
133         * font-ft.c (ft_check_otf, otf_script_list): Define only when
134         HAVE_OTF is defined.
135         (ft_list_capability): Call ft_check_otf only when HAVE_OTF is
136         defined.
137         (ft_select): Likewise.
138
139         * font.c (mfont_list): Fix for the case that FONT is NULL.
140         (OTF_tag): Delete it.
141         (load_otf_script_list): Define only when HAVE_OTF is defined.
142         (mfont__fini): Unref otf_script_list only when HAVE_OTF is
143         defined.
144
145         * draw.c (truncate_gstring): Be sure to truncate at
146         glapheme-cluster boundary.
147
148 2005-11-11  Kenichi Handa  <handa@m17n.org>
149
150         * input.c (delete_surrounding_text): Clear cache if necessary.
151
152 2005-11-09  Kenichi Handa  <handa@m17n.org>
153
154         * draw.c (compose_glyph_string): Update prev->rface->rfont if the
155         glyph prev is also supported by the current flt.
156
157 2005-11-08  Kenichi Handa  <handa@m17n.org>
158
159         * m17n-X.c (xft_render): Cancel previous change.
160
161 2005-11-07  Kenichi Handa  <handa@m17n.org>
162
163         * input.c: Include <stdlib.h>.
164         (get_surrounding_text, delete_surrounding_text)
165         (get_preceding_char, get_following_char): New functions.
166         (integer_value): New arg surrounding.  If it is nonzero, try to
167         get a surrounding character.  Callers changed.
168         (take_action_list): Check `value' before setting an element.
169         (destroy_ic): Unref ic_info->preceding_text and
170         ic_info->following_text.
171         (minput__init): Initialize Minput_get_surrounding_text and
172         Minput_delete_surrounding_text.
173         (Minput_get_surrounding_text, Minput_delete_surrounding_text): New
174         variables.
175         (filter): Unref ic_info->preceding_text and
176         ic_info->following_text.
177
178         * m17n.h (Minput_get_surrounding_text, Minput_delete_surrounding_text):
179         Extern them.
180
181         * input.h (MInputContextInfo): New members preceding_text and
182         following_text.
183
184 2005-11-04  Kenichi Handa  <handa@m17n.org>
185
186         * input.c (parse_nested_list_value): Fix handling of the global
187         definition.
188         (get_nested_list): Get global definitions by load_partial_im_info.
189         (preedit_commit): Set ic->candidates_changed to bitwise or of enum
190         MInputCandidatesChanged.
191         (take_action_list): Likewise.
192         (reset_ic): Likewise.
193         (create_ic): Don't pay special attention to
194         Mcandidates_group_size.
195         (load_partial_im_info): Call mdatabase_find with correct 4th arg.
196         (minput_set_variable): Get a definition of varible by
197         mplist_find_by_value, not mplist_get.
198
199         * m17n.h (enum MInputCandidatesChanged): New enum.
200
201 2005-11-01  Kenichi Handa  <handa@m17n.org>
202
203         * m17n-X.c (xft_render): Check xft_draw's drawable before changing
204         it.
205         (mwin__destroy_window): If xft_draw's drawable is win, change it
206         to device->drawable before destroying win.
207
208 2005-10-31  Kenichi Handa  <handa@m17n.org>
209
210         * input.c (load_im_info): Fix adding of state.
211
212         * m17n-core.c (m17n_fini_core): Fix reporting of module
213         finalization.
214
215         * m17n.c (m17n_fini): Fix reporting of module finalization.
216
217         * m17n-gui.c (m17n_init_win): Fix reporting of module
218         finalization.
219
220 2005-10-29  Kenichi Handa  <handa@m17n.org>
221
222         * input.c (get_candidate_list): Fix the timing of referring plist.
223
224 2005-10-28  Kenichi Handa  <handa@m17n.org>
225
226         * input.c (load_branch): Ignore an undefined map name.
227         (load_im_info): Set im_info->title from `name' only if it's not
228         Mnil.
229         (shift_state): Always update ic->status.
230         (adjust_candidates): Renamed from adjust_candidate_command.
231         Argument changed.  Caller changed.
232         (get_candidate_list, regularize_action): New functions.
233         (take_action_list): Use them.  On handling Munhandle, don't set
234         ic_info->used to 0.
235         (handle_key): If KEY is not handled by MAP, and MAP has
236         branch_actions, perform them.
237
238         * database.c (mdatabase__fini): Free dir_info->filename;
239
240 2005-10-20  Kenichi Handa  <handa@m17n.org>
241
242         * input.c (marker_code): Accept '@@'.
243         (integer_value): Handle '@@'.
244         (parse_action_list): Accept a symbol argument.
245         (take_action_list): Resolve the symbol argument.  Handle the
246         integer argument.
247
248 2005-10-18  Kenichi Handa  <handa@m17n.org>
249
250         * input.c: Include "charset.h".
251         (M_candidates, Mcandidates_group_size, Mcandidates_charset): New
252         variables.
253         (MIMState): New member (M17NObject control).
254         (lookup_nested_list, set_nested_list, parse_nested_list_value)
255         (get_nested_list, resolve_variable): New functions.
256         (integer_value): New arg (MPlist **value).  Set it to the plist
257         element containing the value.
258         (resolve_command): New function.
259         (load_translation): New arg (MPlist *map_actions).
260         (load_branch): New args language and name.  If `keylist' is a
261         symbol, resolved that as a command name.
262         (free_map): New arg top.  Free map->map_actions only if top is
263         nonzero.
264         (free_state): New function.
265         (load_state): New arg name.
266         (im_info_list): New variable.
267         (free_im_info, get_im_info_by_tags): New functions.
268         (load_im_info): Arg key changed to plist.  Handle `include'.
269         Return (MInputMethodInfo *).
270         (preedit_commit): Ref ic->candidate_list.
271         (get_select_charset, adjust_candidate_command): New functions.
272         (take_action_list): Handle `include'.  Adjust candidate action
273         properly.  Handle control variables `candidates-charset' and
274         `candidates-group-size'.
275         (open_im): Use get_im_info.
276         (create_ic): Get global variables.
277         (load_partial_im_info): New function.
278         (get_im_info): New function.
279         (check_command_keyseq, check_command_list, check_variable_list):
280         New functions.
281         (minput__init): Don't handle M_database_hook and Mdetail_text.
282         Initialize M_candidates, Mcandidates_group_size,
283         Mcandidates_charset.
284         (parse_variable_list, get_variable_list, parse_command_list)
285         (get_command_list): Delete them.
286         (MDatabaseStatList, imdir_stat_list, input_method_hook): Delete them.
287         (minput__fini): Simply unref command_list and variable_list.
288         (minput_get_description): Adjusted for the new form of description.
289         (minput_get_commands): Use get_nested_list.
290         (minput_assign_command_keys): Likewise.
291         (minput_get_variables, minput_set_variable): Likewise.
292
293         * input.h (MInputMethodInfo): New members im and maps.
294
295         * database.h (M_database_hook): Delete extern.
296         (MDatabaseHookFunc): Delete extern.
297         (mdatabase__check): Extern it.
298
299         * database.c: Include <glob.h>.
300         (MAX_TIME): New macro.
301         (Masterisk): New variable.
302         (get_database_stream): Argument changed to (MDatabaseInfo *).
303         Callers changed.
304         (get_dir_info): Renamed from duplicate_dirname.  Callers changed.
305         (find_database): New function.
306         (update_database_list): New function.
307         (mdatabase__init): Initialize Masterisk.  Setup mdb_list by
308         calling update_database_list.
309         (mdatabase__check): New function.
310         (mdatabase_find): Use update_database and find_database.  Don't
311         handle MDatabaseHookFunc.
312         (mdatabase_list): Call update_database at first.
313         (mdatabase_define): Adjusted for the change of mdb->extra_info.
314         (MDatabaseList): New type.
315
316         * plist.h (mplist_conv, mplist__pop_unref): Extern them.
317
318         * m17n.h (Mdetail_text): Delete extern.
319
320         * m17n-core.h (mplist_conc): Delete extern.
321
322         * plist.c (mplist__conc): Renamed from mplist_conc.  Don't ref
323         tail.
324         (mplist_conc): Renamed to mplist__conc.
325         (mplist__pop_unref): New function.
326
327 2005-10-14  Kenichi Handa  <handa@m17n.org>
328
329         * plist.c (read_mtext_element): Ignore the sequence of '\\' and
330         newline.
331         (read_element): If keys is an empty plist, return any element
332         found first.
333         (dump_plist_element): Check if plist is nested.
334         (mplist_conc): Always ref tail.
335         (mplist_set): If key is a managing key, ref val in advance.
336
337         * plist.h (MPLIST_VAL_MANAGED_P): Delete this macro.
338         (MPLIST_NESTED_P, MPLIST_SET_NESTED_P): New macros.
339         (MPLIST_ADD_PLIST, MPLIST_PUSH_PLIST, MPLIST_PUT_PLIST): New
340         macros.
341
342         * fontset.c (free_fontset): Unref fontset_list if necessary.
343         (mfont__fontset_fini): Don't free fontset_list.  Unref
344         default_fontset.
345         (mfont__realize_fontset): Initialize request.
346         (mfontset): Ref default_fontset or fontset only if necessary.
347         (mfontset_copy): Don't ref copy.
348
349         * draw.c (render_glyphs): Check gend->type before checking
350         gend->to.
351
352         * font-ft.c (mfont__ft_fini): Unref ft_default_list.  Set all
353         unrefed plists to NULL.
354
355 2005-10-04  Kenichi Handa  <handa@m17n.org>
356
357         * textprop.c (mtext_serialize): Be sure to make mt
358         MTEXT_FORMAT_UTF_8 and NULL terminated.
359
360         * m17n-gui.c (m17n_init_win): Initialize Mcolormap.
361
362         * draw.c (mdraw_glyph_list): Fix settting of glyphs->font->source.
363
364 2005-10-03  Kenichi Handa  <handa@m17n.org>
365
366         * draw.c (mdraw_glyph_info): Pay attention to the case that FROM
367         is not at the beginning of line.
368
369 2005-09-22  Kenichi Handa  <handa@m17n.org>
370
371         * input.c: Include <sys/stat.h> and <unistd.h>.
372         (Minclude, Mcommit, Munhandle): New variables.
373         (minput__init): Initialize them.  Push only Mstate to
374         load_im_info_keys.   Add aliases C-lowercase for C-uppercase.
375         (parse_action_list): Allow integer arg for undo.  Handle Mcommit
376         and Munhandle.
377         (load_input_method): Handle "include" directive.  If no states are
378         loaded, return -1.
379         (shift_state): If state_name is Mt, shift back to the previous
380         state.  Call preedit_commit to commit preedit text.
381         (preedit_commit): New function.
382         (take_action_list): Improve debug printing.  Handle commit and
383         unhandle commands.
384         (handle_key): Check the return value of take_action_list.  Don't
385         take branch_actions just after changing to the root map.
386         (reset_ic): Reset all ic_info members.
387         (filter): When a key is not handled, just move ic_info->keys
388         instead fo calling reset_ic.
389         (load_im_info): If key is not Mstate, push Mmap to
390         load_im_info_keys.
391         (MDatabaseStatList): New type.
392         (imdir_stat_list): New variable.
393         (input_method_hook): Don't cancel the hook.  Check the
394         modification time of directories.
395         (minput__fini): Free imdir_stat_list;
396
397         * input.h (MInputContextInfo): New member prev_state.
398
399         * m17n-core.h (mplist_conc): Extern it.
400
401         * plist.c (mplist_conc): New function.
402
403         * mtext.c (mdebug_dump_mtext): Escape '"' and '\\' by '\\'.
404
405         * font.h (MRealizedFont): New member average_width.
406
407         * font-ft.c (ft_open): Set rface->average_width.
408
409         * font.c (xlfd_unparse_name): Print '*' before registry name.
410
411         * m17n-X.c (MDisplayInfo): New member AVERAGE_WIDTH.
412         (xfont_open): Set rfont->average_width.
413         (xft_open): Likewise.
414         (device_open): Initialize disp_info->AVERAGE_WIDTH.
415
416         * internal-gui.h (struct MFrame): New member average_width.
417
418         * m17n-gui.c (mframe): Fix setting of frame->rfont.
419         (mframe_get_prop): Return the average_width of a font.
420
421         * face.c (mface__realize): Set rface->average_width.
422         (mface__update_frame_face): Set frame->average_width.
423
424         * face.h (MRealizedFace): New member average_width.
425
426 2005-09-19  Kenichi Handa  <handa@m17n.org>
427
428         * font.c (xlfd_unparse_name): New arg full_xlfd.
429         (mfont__encode_char): Use shortcut only for X core fonts.
430         (mfont_unparse_name): Call xlfd_unparse_name with full_xlfd arg 1.
431         (mfont_put_prop): Handle `language' property.
432         (mdebug_dump_font): Call xlfd_unparse_name with full_xlfd arg 0.
433         Print file can capability info too.
434
435         * m17n-core.c (mdebug__output): New variable.
436         (SET_DEBUG_FLAG): Unset mask if env_value is '0'.
437         (m17n_init_core): Handle MDEBUG_ALL and MDEBUG_OUTPUT_FILE.
438         (m17n_fini_core): Close mdebug__output if it's not stderr.
439
440         * m17n-X.c (MDisplayInfo): New member MULE_BASELINE_OFFSET.
441         (xfont_open): Handle baseline_offset.
442         (xfont_find_metric): Likewise.
443         (xfont_render): Likewise.
444         (xft_open): Likewise.
445         (xft_render): Likewise.
446
447         * internal.h (MDebugMaskBit): Add MDEBUG_ALL.
448         (mdebug__output): Extern it.
449         (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
450         (MDEBUG_PRINT4, MDEBUG_PRINT5): Print to medebug__output.
451         (MDEBUG_DUMP): New macro.
452         (MDEBUG_PRINT_TIME): Print to medebug__output.
453
454         * font.h (MRealizedFont): New member baseline_offset.
455
456         * font-ft.c (ft_get_charmaps): Check if the font support iso8859-1
457         characters.
458         (fc_weight_table): Add FC_WEIGHT_REGULAR.
459         (ft_list_family): Check alias.
460         (ft_list_language): If language is "en", don't try to the second
461         step.
462         (ft_default_list): New variable.
463         (ft_list_default): New function.
464         (ft_select): If family is not specified, try only the default
465         fonts.  Treat the weights normal and medium same.
466         (ft_open): Fix debug message.  If registry is not specified, try
467         unicode-bmp.  Handle _MULE_BASELINE_OFFSET property of BDF fonts.
468         (ft_find_metric): Likewise.
469         (ft_render): Likewise.
470         (ft_list): Fix debug message.  Accept the registring iso8859-1.
471         If family is not specified, try only the default fonts.
472
473         * face.c (mface__realize): Fix logic of opening a font.
474
475 2005-09-16  Kenichi Handa  <handa@m17n.org>
476
477         * face.c (mface__realize): 
478
479         * m17n.h (Minput_focus_move, Minput_focus_in, Minput_focus_out):
480         Extern them.
481
482         * input.c (shift_state): Fix the condition of taking init actions.
483         (take_action_list): Fix handling of pushback action.
484         (handle_key): Don't change key while checking its alias.
485         (minput__init): Initialize new variables.
486         (Minput_focus_move, Minput_focus_in, Minput_focus_out): New
487         variables.
488
489 2005-09-12  Kenichi Handa  <handa@m17n.org>
490
491         * mtext.c (mtext__uppercase): Add proper open/close parens.
492         (mtext_titlecase): Add proper casting.
493
494         * input.c (parse_action_list): Handle the case that the arg is a
495         key sequence (MText or MPlist).
496         (take_action_list): Likewise.
497         (shift_state): Shorter debug message.
498         (handle_key): Terminate a debug message by "\n".
499         (reset_ic): Don't take initial actions here.
500         (minput_open_im): Print a debug message.
501         (minput_close_im): Likewise.
502         (minput_create_ic): Likewise.
503         (minput_destroy_ic): Likewise.
504
505 2005-09-09  TAKAHASHI Naoto  <ntakahas@m17n.org>
506
507         * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
508         Change API.
509
510 2005-09-07  TAKAHASHI Naoto  <ntakahas@m17n.org>
511         * character.c: Add "cased", "soft-dotted", and "case-mapping" in
512         mchar__init ().
513
514         * character.c: Add Japanese documentation for
515         mchar_get_prop_table ().
516
517 2005-09-06  TAKAHASHI Naoto  <ntakahas@m17n.org>
518
519         * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
520         (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
521         (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
522         New variables.
523         (init_case_conversion): New function.
524         (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
525         (uppercase_precheck, lowercase_precheck, final_sigma)
526         (after_soft_dotted, more_above, before_dot, after_i)
527         (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
528
529 2005-09-05  TAKAHASHI Naoto  <ntakahas@m17n.org>
530
531         * plist.c (read_mtext_element): Fix previous change.
532
533 2005-09-05  Kenichi Handa  <handa@m17n.org>
534
535         * plist.c (read_mtext_element): Handle \uXXXX notation.
536
537         * internal.h (MTABLE_MALLOC): Don't use a local variable.
538         (MTABLE_ALLOCA): Change the name of local variable.
539
540         * m17n-gd.c (device_open): Define it even if HAVE_GD nor
541         HAVE_FREETYPE are defined.
542
543         * m17n-X.c: Check HAVE_X11.
544
545         * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
546         directory listing libraries.
547         (noinst_PROGRAMS): Define it only in maintainer mode.
548
549 2005-09-02  Kenichi Handa  <handa@m17n.org>
550
551         * m17n-gui.h (mdraw_line_break_option): Extern it.
552
553         * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
554         end of the first glyph.
555         (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
556         them.
557         (mdraw_line_break_option): New variable.
558         (mdraw_default_line_break): Use mtext_line_break.
559
560         * mtext.h (wordseg_func_table): Don't extern it.
561         (mtext__wseg_fini): Extern it.
562
563         * mtext.c: Don't include word-thai.h.
564         (wordseg_func_table): Delete this variable.
565         (mtext__init): Don't initialize above.  Don't call
566         mtext__word_thai_init.
567         (mtext__fini): Don't free wordseg_func_table.  Call
568         mtext__wseg_fini instead fo mtext__word_thai_fini.
569         (MTextWordsegFunc): Don't typedef it.
570         (mtext__word_segment): Moved to mtext-wseg.c.
571
572         * m17n-core.h (enum MTextLineBreakOption): New enum.
573         (mtext_line_break): Extern it.
574
575         * mtext-wseg.c: New file.
576
577         * mtext-lbrk.c: New file.
578
579         * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
580         add mtext-lbrk.c and mtext-wseg.c.
581
582         * textprop.c (mtext__adjust_plist_for_change): Pay attention for
583         the case that head is NULL.
584
585 2005-09-01  Kenichi Handa  <handa@m17n.org>
586
587         * word-thai.c (wordseg_propertize): If the property value is nil,
588         don't make the property no-merge.
589         (thai_wordseg): Don't require *from and *to are set a priori.  Pay
590         attention to the case that they are NULL.
591         (mtext__word_thai_init): Make the name of Mthai_wordseg starts
592         with two spaces.
593
594         * character.c (mchar_get_prop_table): New function.
595
596         * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
597
598         * m17n-core.h (mtext_insert, mtext_replace): Extern them.
599         (mchar_get_prop_table): Extern it.
600
601         * textprop.c (prepare_to_modify): New arg deleting.  Callers changed.
602         (mtext__adjust_plist_for_change): Argument changed.  Callers changed.
603
604         * internal.h (enum MTextCoverage): New enum.
605         (MText): New member coverage.
606
607         * mtext.c (FORMAT_COVERAGE): New macro.
608         (insert): Copy mt2->coverage.
609         (mtext__from_data): Initialize mt->coverage.
610         (mtext__adjust_format): Update mt->coverage.
611         (mtext): Initialize mt->coverage.
612         (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
613         Update mt->coverage if necessary.
614         (mtext_duplicate): Copy mt->coverage.
615         (mtext_insert, mtext_replace): New functions.
616         (mtext_dup): Use mtext_duplicate.
617         (mtext__word_segment): Don't set *from and *to if a word
618         segmentation funcion is not found.
619         (mtext_ins_char): Fix typo.
620
621 2005-08-25  Kenichi Handa  <handa@m17n.org>
622
623         * font.h (MFont): New member for_full_width.
624
625         * font.c (compare_font_score): Prefer a font of not
626         for_full_width.
627
628         * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
629         registry charset of a font is one of CJK charsets.
630
631         * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
632         supports some of CJK.
633
634 2005-08-24  Kenichi Handa  <handa@m17n.org>
635
636         * m17n-gui.h (Mascent, Mdescent): Don't extern them.
637
638         * m17n-gui.c (null_device_open): Check Mresolution param and set
639         frame->dpi.
640
641         * m17n-gd.c (device_open): Check Mresolution param and set
642         frame->dpi.
643
644         * m17n-X.c (MWDevice): New member resy.
645         (xfont_open): Set ascent, descent, and max_advance members of
646         rfont.
647         (xft_open): Likewise.
648         (device_open): Compare also screen_num to find a device.  Set
649         device->resy and frame->dpi.
650
651         * internal-gui.h (MFrame): New member dpi.
652
653         * font.h (MRealizedFont): New member max_advance.
654
655         * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
656         (mfont__init): Don't initialize Mascent, Mdescent.
657         (Mascent, Mdescent): Delete these variables.
658         (mfont_get_prop): Fix previous change.  Check Mfont_ascent and
659         Mfont_descent instead of Mascent and Mdescent.
660         (mfont_put_prop): Allow negative size.
661         (mfont_find): Handle the case of spec->size < 0.  Fix previous
662         change.
663         (mfont_list): Handle the case of spec->size < 0.
664         (mfont_check): Likewise.
665
666         * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
667         (fc_get_pattern): Handle the case of font->size < 0.
668         (ft_open): Set ascent, descent, and max_advance members of rfont.
669         (ft_find_metric): Improve rounding.
670         (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
671         FC_SIZE.
672
673         * face.c (mface__realize): Handle the case of font->size < 0.
674
675 2005-08-22  Kenichi Handa  <handa@m17n.org>
676
677         * coding.c (MConverterStatus): Change the member buf to union.
678         (mconv_buffer_converter): Add const to the arg buf.
679         (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
680         (mconv_decode): Adjusted for the change of MConverterStatus.
681         (mconv_encode_range): Likewise.
682
683         * m17n.h (mconv_buffer_converter): Prototype adjusted.
684         (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
685
686 2005-08-20  Kenichi Handa  <handa@m17n.org>
687
688         * m17n-gui.h (mfont_from_name): Prototype adjusted.
689         (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
690
691         * m17n-X.c (xfont_open): Set members ascent, descent, and
692         max_advance of rfont.
693         (xft_open): Likewise.
694
695         * font-ft.c (ft_open): Set members ascent, descent, and max_advance
696         of rfont.
697         (mfont__ft_parse_name): Add const to the arg name.
698
699         * font.c (xlfd_parse_name): Add const to the arg name.  Call
700         mfont__set_property instead of mfont_set_spec.  Set font->spacing.
701         (xlfd_unparse_name): Handle spacing.
702         (mfont__init): Initialize new variables.
703         (mfont__id): Handle spacing.
704         (mfont__merge): Likewise.
705         (mfont__set_spec): This function deleted.
706         (mfont__parse_name_into_font): Add const to the arg name.  Fix the
707         condition of calling mfont__ft_parse_name.
708         (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
709         (mfont_get_prop): Handle properties spacing, ascent, descent,
710         and max-advance.
711         (mfont_find): Return a realized font.
712         (mfont_from_name): Add const to the arg name.
713
714         * font.h (enum MFontProperty): New member MFONT_SPACING.
715         (enum MFontSpacing): New enum.
716         (MFont): New members spacing and max_advance.
717         (mfont__ft_parse_name): Prototype adjusted.
718         (mfont__set_spec): Extern deleted.
719         (mfont__parse_name_into_font): Prototype adjusted.
720
721 2005-08-19  Kenichi Handa  <handa@m17n.org>
722
723         * m17n-gui.h (mfont_parse_name): Prototype adjusted.
724
725         * font.c (mfont_list): If FONT is null, use a temporary font.
726         (mfont_parse_name): Add const to the arg name.
727
728 2005-08-18  Kenichi Handa  <handa@m17n.org>
729
730         * word-thai.c: Surround code by #ifdef and #endif to escape from
731         doxygen.
732
733         * font-ft.c: Mostly re-written.
734
735         * font-flt.c (FontLayoutCmdOTF): This type deleted.
736         (FontLayoutCmd): Type of the member otf changed..
737         (load_otf_command): Adjusted for the format change of otf command.
738         (load_command): Likewise.
739         (free_flt_command): Unref cmd->body.otf.
740         (run_otf): Ajusted for the type change of otf_cmd.
741         (run_command): Ajusted for the type change of otf_cmd.  On
742         debugging, print ctx->combining_code.
743         (mfont__flt_run): Initialize ctx's members code_offset,
744         combining_code, and left_padding to 0.
745
746         * face.h (struct MRealizedFace): New member font.
747         (mface__realize): Prototype adjusted.
748
749         * face.c (find_realized_face): New arg font.
750         (find_realized_face): Adjusted for the change of MFont.
751         (mface__init): Call M17N_OBJECT_ADD_ARRAY.
752         (mface__fini): Don't call mdebug__report_object.
753         (mface__realize): New arg font.
754         (mface__for_chars): Adjusted for the change of mfont__encode_char.
755         Optimize the latin case.
756         (mface__free_realized): Free rface->font.
757         (mface__update_frame_face): Adjusted for the change of mface__realize.
758         (mface_equal): New function.
759
760         * draw.c (Mcommon): New variable.
761         (visual_order): Args to mfont__encode_char changed.
762         (compose_glyph_string): Handle Mfont text property.
763         (layout_glyphs): Adjusted for the change of MFont.
764         (mdraw__init): Initialize Mcommon.
765         (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
766
767         * font.h (enum MFontType): Members completely changed.
768         (enum MFontProperty): Move MFONT_SIZE to the tail.
769         (enum MFontSource): New enum.
770         (struct MFont): New members type, source, sizes, file, capability,
771         and encoding.
772         (struct MRealizedFont): Type of member font changed. Members
773         score, status, and encoding deleted.
774         (MFontScore): New type.
775         (MFontList): Member changed.
776         (struct MFontDriver): New member has_char.  Types of members
777         changed.
778         (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
779         (Mapple_roman): Extern them.
780         (OTF_Tag): Typedefed if not HAVE_OTF.
781         (enum MFontOpenTypeTable): New enum.
782         (MFontCapability): New type.
783         (mfont__ft_drive_otf): Prototype adjusted.
784         (mfont__score): Extern deleted.
785         (mfont__merge): Extern it.
786         (mfont__has_char): Extern it.
787         (mfont__encode_char): Prototype adjusted.
788         (mfont__open): Extern it.
789         (mfont__set_spec): Prototype adjusted.
790         (mfont__get_capability): Extern it.
791
792         * font.c: Include "fontset.h".
793         (M_font_capability, M_font_list, M_font_list_len): New variables.
794         (font_score_priority): Change order of initial elements.
795         (font_score_shift_bits): Fix array size.
796         (common_weight): Add "thin", "semibold", and "heavy".
797         (common_stretch): Add "ultracondensed", "extracondensed",
798         "extraexpanded", and "utltraexpand".
799         (font_weight_regular, font_weight_normal, font_weight_medium): New
800         variables.
801         (gen_font_name): This function deleted.
802         (find_encoding): Set font->encoding.
803         (OTF_tag): New function.
804         (otf_script_list): New variable.
805         (load_otf_script_list): New function.
806         (find_script_from_otf_tag): New function.
807         (xlfd_parse_name): Set font->type and font->source.
808         (mfont__free_realized): Free chains rfonts.
809         (font_score): Renamed from mfont__score.
810         (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
811         (Mapple_roman): New variables.
812         (mfont__init): Initilize new variables.  Initalize
813         default_encoding.encoding_name and
814         default_encoding.encoding_charset to Municode_full and
815         mcharset__unicode.  Use SAFE* macros for allocating filepath
816         buffer.
817         (mfont__fini): Free otf_script_list.
818         (mfont__id): New function.
819         (mfont__match_p): Check also capability member of MFont.
820         (mfont__merge): New funciton.
821         (mfont__set_spec_from_face): Set type and source members.
822         (mfont__set_spec_from_plist): Set capability and type members.
823         (mfont__select): Argument changed.
824         (mfont__available): New function.
825         (compare_font_score): New function.
826         (mfont__list): New function.
827         (mfont__open): Return a realized font.
828         (mfont__resize): Adjusted for the change of MFont.
829         (mfont__has_char): New function.
830         (mfont__encode_char): Argument changed.
831         (mfont__set_spec): Argument changed.
832         (free_font_capability): New function.
833         (mfont__get_capability): New function.
834         (MFontfile): New variable.
835         (mfont_get_prop): Adjusted for the change of MFont.
836         (mfont_put_prop): Likewise.
837         (mfont_set_selection_priority): Fix the way of setting
838         font_score_priority[].
839         (mfont_find): Use mfont__list instead of mfont__select.
840         (mfont_resize_ratio): Adjusted for the change of MFont.
841         (mfont_list): Use mfont__list.
842         (mfont_check): New function.
843         (font_score): Make it static.
844
845         * fontset.h (mfont__realize_fontset): Prototype adjusted.
846         (mfont__lookup_fontset): Likewise.
847
848         * fontset.c (struct MFontset): Delete member font_spec_list.
849         (struct MRealizedFontset): Type of member spec changed.  New
850         member request.
851         (load_font_group): Arg spec_list deleted.
852         (load_fontset_contents): Adjusted for the change of fontset_def.
853         (free_fontset): Fix the way of freeing fontset elements.
854         (realize_fontset_elements): Argument changed.
855         (get_per_script): New function.
856         (free_realized_fontset_elements): Fix the way of feeing rfontset
857         elements.
858         (update_fontset_elements): Fix args to realize_fontset_elements.
859         (mfont__realize_fontset): New arg spec.
860         (try_font_list): New function.
861         (try_font_group): New arg request.  Use try_font_list.
862         (mfont__lookup_fontset): New arg ignore_fallback.  Fix arg to
863         try_font_group.
864         (mfontset): Adjusted for the change of MFontset.
865         (mfontset_copy): Likewise.  Don't share plists.
866         (mfontset_modify_entry): Adjusted for the change of MFontset.
867         (mfontset_lookup): Call get_per_script.
868         (mdebug_dump_fontset): Print also the address of fonts.
869
870         * input.c (shift_state): Don't reset ic_info->vars.
871         (take_action_list): Call MDEBUG_PRINT fore calling
872         take_action_list.
873
874         * internal-gui.h (MFontDriver): Don't typedef it here.
875
876         * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
877         (MXFont): This type deleted.
878         (MFontX): New type.
879         (struct _MFontX): New struct.
880         (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
881         (MDisplayInfo): Member base_font_list deleted.
882         (DEFAULT_FONT): Definition changed.
883         (FALLBACK_FONT): This maclr deleted.
884         (free_display_info): Adjusted for the change of MDisplayInfo.
885         (free_device): Argument to mfont__free_realized changed.
886         (xfont_driver): Adjusted for the change of MFontDriver.
887         (xfont_registry_list): Use MFontX instead of MXFont.
888         (MRealizedFontX): Renamed from MXFontInfo.
889         (xfont_select): Return the font found first.
890         (close_xfont): Change MXFontInfo to MRealizedFontX.
891         (xfont_open): Return the realized font.
892         (xfont_find_metric): Get xfont from rfont->fontp.
893         (xfont_has_char): New function.
894         (xfont_encode_char): Adjusted for the argument change.
895         (xfont_render): Get xfont from rfont->fontp.
896         (xfont_list): Adjusted for the argument change.
897         (MRealizedFontXft): Renamed from MXftFontInfo.
898         (xft_driver): Ajusted for the change of MFontDriver.
899         (close_xft): Change MXtfFontInfo to MRealizedFontXft
900         (xft_open_font): Argument changed.
901         (xft_open): Argument changed.  Return the realized font.
902         (xft_find_metric): Get xft_font from rfont->fontp.
903         (xft_has_char, xft_encode_char): New functions.
904         (xft_render): Change MXftFontInfo to MRealizedFontXft.  Open a
905         font if not yet opened.
906         (device_open): Don't set frame->font.
907
908         * m17n-gd.c (gd_font_driver): Adjusted for the change of
909         MFontDriver.
910         (gd_font_open): New function.
911         (gd_render): Don't use the local variable ft_info.
912         (device_init): Adjusted for the change of gd_font_driver.
913
914         * textprop.c (mtext__prop_init): Initialize text_property_table.
915         Call M17N_OBJECT_ADD_ARRAY.
916         (mtext__prop_fini): Don't call mdebug__report_object.
917
918         * plist.c (mplist__init): Initialize plist_table.
919         (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
920         (mplist__fini): Don't call mdebug__report_object.
921
922         * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
923         (mtext__fini): Don't call mdebug__report_object.
924         (MTEXT_FORMAT_UTF_16): Correct type.
925         (mtext_data): New function.
926         (mtext_text): Fix calculation of limit and args to
927         find_char_backward.
928
929         * language.c: Include "plist.h".
930         (M_script_lang_list): New variable.
931         (mlang__init): Read languages and their information from m17n
932         database.
933         (mlanguage__list): New function.
934         (Miso639_1, Miso639_2): New variables.
935
936         * language.h (mlanguage__list): Extern it.
937
938         * database.c (get_database_stream): Use SAFE_* macros for
939         allocating and freeing path.
940         (mdatabase__init): Likewise.
941
942         * symbol.c (msymbol__fini): Don't free symbols here.
943         (msymbol__free_table): New function.
944         (msymbol_is_managing_key): New function.
945
946         * symbol.h (msymbol__free_table): Extern it.
947         (msymbol__list): Extern it.
948
949         * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
950         New macros.
951         (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
952         (struct _M17NObjectArray): New member name and next.
953         (mdebug__add_object_array): Extern it.
954         (M17N_OBJECT_ADD_ARRAY): New macro.
955         (mdebug__report_object): Don't extern it.
956
957         * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
958
959         * m17n-gui.c (free_frame): Don't free frame->font.
960         (null_device_fini): Fix code for freeing
961         null_device.realized_font_list.
962         (m17n_fini_win): Free interface.
963         (mframe): Cast the return value of dlsym.  Set frame->font here.
964         (mframe_get_prop): Check frame->rface->rfont before accessing the
965         member font.
966
967         * m17n-gui.h (Mfontfile): Extern it.
968         (mfont_check): Extern it.
969         (mface_equal): Extern it.
970
971         * m17n-core.c: Include "symbol.h".
972         (report_header_printed): This variable deleted.
973         (object_array_root): New variable.
974         (report_object_array): New function.
975         (mdebug__report_object): This function deleted.
976         (mdebug__add_object_array): New function.
977         (m17n_init_core): Call mchartable_init () before mtext_init ().
978         (m17n_fini_core): Call report_object_array (if necessary) and
979         msymbol__free_atable at the end.
980
981         * m17n-core.h (msymbol_is_managing_key): Extern it.
982         (mtext_data): Extern it.
983         (MTEXT_FORMAT_UTF_16): Correct type.
984         (M17NLIB_MINOR_VERSION): Changed to 3.
985         (M17NLIB_VERSION_NAME): Changed to "1.3.0".
986         
987         * chartab.c (mchartable__init): Initalize chartable_table.count.
988         (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
989         mdebug__report_object.
990
991 2005-05-26  Kenichi Handa  <handa@m17n.org>
992
993         * m17n.h (Miso639_1, Miso639_2): Extern them.
994
995         * symbol.h (msymbol__list): Extern it.
996
997         * symbol.c (msymbol__list): New function.
998
999 2005-05-19  Kenichi Handa  <handa@m17n.org>
1000
1001         * input-gui.c (minput__win_init): Don't change the value of
1002         minput_driver.
1003
1004 2005-05-16  Kenichi Handa  <handa@m17n.org>
1005
1006         * m17n-core.c (m17n_object): Be sure to initialize all members.
1007
1008         * font-ft.c (fc_decode_prop): Fix args to msymbol.
1009
1010 2005-05-09  Kenichi Handa  <handa@m17n.org>
1011
1012         * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
1013
1014 2005-04-27  Kenichi Handa  <handa@m17n.org>
1015
1016         * language.c (mlang__init): Add "an" (Aragonese).
1017
1018         * word-thai.c: Add support for libthai.
1019         (mtext__word_thai_init): Initialize wordseg library conditionaly.
1020         (mtext__word_thai_fini): Finalize wordseg library conditionaly.
1021
1022         * mtext.c: Include "word-thai.h" conditionaly.
1023         (mtext__init): Call mtext__word_thai_init conditionaly.
1024         (mtext__fini): Call mtext__word_thai_fini conditionaly.
1025
1026         * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
1027         not WORDCUT_LD_FLAGS.
1028
1029 2005-04-19  Kenichi Handa  <handa@m17n.org>
1030
1031         * word-thai.c (wordseg_propertize): Always unref the attached
1032         property.
1033         (thai_wordseg): Don't unref the property.
1034
1035 2005-04-18  Kenichi Handa  <handa@m17n.org>
1036
1037         * word-thai.c: Include stdlib.h.
1038         (wordseg_propertize): Add dummy function for the case that wordcut
1039         library doesn't exist.
1040         (wordseg_propertize): Fix for old wordcut library.
1041
1042 2005-04-16  Kenichi Handa  <handa@m17n.org>
1043
1044         * word-thai.c: Include <stdio.h>.
1045
1046 2005-04-15  Kenichi Handa  <handa@m17n.org>
1047
1048         * draw.c: Include mtext.h.
1049         (linebreak_table, M_break_at_space, M_break_at_word)
1050         (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
1051         (compose_glyph_string): Check POS before getting Mface text
1052         property.
1053         (truncate_gstring): Give correct TO arg to line_break function.
1054         (GET_LB_TYPE): New macro.
1055         (find_break_backward, find_break_forward): New functions.
1056         (mdraw__init): Initialize the above new variables.
1057         (mdraw__fini): Free linebreak_table.
1058         (mdraw_default_line_break): Use find_break_backward and
1059         find_break_forward.
1060
1061         * word-thai.c: New file.
1062
1063         * word-thai.h: New file.
1064
1065         * mtext.c: Include word-thai.h.
1066         (wordseg_func_table): New variable.
1067         (mtext__init): Initialize wordseg_func_table and call
1068         mtext__word_thai_init.
1069         (mtext__fini): Call mtext__word_thai_fini, free
1070         wordseg_func_table.
1071         (MTextWordsegFunc): New type.
1072         (mtext__word_segment): New function.
1073
1074         * mtext.h (wordseg_func_table): Extern it.
1075         (mtext__word_segment): Extern it.
1076
1077         * m17n.c (m17n_init): Fix typo (== -> =).
1078
1079         * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
1080         (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
1081
1082         * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
1083         (MTEXTPROP_VAL): New macros.
1084
1085         * input.c (DLOPEN_SHLIB_EXT): Don't define it.
1086
1087 2005-04-07  Kenichi Handa  <handa@m17n.org>
1088
1089         * database.c (load_chartable): Fix pursing of symbol name.
1090
1091 2005-03-24  Kenichi Handa  <handa@m17n.org>
1092
1093         * m17n.c (m17n_init): Fix typo (== -> =).
1094
1095 2005-03-11  Kenichi Handa  <handa@m17n.org>
1096
1097         * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
1098
1099         * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
1100
1101         * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
1102         first.
1103
1104 2005-03-09  handa  <handa@m17n.org>
1105
1106         * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
1107         calling m17n_init ().
1108
1109         * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
1110         calling m17n_init_core ().
1111
1112 2005-02-28  Kenichi Handa  <handa@m17n.org>
1113
1114         * font-flt.c (mfont__flt_run): Add resulting code sequence in
1115         debug info.
1116
1117 2005-02-17  Kenichi Handa  <handa@m17n.org>
1118
1119         * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
1120         (M_description, M_command, M_variable): New variables.
1121         (load_im_info_keys): New variables.
1122         (load_im_info, check_command_keyseq, get_description_advance)
1123         (parse_command_list, get_command_list, parse_variable_list)
1124         (get_variable_list, input_method_hook): New functions.
1125         (command_list, variable_list): New variables.
1126         (minput__init): Put input_method_hook to Minput_method.
1127         Initialize M_description, M_command, M_variable, Mdetail_text,
1128         load_im_info_keys, command_list, variable_list.
1129         (minput__fini): Unref command_list, variable_list, load_im_info_keys.
1130         (Mdetail_text): New variable.
1131         (minput_get_description, minput_get_commands)
1132         (minput_assign_command_keys, minput_get_variables)
1133         (minput_set_variable): New functions.
1134
1135         * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
1136         (minput_assign_command_keys, minput_get_variables)
1137         (minput_set_variable): Extern them.
1138
1139         * plist.c (UNGETC): Just decrement st->p.
1140         (read_mtext_element): New arg skip.
1141         (read_integer_element): Likewise.
1142         (read_symbol_element): Likewise.
1143         (read_element): New arg KEYS.
1144         (mplist__from_plist): Don't increment ref-count of NULL object.
1145         (mplist__from_file): New arg KEYS.
1146         (mplist_put): Don't increment ref-count of NULL object.
1147         (mplist_add): Likewise.
1148         (mplist_push): Likewise.
1149         (mplist_set): Likewise.  Call M17N_OBJECT_UNREF unconditionally.
1150
1151         * plist.h (mplist__from_file): Prototype adjusted.
1152
1153         * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
1154         (get_database_stream): New function.
1155         (load_database): Use get_database_stream.
1156         (M_database_hook): New variable
1157         (mdatabase__init): Initialize M_database_hook.
1158         (mdatabase__load_for_keys): New function.
1159         (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
1160         function.
1161         (mdatabase_define): Free mdb->extra_info if necessary.
1162
1163         * database.h (mdatabase__dir_list, M_database_hook)
1164         (mdatabase__load_for_keys): Extern them.
1165         (MDatabaseHookFunc): New type.
1166
1167         * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
1168
1169 2004-12-27  Kenichi Handa  <handa@m17n.org>
1170
1171         * Version 1.2.0 released.
1172
1173 2004-12-27  Kenichi Handa  <handa@m17n.org>
1174
1175         * input.c (minput_filter): Don't reset ic->xxx_changed.
1176
1177         * mtext.c (mtext_from_data): Fix documentation.
1178
1179 2004-12-25  Kenichi Handa  <handa@m17n.org>
1180
1181         * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
1182         (M17NLIB_VERSION_NAME): Update to "1.2.".
1183
1184 2004-12-24  Kenichi Handa  <handa@m17n.org>
1185
1186         * input.c (reset_ic): Set key_unhandled to 0.
1187
1188 2004-12-21  Kenichi Handa  <handa@m17n.org>
1189
1190         * m17n-gui.h (mfont_from_spec): Delete extern.
1191
1192         * input-gui.c (win_callback): Handle Minput_reset.
1193         (minput__win_init): Register reset_ic as a callback for
1194         Minput_reset.
1195
1196         * input.c (reset_ic): New arg IGNORE which is ignored.  Caller
1197         changed.  At first, shift to the initial state.
1198         (minput__init): Initialize Minput_reset.  Register reset_ic as a
1199         callback for Minput_reset.
1200         (Minput_reset): New variable.
1201         (minput_filter): Always set ic->xxx_changed to 0.
1202         (minput_reset_ic): New function.
1203         (integer_value): Fix typo ('>' -> '<') and calculation of length
1204         of preedit text.
1205
1206         * m17n-core.c (merror_code): Change type to `int'.
1207
1208         * m17n-misc.h (merror_code): Adjust type.
1209
1210         * m17n.h (Minput_reset, minput_reset_ic): Extern them.
1211
1212         * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
1213         (mtext_change_prop): Delete extern.
1214
1215         * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
1216         to `int'.  Move the documents to m17n-core.h.
1217
1218 2004-12-13  Kenichi Handa  <handa@m17n.org>
1219
1220         * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
1221         (MTextProperty): Document it.
1222
1223 2004-12-09  Kenichi Handa  <handa@m17n.org>
1224
1225         * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
1226
1227 2004-12-03  Kenichi Handa  <handa@m17n.org>
1228
1229         * internal.h (m17n__core_initialized, m17n__shell_initialized,
1230         m17n__gui_initialized): New externs.
1231
1232         * m17n-core.h (enum M17NStatus): New enum.
1233         (m17n_status): Extern it.
1234
1235         * m17n-core.c (core_initialized): Delete this variable.
1236         (m17n__core_initialized, m17n__shell_initialized,
1237         m17n__gui_initialized): New variables.
1238         (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
1239         instead of core_initialized.
1240         (m17n_status): New function.
1241
1242         * m17n.c (shell_initialized): Delete this variable.
1243         (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
1244         shell_initialized.
1245
1246         * m17n-gui.h (m17n_init_win): Adjust the prototype.
1247
1248         * m17n-gui.c (win_initialized): Delete this variable.
1249         (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
1250         instead of gui_initialized.
1251
1252 2004-11-19  Kenichi Handa  <handa@m17n.org>
1253
1254         * input.c (reset_ic): Check if ic_info->state is NULL.
1255         (filter): If ic_info->state is NULL, return 0.
1256         (load_input_method): Don't unref `maps' it it's not created.
1257
1258 2004-11-15  Kenichi Handa  <handa@m17n.org>
1259
1260         * input.c (find_candidates_group): If INDEX is -1, find the last
1261         candidate group.
1262         (take_action_list): If the previous of the first candidate is
1263         requested, select the last candidate.
1264
1265 2004-11-08  Kenichi Handa  <handa@m17n.org>
1266
1267         * m17n-X.c (device_open): Try at most 32 fonts to find a
1268         non-autoscaled font.
1269
1270         * font.c (xlfd_parse_name): Fix previous change.
1271
1272 2004-11-05  Kenichi Handa  <handa@m17n.org>
1273
1274         * font.c: (commont_style): Include dummy elements "slanted" and
1275         "rslanted" to prefer "o" to "r" if "i" is requested.
1276
1277         * font-ft.c (ft_to_prop): Fix "oblique" entry.
1278
1279 2004-10-29  Kenichi Handa  <handa@m17n.org>
1280
1281         * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
1282
1283         * m17n-X.c (MXFont): Change type of the member `sizes' to int.
1284         New members smallest and larger.
1285         (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
1286         (xfont_registry_list): Likewise.
1287         (xfont_select): Likewise.
1288         
1289
1290 2004-10-28  Kenichi Handa  <handa@m17n.org>
1291
1292         * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
1293         font name comparison.
1294         (xfont_select): Fix logic for selecting a larger size font.
1295
1296 2004-10-25  Kenichi Handa  <handa@m17n.org>
1297
1298         * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
1299         ">" actions.
1300
1301 2004-10-22  Kenichi Handa  <handa@m17n.org>
1302
1303         * input.c (update_candidate): Renamed from udpate_candidate.
1304         (take_action_list): Show more debugging info on arithmetic commands.
1305
1306         * m17n-X.c (device_open): Fix previous change.
1307
1308         * draw.c (compose_glyph_string): Don't get face property at the
1309         end of M-text.
1310
1311 2004-10-21  Kenichi Handa  <handa@m17n.org>
1312
1313         * draw.c (compose_glyph_string): Fix for the case of category
1314         being Mnil.
1315
1316 2004-10-19  Kenichi Handa  <handa@m17n.org>
1317
1318         * input.c (mdebug_mask): New variable.
1319         (shift_state): Print debug information.
1320         (take_action_list): Likewise.
1321         (handle_key): Likewise.
1322
1323 2004-10-14  Kenichi Handa  <handa@m17n.org>
1324
1325         * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
1326
1327 2004-10-13  Kenichi Handa  <handa@m17n.org>
1328
1329         * m17n-X.c (device_open): Be sure to register at least one font
1330         driver.
1331
1332         * font-ft.c: Include <freetype/ftbdf.h> conditionally.  Check
1333         HAVE_FTBDF_H before calling FT_Get_BDF_Property.
1334
1335 2004-10-12  Kenichi Handa  <handa@m17n.org>
1336
1337         * draw.c (alloc_gstring): Fix previous change.
1338
1339         * font-ft.c (ft_list_generic): Fix for the case of not
1340         HAVE_FONTCONFIG.
1341
1342         * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
1343
1344         * font.c (mfont_list): If no font is found, return NULL.
1345         (load_font_encoding_table): Put entries of nil registry first.
1346         (find_encoding): Adjust for the above change.
1347
1348 2004-10-11  Kenichi Handa  <handa@m17n.org>
1349
1350         * m17n-gui.h (mfont_list): Adjust prototype.
1351
1352         * m17n-X.c (xfont_list): New arg maxnum.
1353
1354         * font.h (struct MFontDriver): Change prototype of <list>.
1355
1356         * font-ft.c (fc_generic_family_list): Delete it.
1357         (Mserif, Msans_serif, Mmonospace): Delete them.
1358         (M_generic_family_info): New variable.
1359         (enum GenericFamilyType): New enum.
1360         (struct GenericFamilyInfo): New struct.
1361         (generic_family_table): New variable.
1362         (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
1363         iso8859-1.
1364         (add_font_info): Get style here.
1365         (ft_list_family): Don't initialize fc_config here.  Don't list
1366         generic families.
1367         (ft_list_generic): New function.
1368         (ft_select): Pay attention to generic familes here.
1369         (ft_open): Fix calculation of ascent and descent.
1370         (ft_list): Pay attention to generic families.
1371         (mfont__ft_init): Initialize M_generic_family_info,
1372         generic_family_table, and fc_config..
1373         (mfont__ft_fini): Finalize generic_family_table.
1374
1375         * draw.c (compose_glyph_string): Use more constant font for
1376         glyphs.  Adjust for the member change in MGlyph.
1377         (layout_glyph_string): Adjust for the member change in MGlyph.
1378         (alloc_gstring): Intilize scracth_glyph to avoid
1379         compose_glyph_string on it.
1380         (get_gstring): Don't call compose_glyph_string on scracth_glyph.
1381         (mdraw_coordinates_position): Fix previous change.
1382
1383         * internal-gui.h (glyph_category): New enum.
1384         (MGlyph): Change type of <category> to enum glyph_category.
1385
1386         * face.c (mface__realize): Delete args langauge and charset.
1387         (mface__for_chars): Fix for the case that glyphs have different
1388         rfaces.
1389         (mface__update_frame_face): Adjust for mface__realize change.
1390
1391         * face.h (mface__realize): Adjust prototype.
1392
1393 2004-10-05  Kenichi Handa  <handa@m17n.org>
1394
1395         * language.c (mlang__init): Add Akan.
1396
1397 2004-10-04  Kenichi Handa  <handa@m17n.org>
1398
1399         * font-ft.c (add_font_info): Add instead of push the element.
1400         (ft_list_family): For generic fonts, try all
1401         substituted. families.
1402
1403         * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
1404         (run_rule): Don't update cluster range here.
1405         (run_command): Update cluster range on appending a glyph.
1406         (run_otf): Update cluster range for glyphs generated by OTF.
1407
1408 2004-10-02  Kenichi Handa  <handa@m17n.org>
1409
1410         * m17n-X.c (device_open): Handle Mfont key in PLIST.
1411
1412 2004-09-30  Kenichi Handa  <handa@m17n.org>
1413
1414         * font-ft.c (ft_select): Ignore family on calling mfont__score.
1415
1416 2004-09-30  Kenichi Handa  <handa@m17n.org>
1417
1418         * font.h: Include <fontconfig/fontconfig.h>.
1419         (MFTInfo): New member langset.
1420         (mfont__encoding_list): Extern it.
1421
1422         * font.c (mfont__encoding_list): New function.
1423         (mdebug_dump_font_list): New function.
1424
1425         * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
1426         (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
1427         variables.
1428         (ft_family_list): New variable.
1429         (set_font_info): New arg basep.  Callers changed.
1430         (fc_list): Check the return value of FcPatternGetString.
1431         (add_font_info): New arg plist.  Callers changed. Update
1432         ft_family_list.
1433         (ft_list_family): New function (merged fc_list and ft_list_all).
1434         (ft_select): Use ft_list_family.
1435         (ft_list): Likewise.  If FONT is not NULL, check all fonts.  Fix
1436         typo (== -> !=).
1437         (mfont__ft_init): Initialize above new variables.
1438         (mfont__ft_fini): Free ft_family_list.
1439         (STRDUP_LOWER): New macro.
1440         (set_font_info): Use STRDUP_LOWER.
1441         (ft_list_family): Avoid duplicate addition of font path.  Use
1442         STRDUP_LOWER.
1443         (fc_decode_prop): Fix typo.
1444
1445         * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
1446         (xfont_registry_list): Change argument disp_info to frame.
1447         Callers changed.
1448         (xfont_list_all): New function.
1449         (xfont_list): If FONT is not NULL, check all fonts.
1450
1451 2004-09-28  Kenichi Handa  <handa@m17n.org>
1452
1453         * m17n-X.c (MXFont, MXFontList): New types.
1454         (MDisplayInfo): Delete members font_registry_list,
1455         iso8859_1_family_list, iso10646_1_family_list, new members
1456         font_list, base_font_list.
1457         (free_display_info): Adusted for the change of MDisplayInfo.
1458         (xfont_driver): Initialize with xfont_list.
1459         (font_compare): New function.
1460         (build_font_list): Deleted.
1461         (xfont_registry_list): New function.
1462         (xfont_select): Use xfont_registry_list.
1463         (xfont_list): New function.
1464         (device_open): Adusted for the change of MDisplayInfo.
1465
1466         * font-ft.c (add_font_info): New arg languages.  Callers changed.
1467         (fc_list): Get languages from fonts..
1468         (ft_list_all): Renamed from ft_list.  Callers changed.
1469         (ft_list): New function.
1470         (mfont__ft_driver): Initalize with ft_list.
1471
1472         * font.c (mfont_list): New function.
1473
1474         * font.h (struct MFontDriver): New member `list'.
1475         (MFTInfo): New member languages.
1476
1477         * m17n-gui.h (mfont_list): Extern it.
1478
1479 2004-09-27  Kenichi Handa  <handa@m17n.org>
1480
1481         * internal-gui.h (struct MGlyphString): Delete members mt,
1482         sub_width, sub_lbrearing, sub_rbearing, and region.
1483
1484         * draw.c (MSubTextExtents): New type.
1485         (layout_glyphs): New arg extents.  Set its members.
1486         (layout_glyph_string): Adjusted for the above change.
1487         (alloc_gstring): Don't set gstring->mt.
1488         (truncate_gstring): Call line_break function with mt instead of
1489         gstring->mt.
1490
1491 2004-09-22  Kenichi Handa  <handa@m17n.org>
1492
1493         * mtext.c (count_utf_16_chars): Count each code of invalid
1494         surrogates as one.
1495
1496 2004-09-19  Kenichi Handa  <handa@m17n.org>
1497
1498         * mtext.c (default_utf_16, default_utf_32): Rename them to
1499         MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively.  Caller
1500         changed.
1501
1502         * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
1503         them.
1504
1505 2004-09-13  Kenichi Handa  <handa@m17n.org>
1506
1507         * draw.c (Mlatin): Don't declare it here.
1508         (visual_order): Fix reordering of combining characters.
1509         (compose_glyph_string): Fix detection of script.
1510         (layout_glyphs): Don't fix reordering of combining characters
1511         here.
1512         (layout_glyph_string): Pay attention to
1513         control->disable_overlapping_adjustment.
1514         (truncate_gstring): Include at least on character in a line.
1515         (get_gstring): Always scan one full line.
1516         (mdraw__init): Don't initialize Mlatin here.
1517         (mdraw_text_per_char_extents): Fix iteration.  If a glyph doesn't
1518         have a font, use ascent/descent of an ASCII font.  Allow
1519         ink_array_return and logical_array_return to be NULL.
1520         (mdraw_coordinates_position): Fix iteration.
1521
1522         * font-ft.c (MFTtoProp): Member completely changed.
1523         (ft_to_prop): Adjusted for the above change.
1524         (ft_to_prop_size): Likewise.
1525         (set_font_info): Adjusted for the change of MFTtoProp.
1526         (fc_generic_family_list): New variable.
1527         (fc_list): Add special handling of generic font names.
1528         (mfont__ft_init): Adjusted for the change of MFTtoProp.
1529         Initialize fc_generic_family_list.
1530         (mfont__ft_fini): Don't free ft_to_prop.  Free
1531         fc_generic_family_list.
1532         (FC_vs_M17N_font_prop): New type.
1533         (fc_weight_table, fc_slant_table, fc_width_table): New variables.
1534         (fc_decode_prop, fc_encode_prop): New functions.
1535         (mfont__ft_parse_name): Use fc_decode_prop.
1536         (mfont__ft_unparse_name): Use fc_encode_prop.
1537
1538         * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
1539         (MWDevice): Add member realized_font_list.
1540         (free_display_info): Don't free disp_info->realized_font_list.
1541         (free_device): Free device->realized_fontset_list.
1542         (xft_find_metric): Use gstring->frame instead of rfont->frame.
1543         (device_open): Don't initialize disp_info->realized_font_list.
1544         (device_open): Initialize device->realized_font_list and set it to
1545         frame->realized_font_list.
1546
1547         * fontset.c (try_font_group): New function.
1548         (mfont__lookup_fontset): Use try_font_group.
1549
1550         * font.c (common_weight): Change the order of "regular".
1551
1552         * face.c (Mlatin): Don't make it static.
1553         (mface__realize): Be sure to set work_gstring.frame.
1554         (mface__for_chars): Likewise.
1555
1556         * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
1557         MTEXT_FORMAT_UTF_8.
1558
1559         * internal-gui.h (Mlatin): Extern it.
1560
1561         * m17n-gui.h (MDrawControl): New member
1562         disable_overlapping_adjustment.
1563
1564 2004-09-06  Kenichi Handa  <handa@m17n.org>
1565
1566         * font-flt.c (run_otf): Fix typo ('}'->']').
1567
1568         * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
1569         (COMBINING_PRECOMPUTED_P): New macros.
1570
1571         * draw.c (layout_glyphs): Handle precomputed combining code.
1572
1573         * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
1574         precomupted combining code.
1575
1576 2004-09-03  Kenichi Handa  <handa@m17n.org>
1577
1578         * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
1579         otf_gstring.glyphs.
1580
1581 2004-08-27  Kenichi Handa  <handa@m17n.org>
1582
1583         * face.c (mface_put_prop): If the new value is the same as the
1584         current one, don't increment frame->tick.
1585
1586 2004-08-25  Kenichi Handa  <handa@m17n.org>
1587
1588         * fontset.c (mfontset): Initialize font_spec_list member.
1589         (mfontset_copy): Load fontset if necessary.
1590
1591         * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
1592         'metrics' to for C++.
1593
1594         * draw.c (mdraw_glyph_info): Adjusted for the member name change
1595         (this -> metics).
1596
1597 2004-08-16  Kenichi Handa  <handa@m17n.org>
1598
1599         * Version 1.1.0 released.
1600
1601 2004-08-13  Kenichi Handa  <handa@m17n.org>
1602
1603         * language.c (mlang__init): Add Dhivehi.
1604
1605         * m17n-gui.c (Mx, Mfreetype): Delete it.
1606         (m17n_init_win): Don't initialize Mx and Mfreetype here.
1607
1608         * m17n-gui.h (Mfreetype, Mxft): Extern them.
1609         (mfont_resize_ratio): Extern it.
1610         (MDrawGlyphInfo): New member logical_width;
1611         (MDrawGlyph): New type.
1612         (mdraw_glyph_list): Prototype adjusted.
1613
1614         * m17n-X.c (xfont_open): Set type and fontp members.
1615         (xft_open): Likewise.
1616
1617         * internal-gui.h (Mx, Mfreetype): Delete extern.
1618
1619         * font.h (struct MRealizedFont): New member type and fontp.
1620
1621         * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
1622         (Mx, Mfreetype): Declare here.
1623         (Mxft): New variable.
1624         (mfont_resize_ratio): New function.
1625
1626         * font-ft.c (ft_open): Set type and fontp members.
1627
1628         * draw.c (mdraw_glyph_list): Argument type changed.  Don't set
1629         glyph_code member.
1630
1631 2004-08-11  Kenichi Handa  <handa@m17n.org>
1632
1633         * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
1634         FT_LOAD_DEFAULT.
1635
1636 2004-08-06  Kenichi Handa  <handa@m17n.org>
1637
1638         * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
1639         feature to apply.
1640
1641         * font-flt.c (run_otf): Print debugging information if necessary.
1642
1643 2004-08-05  Kenichi Handa  <handa@m17n.org>
1644
1645         * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff.  Support
1646         positioning_type 5 and 6.  Switch simplified.
1647
1648 2004-08-04  Kenichi Handa  <handa@m17n.org>
1649
1650         * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
1651
1652 2004-08-02  Kenichi Handa  <handa@m17n.org>
1653
1654         * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
1655         set val to 1 even if it is greater than 1.
1656
1657         * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
1658
1659 2004-07-29  Kenichi Handa  <handa@m17n.org>
1660
1661         * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
1662         debugging information.
1663
1664         * internal.h (MDEBUG_PRINT5): New macro.
1665
1666         * draw.c (layout_glyphs): Don't combine a zero width glyph with
1667         the previous one if the zero width glyph has left or right
1668         padding.
1669
1670 2004-07-26  Kenichi Handa  <handa@m17n.org>
1671
1672         * m17n-X.c (xft_render): Pay attention to members left_padding and
1673         right_padding of MGlyph.
1674
1675         * draw.c (visual_order): Allocate one more elements for arrays as
1676         a workaround of fribidi bug.
1677         (layout_glyphs): Fix previous change. Check MGlyph->combining_code
1678         instead of MGlyph->bidi_sensitive.
1679         (layout_glyph_string): Pay attentinon to
1680         control->orientation_reversed when padding at the head or tail.
1681         Fix adjustment of space glyph width.
1682         (get_gstring): If cursor_width or cursor_bidi is changed, don't
1683         use a cache.
1684
1685         * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
1686         instead of MGlyph->bidi_sensitive.
1687
1688         * internal-gui.h (MGlyph): Delete member bidi_sensitive.
1689
1690 2004-07-26  Kenichi Handa  <handa@m17n.org>
1691
1692         * draw.c (visual_order): Don't treat combined glyphs specially.
1693         (layout_glyphs): Don't get metrics glyphs that are already ready.
1694         Pay attention to MGlyph->bidi_sensitive.  Combine a glyph of zero
1695         width with the previous one. 
1696         (draw_background): Fix bar cursor position on a r2l glyph.
1697
1698         * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
1699         (run_rule): Fix place of updating cluster_begin_pos and
1700         cluster_end_pos here.
1701         (run_otf): Don't set left_padding.
1702
1703         * font-ft.c (adjust_anchor): Type of argument `code' changed.
1704         Caller changed.
1705         (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
1706         Fix handling of GPOS.
1707         (mfont__ft_drive_gpos): Delete this function.
1708
1709         * font.h (mfont__ft_drive_otf): Renamed back from
1710         mfont__ft_drive_gsub.
1711         (mfont__ft_drive_gpos): Delete extern.
1712
1713         * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
1714         (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
1715
1716 2004-07-23  Kenichi Handa  <handa@m17n.org>
1717
1718         * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
1719         the same bidi level.
1720
1721         * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
1722
1723 2004-07-22  Kenichi Handa  <handa@m17n.org>
1724
1725         * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
1726
1727 2004-07-20  Kenichi Handa  <handa@m17n.org>
1728
1729         * draw.c (render_glyphs): Fix checking of g->code validity.
1730
1731         * face.c (mface__realize): Set g.type.
1732
1733 2004-07-18  Kenichi Handa  <handa@m17n.org>
1734
1735         * Makefile.am: Prepend ${top_srcdir} to all *.la in
1736         *_LIBADD/*_LDADD.
1737
1738         * m17n-gui.c (mframe): Print error message give by dlopen to
1739         stderr.
1740
1741 2004-07-16  Kenichi Handa  <handa@m17n.org>
1742
1743         * draw.c (compose_glyph_string): Improve the way of deciding a
1744         script.  For a character that doesn't have script property, use
1745         the last non-latin script.
1746
1747         * font-ft.c (fc_list): Cancel previous change.
1748         (mfont__ft_init): Add more entries in ft_to_prop_name.
1749
1750 2004-07-15  Kenichi Handa  <handa@m17n.org>
1751
1752         * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
1753         previous or next character glyphs.
1754
1755 2004-07-14  Kenichi Handa  <handa@m17n.org>
1756
1757         * draw.c (compose_glyph_string): Be sure to set codes for glyphs
1758         of type GLYPH_SPACE.
1759
1760         * fontset.c (mfont__lookup_fontset): If glyph type is
1761         GLYPH_SPACE, get codes for SPACE.
1762
1763         * internal-gui.h (Mfont): Delete extern.
1764
1765         * m17n-gui.h (Mfont): Delete duplicated extern.
1766
1767 2004-07-13  Kenichi Handa  <handa@m17n.org>
1768
1769         * font-ft.c (DEVICE_DELTA): New macro.
1770         (adjust_anchor): New function.
1771         (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf.  Drive
1772         only GSUB.
1773         (mfont__ft_drive_gpos): New function.
1774
1775         * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
1776         (FontLayoutContext): Delete member `rfont'.
1777         (run_otf): Set g->otf_cmd.  Call 
1778         (mfont__flt_run): Don't set ctx.rfont.  Call mfont__ft_decode_otf
1779         only whne HAVE_OTF is defined.
1780
1781         * fontset.c: Include "config.h".
1782
1783         * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
1784         (MGlyph): New member otf_cmd.
1785
1786         * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
1787         (mfont__ft_drive_gpos): Extern it.
1788
1789         * face.c: Include "config.h".
1790
1791         * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
1792
1793         * input-gui.c: Include "config.h".
1794
1795         * plist.c: Include "config.h".
1796
1797 2004-07-06  Kenichi Handa  <handa@m17n.org>
1798
1799         * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
1800         internal-gui.h: Cancel previous changes.
1801
1802         * m17n-gd.h: Delete it.
1803
1804         * Makefile.am (libm17n_core_la_LIBADD): New variable.
1805         (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
1806         @XML2_LD_FLAGS@ to above.
1807         (libm17n_la_LIBADD): Add -ldl.
1808         (libm17n_la_LDFLAGS): Add -export-dynamic.
1809         (X_LD_FLAGS): Fix the order of linking.
1810         (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
1811         (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
1812         (libm17n_X_la_LDFLAGS): Add -module.
1813         (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
1814         (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
1815         (libm17n_gd_la_LDFLAGS): Add -module.
1816         (include_HEADERS): Delete m17n-gd.h.
1817
1818 2004-06-30  Kenichi Handa  <handa@m17n.org>
1819
1820         * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
1821         (MDeviceLibraryInterface): Delete it.
1822         (register_device_library): Delete it.
1823         (m17n__device_library_list): Renamed from device_library_list.
1824
1825         * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
1826         (m17n_init_win): Adjust prototype.
1827
1828         * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
1829         (m17n_init_gd): New function. 
1830
1831         * m17n-gd.h: New file.
1832
1833         * m17n-X.h: Include <m17n-gui.h>.
1834         (m17n_init_X): Extern it.
1835         (M17N_INIT): Redefine it.
1836
1837         * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
1838         (m17n_init_X): New function.
1839
1840         * internal-gui.h (m17n__device_library_list): Extern it.
1841         (struct MDeviceDriver): New members initialized, init, and fini.
1842
1843         * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
1844         @XFT2_LD_FLAGS@.
1845         (libm17n_X_la_LIBADD): Delete aboves.
1846         (libm17n_gd_la_SOURCES): Add m17n-gd.h.
1847         (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
1848         (libm17n_gd_la_LDFLAGS): Delete it.
1849         (include_HEADERS): Add m17n-gd.h.
1850
1851 2004-06-25  Kenichi Handa  <handa@m17n.org>
1852
1853         * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
1854         (libm17n_gd_la_LDFLAGS): Cancel previous change.
1855
1856         * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
1857
1858         * font-ft.c (fc_list): If FcFontList finds no font, try
1859         FcFontMatch.
1860
1861         * draw.c (compose_glyph_string): Terminate the last loop after
1862         doing default combining if necessary.
1863
1864 2004-06-24  Kenichi Handa  <handa@m17n.org>
1865
1866         * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
1867
1868         * character.c (mchar_define_property): Add const to an arg.
1869
1870         * charset.c (mchar_define_charset): Add const to an arg.
1871
1872         * coding.c (MCodingSystem): Add const to an arg or decoder.
1873         (finish_decoding): Add const to an arg.
1874         (decode_coding_charset, decode_coding_utf_8)
1875         (decode_coding_utf_16, decode_coding_utf_32)
1876         (decode_coding_iso_2022, decode_coding_sjis)
1877         (mconv_define_coding): Likewise.
1878
1879         * m17n-X.c (xft_find_metric): Delete unused variable.
1880
1881         * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
1882         prototypes.
1883
1884         * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
1885         prototypes.
1886
1887         * mtext.c (count_utf_8_chars, count_utf_16_chars)
1888         (mtext__from_data, mtext_from_data): Add `const' to an arg.
1889
1890         * mtext.h (mtext__from_data): Ajust prototype.
1891
1892 2004-06-23  Kenichi Handa  <handa@m17n.org>
1893
1894         * draw.c (compose_glyph_string): Always get glyph codes by
1895         mface__for_char.
1896         (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
1897         (mdraw_glyph_list): New function.
1898
1899         * font-flt.c (mfont__flt_run): Be sure to call
1900         rfont->driver->encode_char.
1901
1902         * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
1903         (ft_encode_char): Delete arg C.
1904         (ft_render): Don't call FT_Get_Char_Index.
1905
1906         * font.c (mfont__encodable_p): Delete it.
1907         (mfont__encode_char): Be sure to call rfont->driver->encode_char.
1908
1909         * font.h (struct MFontDriver): Delete arg C of encode_char.
1910         (mfont__encodable_p): Delete extern.
1911
1912         * m17n-X.c (xfont_encode_char): Delete arg C.
1913         (xft_find_metric): Don't cal FT_Get_Char_Index.
1914         (xft_render): Likewise.
1915
1916         * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
1917         logical_width.
1918         (mdraw_glyph_list): Extern it.
1919
1920         * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
1921
1922 2004-06-22  Kenichi Handa  <handa@m17n.org>
1923
1924         * m17n-gui.h (mfontset_lookup): Extern it.
1925
1926         * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
1927
1928         * fontset.c (realize_fontset_elements)
1929         (free_realized_fontset_elements, update_fontset_elements): New
1930         functions.
1931         (mfont__realize_fontset): Call realize_fontset_elements.
1932         (mfont__free_realized_fontset): Call free_realized_fontset_elements.
1933         (mfont__lookup_fontset): If a fontset was modified, update
1934         the realized fontset.
1935         (mfontset_modify_entry): Increment fontset->tick.
1936         (mfontset_lookup): New function.
1937
1938 2004-06-21  Kenichi Handa  <handa@m17n.org>
1939
1940         * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
1941
1942         * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
1943         (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
1944         length of source text 0.
1945
1946 2004-06-21  Kenichi Handa  <handa@m17n.org>
1947
1948         * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
1949         (compare): Pay attention to format other than utf-8.
1950         (copy): Delete this function.
1951         (count_by_utf_8, count_by_utf_16, insert): New functions.
1952         (count_utf_16_chars): Fix handling of a surrogate pair.
1953         (find_char_forward, find_char_backward): Likewise.
1954         (mtext__from_data): Delete unnecessary check.  Fix number of
1955         allocated bytes.
1956         (mtext_from_data): Don't count items.
1957         (mtext_ref_char): Optimize the code.
1958         (mtext_set_char): Pay attention to format other than utf-8.
1959         (mtext_cat_char): Likewise.
1960         (mtext_dup): Don't call copy, instead do allocation here.
1961         (mtext_cat): Call insert instead of copy.
1962         (mtext_ncat): Likewise.
1963         (mtext_cpy): Delete character at first and call insert instead of
1964         copy.
1965         (mtext_ncpy): Likewise.
1966         (mtext_copy): Likewise.
1967         (mtext_duplicate): Call insert instead of copy.
1968         (mtext_del): Pay attention to format other than utf-8.
1969         (mtext_ins): Simply call insert.
1970         (mtext_ins_char): Pay attention to format other than utf-8.
1971         (mtext_tok): Call insert instead of copy.
1972         (mtext_text): Call UNIT_BYTES.
1973
1974         * textprop.c (mtext__adjust_plist_for_change): New function.
1975
1976         * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
1977         (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
1978         (CHAR_UNITS_AT): Fix typo.
1979         (CHAR_UNITS_BY_HEAD): Fix typo.
1980         (STRING_CHAR_AND_UNITS): Fix typo.
1981
1982         * internal.h (MTEXT_READ_ONLY_P): New macro. 
1983
1984         * mtext.h (mtext__replace): Delete the extern.
1985         (mtext__adjust_foramt): Adjust prototype.
1986
1987         * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
1988         if possible.  Otherwise make a copy of mmt.
1989
1990         * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
1991         utf-8.
1992
1993 2004-06-18  Kenichi Handa  <handa@m17n.org>
1994
1995         * character.h (CHAR_STRING_UTF16): Fix syntax.
1996
1997 2004-06-16  Kenichi Handa  <handa@m17n.org>
1998
1999         * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
2000         (libm17n_X_la_LIBADD): Delete it.
2001         (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
2002
2003         * m17n-X.c (device_open): Add parens in `if' condition.
2004
2005         * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
2006         (DEC_POSITION): Likewise.
2007         (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
2008
2009 2004-06-15  Kenichi Handa  <handa@m17n.org>
2010
2011         * fontset.c (mfont__lookup_fontset): Fix selection of font groups
2012         by language.
2013
2014         * draw.c (compose_glyph_string): If langauge is specified, call
2015         mface__for_chars even if a text is all latin.  Fix condition for
2016         setting non_ascii_found.
2017
2018         * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
2019
2020         * m17n.h (minput_char_to_key): Delete extern.
2021
2022         * m17n-gui.h (minput_event_to_key): Cancel previous change.
2023
2024         * m17n-gui.c (null_device_open): Set several members of frame.
2025
2026 2004-06-14  Kenichi Handa  <handa@m17n.org>
2027
2028         * m17n-gui.h (minput_event_to_key): Delete extern.
2029
2030         * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
2031
2032         * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
2033
2034         * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
2035
2036 2004-06-08  Kenichi Handa  <handa@m17n.org>
2037
2038         * character.c (mchar_put_prop): Don't increment the ref-count of
2039         record->table.
2040
2041 2004-06-04  Kenichi Handa  <handa@m17n.org>
2042
2043         * m17n-core.c (mdebug__register_object): New function.
2044         (mdebug__unregister_object): Likewise.
2045
2046         * internal.h (mdebug__register_object, mdebug__unregister_object):
2047         Extern them.
2048         (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
2049         respectively.
2050
2051         * charset.c (mcharset__load_from_database): Don't call
2052         mconv__register_charset_coding here.
2053
2054         * coding.c (find_coding): Get a real name from an element of
2055         coding_definition_list.
2056         (mconv__register_charset_coding): Set the real name at the top of
2057         param.
2058         (mcoding__load_from_database): Likewise.
2059         (mconv_list_codings): Adjusted for the above change.
2060
2061 2004-06-03  Kenichi Handa  <handa@m17n.org>
2062
2063         * coding.c (find_coding): Find by canonicalized name.  Don't have
2064         to modify the element of coding_definition_list by
2065         mplist__from_plist.
2066         (mconv__define_coding_from_charset): Delete it.
2067         (mconv__register_charset_coding): Canonicalize sym.
2068         (mcoding__load_from_database): Register plist modified by
2069         mplist__from_plist.
2070
2071         * coding.h (mconv__define_coding_from_charset): Don't extern it.
2072
2073         * font-ft.c (ft_open): Fix setting of rfont->descent.
2074
2075 2004-06-02  Kenichi Handa  <handa@m17n.org>
2076
2077         * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
2078         (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
2079         (xlfd_unparse_name): Renamed from xfont_build_name.
2080         (mfont__init): Initialized Mfontconfig.
2081         (mfont__free_realized): Unconditionally unref rfont->info.
2082         (mfont__select): Free `this' if it's not best.
2083         (mfont__open): Don't check frame->realized_font_list.
2084         (mfont__parse_name_into_font): New function.
2085         (Mfontconfig): New variable.
2086         (mfont_from_name): Call mfont_parse_name.
2087         (mfont_name): Call mfont_unparse_name.
2088         (mdebug_dump_font): Likewise.
2089
2090         * font.h (struct MFontDriver): Delete members parse_name and
2091         build_name.
2092         (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
2093         (mfont__parse_name_into_font): Extern it.
2094
2095         * font-ft.c: Include "symbol.h".
2096         (close_ft): Unconditionally free filename and charmap_list of
2097         ft_into.
2098         (ft_open): Duplicate base->filename.  Increment ref-count of
2099         ft_info->charmap_list.  Free ft_info->charmap_list and
2100         ft_info->filename on error.
2101         (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
2102
2103         * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
2104         xfont_build_name.
2105         (enum xlfd_field_idx): Moved to font.c.
2106         (split_font_name, build_font_name): Likewise.
2107         (build_font_list): Call mfont__parse_name_info_font.
2108         (xfont_open): Call mfont__unparse_name.  Free name.
2109         (xfont_parse_name, xfont_build_name): Moved to font.c
2110         (xft_select): Prototype deleted.
2111         (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
2112         Call mfont_pase_name.
2113
2114         * m17n-gui.c (free_frame): Unref frame->font_driver_list.
2115         (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
2116         (mframe): Likewise.
2117
2118         * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
2119         Extern them.
2120
2121         * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
2122
2123 2004-06-01  Kenichi Handa  <handa@m17n.org>
2124
2125         * fontset.c (mfontset_modify_entry): Pay attention to the case
2126         that fontset->font_spec_list is NULL.
2127
2128 2004-05-31  Kenichi Handa  <handa@m17n.org>
2129
2130         * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
2131
2132         * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
2133
2134         * font.c (mfont__select): Print score the a font for debugging.
2135
2136         * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
2137
2138         * coding.c (reset_coding_sjis): Check kanji and kana instead of
2139         kanji_sym and kana_sym.
2140
2141 2004-05-28  Kenichi Handa  <handa@m17n.org>
2142
2143         * Makefile.am (VINFO): New variable.
2144         (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
2145         (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
2146
2147 2004-05-27  Kenichi Handa  <handa@m17n.org>
2148
2149         The following chanages are to make device dependent functions
2150         accessible only from MDeviceDriver structure, and to add GD and
2151         null device drivers.  Font drivers get also device dependent.
2152
2153         * m17n.c (m17n_init): Increament shell_initialized.
2154         (m17n_fini): Decremented shell_initialized.
2155
2156         * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
2157
2158         * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
2159         (Mwidget, Mcolormap, Mx): Extern them.
2160
2161         * m17n-gui.c: Include <dlfcn.h> and "config.h".
2162         (free_frame): Call frame->driver->close instead of
2163         mwin__close_device.
2164         (DLOPEN_SHLIB_EXT): New macro.
2165         (MDeviceLibraryInterface): New type.
2166         (device_library_list): New variable.
2167         (register_device_library): New function.
2168         (null_device): New variable.
2169         (null_device_close, null_device_get_prop)
2170         (null_device_realize_face, null_device_free_realized_face): New
2171         function.
2172         (null_driver): New variable.
2173         (null_device_init, null_device_fini, null_device_open): New
2174         functions.
2175         (null_interface): New variable.
2176         (Mfreetype, Mdevice): Declare them.
2177         (m17n_init_win): Increment win_initialized.  Initialize Mx, Mgd,
2178         Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
2179         Mwin__Close_Device.  Register drivers for Mx and Mgd.
2180         (m17n_fini_win): Decremented win_initialized.  Call "fini"
2181         function of all opened devices.  Don't call mwin__fini.
2182         (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
2183         Declare them here.
2184         (mframe): Handle Mdevice key of PLIST.
2185         (mframe_get_prop): Call frame->device->get_prop instead of
2186         mwin__device_get_prop.
2187
2188         * m17n-gd.c: New file.
2189
2190         * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
2191         (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
2192
2193         * m17n-core.c (m17n_init_core): Increate core_initialized.
2194         (m17n_fini_core): Decremented core_initialized.
2195
2196         * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
2197         (Mcolormap): Don't extern them here.
2198
2199         * m17n-X.c (FRAME_DEVICE): New macro.
2200         (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
2201         (free_display_info): Use MPLIST_DO.
2202         (free_device): Free rface->info.
2203         (xft_close): Delete it.
2204         (device_init): Renamed from mwin__init.
2205         (device_fini): Renamed from mwin__fini.
2206         (device_open): Renamed from mwin__open_device.
2207         (x_driver): New variable.
2208         (MXFontInfo): Delete member frame, add member display.
2209         (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
2210         Don't declare them here.
2211
2212         * internal-gui.h (MDeviceType): New enum.
2213         (MWDefice): Delete it.
2214         (struct MFrame): Change type of device to void *.  New members
2215         device_type, driver, font_driver_list.
2216         (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
2217         (MDeviceDriver): New type.
2218         (Mx, Mgd, Mfreetype): Extern them.
2219         (mwin__XXX): Delete all of them.
2220
2221         * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
2222         mwin__XXX.
2223         (win_destroy_ic): Likewise.
2224         (adjust_window_and_draw): Likewise.
2225         (win_callback): Likewise.
2226         (Mxim): Declare it here.
2227         (minput_event_to_key): Call M_CHECK_READABLE.
2228
2229         * fontset.c (mfont__lookup_fontset): Delete local variable
2230         font_group.
2231
2232         * font.h (struct MFontDriver): Delete member close, add members
2233         parse_name and build_name.
2234         (mfont__driver_list): Delete extern.
2235         (mfont__close): Delete extern.
2236
2237         * font.c (mfont__init): Don't set mfont__driver_list.
2238         (mfont__fini): Don't unref mfont__driver_list.
2239         (mfont__select): Try font drivers in frame->font_driver_list.  Set
2240         driver member of a realized font.
2241         (mfont__close): Delete it.
2242         (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
2243         functions of the default frame.
2244
2245         * font-ft.c (close_ft): Check ft_info->ft_face and work
2246         differently.
2247         (add_font_info): Allocate ft_info by M17N_OBJECT.
2248         (ft_close): Delete it.
2249         (mfont__ft_driver): Don't set ft_close.
2250         (ft_select): Increment ref-count of best_font.
2251         (ft_open): Decremented ref-count of base.  On error, call
2252         FT_Done_Face and free ft_info.
2253         (ft_find_metric): Always use XXX_MONO in load_flags.
2254         (ft_render): Fix setting of width.  Call
2255         frame->driver->draw_points instead of mwin__draw_points.
2256         (ft_to_prop): Don't set mfont__driver_list.
2257         (mfont__ft_fini): Just unref ft_info.
2258
2259         * face.c (mface__init): Exchange foreground and background of
2260         mface__default.  Call mface_put_prop to set hline of
2261         mface_underline,
2262         (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
2263         (mface__free_realized): Don't call mwin__free_realized_face.
2264
2265         * draw.c (Mdepth): Don't declare it here.
2266         (draw_background): Call frame->driver->XXX instead of mwin__XXX.
2267         (render_glyphs, render_glyph_string): Likewise.
2268         (mdraw__init): Don't set Mdepth.
2269         (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
2270         M_CHECK_WRITABLE.
2271         (mdraw_text_per_char_extents): Return 0 on success and -1 on
2272         error.
2273         (mdraw_text_items): Check FRAME is writable.
2274         (mdraw_per_char_extents): Implement body.
2275
2276         * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
2277         libm17n-gd.la.
2278         (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
2279         (GUI_SOURCES): Delete it.
2280         (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
2281         (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
2282         (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
2283         (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
2284         (linkgui_LDADD): Set to libm17n-gui.la
2285         (linkgui_LDFLAGS): New target.
2286         (SRC): Include ${libm17n_gui_la_SOURCES} and
2287         ${libm17n_gd_la_SOURCES}.
2288
2289 2004-05-24  Kenichi Handa  <handa@m17n.org>
2290
2291         * draw.c (draw_background): Don't draw background even if
2292         rface->face.property[MFACE_BACKGROUND] is not Mnil.
2293
2294 2004-05-22  Kenichi Handa  <handa@m17n.org>
2295
2296         * m17n-X.c (xft_open_font): Fix anti_alias setting.
2297
2298 2004-05-20  Kenichi Handa  <handa@m17n.org>
2299
2300         * m17n-gui.h (MFaceHookFunc): Change this function type to void.
2301
2302         * m17n-gui.c: Include "plist.h".
2303         (mframe): If PLIST is NULL, initialize it to emply plist.
2304
2305         * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
2306         (xft_driver): New variable.
2307         (xft_select, close_xft, xft_open_font, xft_open, xft_close)
2308         (xft_find_metric, xft_render): New function.
2309         (mwin__init): Adjusted for the new mfont__driver_list.
2310         (mwin__open_device): Assume arg PARAM is not NULL.  Push a newly
2311         generated face to PARAM.
2312         (mwin__realize_face): Fix setting of box colors.  Don't call hook
2313         function here.
2314         (mwin__draw_hline): New function.
2315         (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
2316         (mwin__xft_render): Delete these function.
2317
2318         * internal-gui.h (struct MFrame): New member tick.
2319         (struct MGlyphString): New member tick.
2320         (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
2321         (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
2322         (mwin__xft_render): Delete extern.
2323
2324         * fontset.c (mfont__lookup_fontset): Make the code simpler.
2325         (mfontset): Always increment the reference count of returned
2326         object.
2327
2328         * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
2329         (MFTInfo): Moved to font.h.
2330         (ft_iso8859_1_font_list): Delete this variable.
2331         (set_font_info): Don't set font->property[MFONT_TYPE].
2332         (set_font_info): Don't udpate ft_iso8859_1_font_list.
2333         (add_font_info): Change type to void.
2334         (fc_list): Change anme from xft_list.  Caller changed.  Include
2335         FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
2336         (mfont__ft_driver): Change name from ft_driver.  Caller changed.
2337         (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
2338         (close_ft): Don't call mwin__xft_close.  Unref
2339         ft_info->extra_info.
2340         (ft_open): Don't setup ft_info->fontname.  Don't call
2341         mwin__xft_open.
2342         (ft_find_metric): Don't call mwin__xft_get_metric.
2343         (ft_encode_char): Call rfont->driver->open instead of ft_open.
2344         (ft_render): Don't check HAVE_XFT2.  Don't call mwin__xft_render.
2345         (mfont__ft_init): Adjusted for new mfont__driver_list.
2346         (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
2347
2348         * font.c (mfont__driver_list): Make it MPlist.
2349         (mfont__init): Adjust initialization of mfont__driver_list.
2350         (mfont__fini): Free mfont__driver_list.
2351         (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
2352         (mfont__select): Adjusted for the new mfont__driver_list.
2353
2354         * font.h (enum MFontProperty): Delete MFONT_TYPE.
2355         (mfont__drirver_list): Adjust prototype.
2356         (MFTInfo): Move to here from fron.c.  Deleve member fontname.
2357
2358         * face.h (struct MFace): Delete member realized_face_list, add
2359         member frame_list.
2360         (struct MRealizedFace): Delete member need_update
2361         andnofont_rface, add member non_ascii_list.
2362         (mface__update_frame_face): Extern it.
2363
2364         * face.c (hline_prop_list, box_prop_list, noop_hook): New
2365         variables.
2366         (get_hline_create, get_box_create): New functions.
2367         (find_realized_face): Cancel previous change.  Arg RFONT deleted.
2368         Use memcmp.
2369         (free_face): Cancep previous change.  Free face->frame_list.
2370         (serialize_hline): Do nothing if hline->width is zero.
2371         (serialize_box): Do nothing if box->width is zero.
2372         (mface__init): Setup all properties of mface__default.
2373         (mface__fini): Free hline_prop_list and box_prop_list.
2374         (mface__realize): Cancel previous change.  Update
2375         face->frame_list.  Setup rface->non_ascii_list.
2376         (mface__for_chars): Update rface->non_ascii_list.
2377         (mface__free_realized): Free rface->non_ascii_list.
2378         (mface__update_frame_face): New function.
2379         (mface): Initialize face->frame_list.
2380         (mface_copy): Likewise.  Just copy MFACE_HLINE and MFACE_BOX
2381         properties.
2382         (mface_merge): Likewise.
2383         (mface_put_prop): If key is Mhline or Mbox, get value by
2384         get_hline_create or get_box_create respectively.
2385         (mface_put_prop): Update frame->tick and call
2386         mface__update_frame_face if necessary.
2387         (mface_update): Do nothing if func is noop_hook.
2388
2389         * draw.c (render_glyphs): If a font is not found, use
2390         mwin__draw_empty_boxes.
2391         (alloc_gstring): Initialize gstring->tick.
2392         (get_gstring): Check gstring->tick.
2393
2394 2004-05-17  Kenichi Handa  <handa@m17n.org>
2395
2396         * face.c (find_realized_face): Return value changed.  If RFONT is
2397         NULL, avoid unnecessary checking.
2398         (free_face): Free face->realized_face_list.
2399         (mface__realize): Adjusted for the change of find_realized_face.
2400         If it returns a realized face that needs update, free it and
2401         realize a new one.  Push a new realized face to
2402         frame->realized_face_list instead of appending.
2403         (mface__for_chars): Adjusted for the change of find_realized_face.
2404         Short cut if the required font is in rface->ascii_rface.
2405         (mface_put_prop): Free old value if necessary.  Set need_update
2406         member of realized faces to 1.
2407
2408         * face.h (struct MFace): Delete member tick, add member
2409         realized_face_list.
2410         (struct MRealizedFace): Delete member tick, add member
2411         need_update.
2412
2413 2004-05-13  Kenichi Handa  <handa@m17n.org>
2414
2415         * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
2416
2417 2004-05-12  Kenichi Handa  <handa@m17n.org>
2418
2419         * internal-gui.h (mwin__xft_open): Arguemnt name changed.
2420
2421         * m17n-X.c (mwin__xft_open): Argument changed to fontname and
2422         parse it XftNameParse.
2423
2424         * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
2425         (all_fonts_scaned): New variable.
2426         (set_font_info): FAMILY may be Mnil.
2427         (add_font_info): Argument changed.
2428         (xft_list): Call add_font_info in it.
2429         (ft_list): Likewise.
2430         (ft_select): Make it work in the case family is Mnil.
2431         (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
2432         (mfont__ft_fini): Set all_fonts_scaned to 0.
2433
2434         * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
2435         that is failed to open.
2436
2437 2004-05-10  Kenichi Handa  <handa@m17n.org>
2438
2439         * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
2440         device's depth is 1 (i.e. monochrome).
2441
2442         * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
2443         to work around the problem of libtool.
2444
2445         * font-ft.c: Include <freetype/ftbdf.h>.
2446         (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
2447         variables.
2448         (mfont__ft_init): Initialize them.
2449         (ft_iso8859_1_font_list): New variable.
2450         (set_font_info): Detect a font containing iso8859-1 glyphs and
2451         register it in ft_iso8859_1_font_list.  If the font is not
2452         scalable, assume it as BDF or PCF font and setup SIZE and RESY
2453         properties of the font from its properties.
2454         (add_font_list): If the font is not scalable, check if it is BDF
2455         or PCF font.  If not, ignore it.
2456         (ft_select): If FAMILY is Mnil, return NULL only if the requested
2457         registry is not iso8859-1.
2458         (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
2459         ft_iso8859_1_font_list.
2460         (ft_find_metric): If the font is not scalable, assume it as BDF
2461         or PCF, and get a metric from its properties.
2462         (mfont__ft_fini): Free ft_iso8859_1_font_list.
2463
2464 2004-05-07  Kenichi Handa  <handa@redhat.m17n.org>
2465
2466         * Makefile.am (libm17n_la_LIBADD): Include -ldl.
2467         (libm17n_la_LDFLAGS): Delete it.
2468         (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
2469         (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
2470
2471 2004-05-06  Kenichi Handa  <handa@m17n.org>
2472
2473         * draw.c (compose_glyph_string): Fix previous change.
2474
2475 2004-04-30  Kenichi Handa  <handa@m17n.org>
2476
2477         * font-ft.c (ft_list): Delete unused variable `result'.
2478         (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
2479
2480 2004-04-27  Kenichi Handa  <handa@m17n.org>
2481
2482         * m17n-X.c: Include config.h
2483         [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
2484         (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
2485         (MWDevice) [HAVE_XFT2]: New member xft_draw.
2486         (FRAME_CMAP, FRAME_VISUAL): New macros.
2487         (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
2488         (xfont_driver): Make it static.
2489         (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
2490         (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
2491         info->xft_color_back.
2492         (MXftFontInfo) [HAVE_XFT2]: New type.
2493         (mwin__xft_close) [HAVE_XFT2]: New function.
2494         (mwin__xft_open) [HAVE_XFT2]: New function.
2495         (mwin__xft_get_metric) [HAVE_XFT2]: New function.
2496         (mwin__xft_render) [HAVE_XFT2]: New function.
2497
2498         * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
2499         (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
2500         (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
2501         externs.
2502
2503         * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
2504
2505         * font-ft.c: Don't include FT_FREETYPE_H here.
2506         [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
2507         (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
2508         (MFTInfo): New member charmap_index.
2509         (MFTInfo) [HAVE_XFT2]: New member xft_info.
2510         (check_otf_filename): Renamed from check_filename.  Return value
2511         changed.
2512         (ft_set_property): This function deleted.
2513         (set_font_info): New function.
2514         (add_font_list): Argument changed.  Add multiple fonts.
2515         (xft_list) [HAVE_XFT2]: New function.
2516         (ft_list) [not HAVE_XFT2]: New function.
2517         (ft_select): Add code for Xft.
2518         (close_ft): Likewise.
2519         (ft_open): Likewise.
2520         (ft_find_metric): Likewise.
2521         (ft_encode_char): Likewise.
2522         (ft_render): Likewise.
2523
2524         * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
2525
2526 2004-04-26  Kenichi Handa  <handa@m17n.org>
2527
2528         * textprop.c (mtext_attach_property): Declare the return type as
2529         `int'.
2530
2531 2004-04-21  Kenichi Handa  <handa@m17n.org>
2532
2533         * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
2534
2535 2004-04-09  Kenichi Handa  <handa@m17n.org>
2536
2537         * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
2538         seq_to.
2539         (load_command): Setup above members.
2540
2541 2004-04-05  Kenichi Handa  <handa@m17n.org>
2542
2543         * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
2544
2545 2004-03-30  Kenichi Handa  <handa@m17n.org>
2546
2547         * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
2548         >= 0x10000.
2549
2550         * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
2551         (M17NLIB_VERSION_NAME): Changed to 1.0.2.
2552
2553 2004-03-29  Kenichi Handa  <handa@m17n.org>
2554
2555         * Version 1.0 Patch Level 2 released.
2556
2557 2004-03-29  Kenichi Handa  <handa@m17n.org>
2558
2559         * charset.c (make_charset): Set charset->fully_loaded and
2560         charset->simple correctly.  Don't try to get charset->min_char and
2561         charset->max_char for a charset of method subset and superset.
2562         Don't load a mapping file here.
2563         (mcharset__init): Set unified_max.
2564         (mcharset__load_from_database): Free a working plist.
2565
2566         * coding.c (mcoding__fini): Free all malloced data.
2567
2568         * input-gui.c (win_create_ic): Set control.as_image for preediting
2569         to 0.
2570
2571         * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
2572         `count') to initialize the array.
2573
2574         * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
2575         M17N_OBJECT_UNREF.
2576
2577         * m17n-X.c (xfont_render): If rface->rfont is null, draw a
2578         rectangle.
2579         (mwin__create_window): Fix bug of setting a background pixel of a
2580         new window.
2581         (mwin__adjust_window): Clear the window before drawing.
2582
2583         * m17n-core.c (mdebug__report_object): Free array->objectes if
2584         necessary.
2585         (m17n_init_core): Don't set report_header_printed to 0 here.
2586         Fix debugging information.
2587         (m17n_fini_core): Set report_header_printed to 0 here.
2588
2589         * m17n-core.h (mplist_deserialize): Extern it.
2590
2591         * m17n-gui.c (m17n_fini_win): Fix debugging information.
2592
2593         * m17n.c (m17n_fini): Fix debugging information.
2594
2595         * mtext.c (mtext__adjust_foramt): New function.
2596
2597         * mtext.h (mtext__adjust_foramt): Extern it.
2598
2599         * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
2600
2601         * plist.h (mplist__deserialize): Don't extern it.
2602
2603         * symbol.c (msymbol__fini): Set freed_symbols to 0.  Set all
2604         elements of symbol_table to NULL.  Report about created and freed
2605         symbols if MDEBUG_FINI is set.
2606
2607 2004-03-22  Kenichi Handa  <handa@m17n.org>
2608
2609         * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
2610
2611         * m17n.c (m17n_init): Fix the way of checking merror_code.
2612
2613         * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
2614
2615 2004-03-22  Kenichi Handa  <handa@m17n.org>
2616
2617         * fontset.c (realize_font_group): Adjust the font size by
2618         mfont__resize before selecting a font.
2619
2620         * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
2621
2622 2004-03-19  Kenichi Handa  <handa@m17n.org>
2623
2624         * Version 1.0 Patch Level 1 released.
2625
2626 2004-03-19  Kenichi Handa  <handa@m17n.org>
2627
2628         * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
2629
2630         * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
2631
2632 2004-03-19  Kenichi Handa  <handa@m17n.org>
2633
2634         Re-apply the changes forgotten in the released version.
2635
2636         * charset.c (mcharset__load_from_database): Call
2637         mchar_define_charset.
2638
2639         * coding.c (encode_unsupporeted_char): Put Mcoding text property.
2640         (mconv_encode_range): Put Mcoding text property.
2641
2642 2004-03-18  Kenichi Handa  <handa@m17n.org>
2643
2644         * draw.c (Mdepth): New variable.
2645         (visual_order): Delete unused local var `pos'.
2646         (compose_glyph_string): Fix for the case that gstring->glyphs is
2647         realloced.  Stop generating glyphs at TO.  Fix handling of
2648         control charaters.
2649         (layout_glyphs): Get metrics of all glyphs in advance.  Set
2650         lbearing and rbearing of base of composition glyph correctly.
2651         Handle left-overhang glyphs correctly.
2652         (alloc_gstring): New arg frame.  Set gstring->anti_alias.  Caller
2653         changed.
2654         (dump_combining_code): Change the defualt off_x character to ".".
2655         (mdraw__init): Initialize Mdepth.
2656
2657         * face.c (work_gstring): New variable
2658         (mface__init): Initialize work_gstring.
2659         (mface__fini): Free work_gstring.glyphs.
2660         (mface__realize): Don't handle videomode property here.  Adjusted
2661         for the change of mfont__get_metric.
2662         (mface__for_chars): Adjusted for the change of mfont__get_metric.
2663
2664         * face.h (enum face_gc): Moved to m17n-X.c.
2665
2666         * font.h (struct MFontDriver): Arguments of find_metric changed.
2667         (mfont__select): Prototype adjusted.
2668         (mfont__get_metric): Likewise.
2669         (mfont__ft_drive_otf): Likewise.
2670         (mfont__flt_run): Likewise.
2671         
2672         * font.c (mfont__select): New argument layouter.  If layouter is
2673         different in the registered font, make a new copy of realized
2674         font.
2675         (mfont__get_metric): Argument changed.  Get metrics of multiple
2676         glyphs.
2677         (mfont_find): Call mfont__select with layouter as Mnil.
2678
2679         * font-flt.c (FontLayoutContext): New member rfont.
2680         (run_otf): Adjusted for the change of mfont__ft_drive_otf.
2681         (mfont__flt_run): Argument changed.  Initialize ctx.rfont.
2682
2683         * font-ft.c (ft_find_metric): Arguments changed.  Get metrics of
2684         multiple glyphs.
2685         (NUM_POINTS): New macro.
2686         (MPointTable): New type.
2687         (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
2688         (mfont__ft_drive_otf): New argument rfont.
2689
2690         * fontset.c (realize_font_group): Adjusted for the changed of
2691         mfont__select.
2692         (check_fontset_element): This function deleted.
2693
2694         * input-gui.c (adjust_window_and_draw): Locate a preedit window
2695         off the parent window if the preedit text is zero length.
2696
2697         * internal-gui.h (struct MFrame): New members foreground,
2698         background, videomode, font.
2699         (struct MGlyphString): New member anti_alias.
2700         (MDrawPoint): New type.
2701         (mwin__draw_bitmap): Prototype deleted.
2702         (mwin__draw_points): Prototype added.
2703
2704         * m17n-gui.h (MDrawControl): New member anti_alias.
2705
2706         * m17n-gui.c (free_frame): Free frame->font.
2707         (mframe): Set the fontset of frame->face to the default fontset.
2708
2709         * m17n-X.c (RGB_GC): New type.
2710         (enum gc_index): Renamed from enum face_gc.  Member names changed.
2711         (GCInfo): New typel
2712         (struct MWDevice): Members foreground and background deleted.  New
2713         member scratch_gc, gc_list.
2714         (DEFAULT_FONT, FALLBACK_FONT): New macros.
2715         (free_device): Free GCs in device->gc_list.
2716         (get_rgb_gc): New function.
2717         (get_gc): Renamed and argument changed from get_color.
2718         (get_gc_for_anti_alias): New function.
2719         (xfont_find_metric): Arguments changed.  Get metrics of multiple
2720         glyphs.
2721         (set_region): Argument changed.  Caller changed.
2722         (xfont_render): Allways set a font in gc.
2723         (x_error_handler, x_io_error_handler): Define only if
2724         X_SET_ERROR_HANDLER is defined.
2725         (mwin__open_device): Create device->scratch_gc.  Set members
2726         foreground, background, and videomode of frame.  Call
2727         XSetErrorHandler and XSetIOErrorHandler only if
2728         X_SET_ERROR_HANDLER is defined.
2729         (struct gc_list): Deleted.
2730         (REGISTER_GC, UNREGISTER_GC): These macros deleted.
2731         (mwin__realize_face): Adjusted for the change of the format of
2732         rface->info and the charge of set_region.
2733         (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
2734         (mwin__draw_box): Likewise.
2735         (mwin__draw_bitmap): This function deleted.
2736         (mwin__draw_points): New function.
2737         (mwin__verify_region): Adjusted for the change of the format of
2738         rface->info and the charge of set_region.
2739         (mwin__create_window): Inherit backgound pixel from parent.
2740         (mwin__dump_gc): Adjusted for the change of the format of
2741         rface->info.
2742
2743 2004-03-16  Kenichi Handa  <handa@m17n.org>
2744
2745         * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
2746
2747         * input.c (M_key_alias): New variable.
2748         (handle_key): Try M_key_alias property of a key too.
2749         (minput__init): Initialize M_key_alias.  Give that property to
2750         symbols in one_char_symbol.  Fix bug of initializing
2751         one_char_symbol.
2752
2753         * draw.c (compose_glyph_string): Don't handle
2754         ignore_formatting_char here.  Include formatting characters in the
2755         range processed by a FTL.
2756         (layout_glyph_string): Handle ignore_formatting_char here.
2757
2758 2004-03-12  Kenichi Handa  <handa@m17n.org>
2759
2760         * input-gui.c (win_create_ic): Enable bidi in status control.
2761
2762         * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
2763
2764 2004-03-09  Kenichi Handa  <handa@m17n.org>
2765
2766         * input.c (load_input_method): If title is not specified, use the
2767         input method name as title.
2768
2769         * m17n-X.c (get_color): Make it static.
2770         (xim_create_ic, xim_destroy_ic, x_error_handler)
2771         (x_io_error_handler): Likewise.
2772
2773 2004-03-01  Kenichi Handa  <handa@m17n.org>
2774
2775         * Version 1.0 released.
2776
2777 \f
2778 Copyright (C) 2003, 2004
2779   National Institute of Advanced Industrial Science and Technology (AIST)
2780   Registration Number H15PRO112
2781
2782 This file is part of the m17n library.
2783
2784 The m17n library is free software; you can redistribute it and/or
2785 modify it under the terms of the GNU Lesser General Public License
2786 as published by the Free Software Foundation; either version 2.1 of
2787 the License, or (at your option) any later version.
2788
2789 The m17n library is distributed in the hope that it will be useful,
2790 but WITHOUT ANY WARRANTY; without even the implied warranty of
2791 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
2792 Lesser General Public License for more details.
2793
2794 You should have received a copy of the GNU Lesser General Public
2795 License along with the m17n library; if not, write to the Free
2796 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
2797 02111-1307, USA.