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