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