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