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