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