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