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