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