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