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