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