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