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