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