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