*** empty log message ***
[m17n/m17n-lib.git] / src / ChangeLog
1 2005-04-16  Kenichi Handa  <handa@m17n.org>
2
3         * word-thai.c: Include <stdio.h>.
4
5 2005-04-15  Kenichi Handa  <handa@m17n.org>
6
7         * draw.c: Include mtext.h.
8         (linebreak_table, M_break_at_space, M_break_at_word)
9         (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
10         (compose_glyph_string): Check POS before getting Mface text
11         property.
12         (truncate_gstring): Give correct TO arg to line_break function.
13         (GET_LB_TYPE): New macro.
14         (find_break_backward, find_break_forward): New functions.
15         (mdraw__init): Initialize the above new variables.
16         (mdraw__fini): Free linebreak_table.
17         (mdraw_default_line_break): Use find_break_backward and
18         find_break_forward.
19
20         * word-thai.c: New file.
21
22         * word-thai.h: New file.
23
24         * mtext.c: Include word-thai.h.
25         (wordseg_func_table): New variable.
26         (mtext__init): Initialize wordseg_func_table and call
27         mtext__word_thai_init.
28         (mtext__fini): Call mtext__word_thai_fini, free
29         wordseg_func_table.
30         (MTextWordsegFunc): New type.
31         (mtext__word_segment): New function.
32
33         * mtext.h (wordseg_func_table): Extern it.
34         (mtext__word_segment): Extern it.
35
36         * m17n.c (m17n_init): Fix typo (== -> =).
37
38         * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
39         (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
40
41         * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
42         (MTEXTPROP_VAL): New macros.
43
44         * input.c (DLOPEN_SHLIB_EXT): Don't define it.
45
46 2005-04-07  Kenichi Handa  <handa@m17n.org>
47
48         * database.c (load_chartable): Fix pursing of symbol name.
49
50 2005-03-24  Kenichi Handa  <handa@m17n.org>
51
52         * m17n.c (m17n_init): Fix typo (== -> =).
53
54 2005-03-11  Kenichi Handa  <handa@m17n.org>
55
56         * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
57
58         * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
59
60         * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
61         first.
62
63 2005-03-09  handa  <handa@m17n.org>
64
65         * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
66         calling m17n_init ().
67
68         * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
69         calling m17n_init_core ().
70
71 2005-02-28  Kenichi Handa  <handa@m17n.org>
72
73         * font-flt.c (mfont__flt_run): Add resulting code sequence in
74         debug info.
75
76 2005-02-17  Kenichi Handa  <handa@m17n.org>
77
78         * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
79         (M_description, M_command, M_variable): New variables.
80         (load_im_info_keys): New variables.
81         (load_im_info, check_command_keyseq, get_description_advance)
82         (parse_command_list, get_command_list, parse_variable_list)
83         (get_variable_list, input_method_hook): New functions.
84         (command_list, variable_list): New variables.
85         (minput__init): Put input_method_hook to Minput_method.
86         Initialize M_description, M_command, M_variable, Mdetail_text,
87         load_im_info_keys, command_list, variable_list.
88         (minput__fini): Unref command_list, variable_list, load_im_info_keys.
89         (Mdetail_text): New variable.
90         (minput_get_description, minput_get_commands)
91         (minput_assign_command_keys, minput_get_variables)
92         (minput_set_variable): New functions.
93
94         * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
95         (minput_assign_command_keys, minput_get_variables)
96         (minput_set_variable): Extern them.
97
98         * plist.c (UNGETC): Just decrement st->p.
99         (read_mtext_element): New arg skip.
100         (read_integer_element): Likewise.
101         (read_symbol_element): Likewise.
102         (read_element): New arg KEYS.
103         (mplist__from_plist): Don't increment ref-count of NULL object.
104         (mplist__from_file): New arg KEYS.
105         (mplist_put): Don't increment ref-count of NULL object.
106         (mplist_add): Likewise.
107         (mplist_push): Likewise.
108         (mplist_set): Likewise.  Call M17N_OBJECT_UNREF unconditionally.
109
110         * plist.h (mplist__from_file): Prototype adjusted.
111
112         * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
113         (get_database_stream): New function.
114         (load_database): Use get_database_stream.
115         (M_database_hook): New variable
116         (mdatabase__init): Initialize M_database_hook.
117         (mdatabase__load_for_keys): New function.
118         (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
119         function.
120         (mdatabase_define): Free mdb->extra_info if necessary.
121
122         * database.h (mdatabase__dir_list, M_database_hook)
123         (mdatabase__load_for_keys): Extern them.
124         (MDatabaseHookFunc): New type.
125
126         * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
127
128 2004-12-27  Kenichi Handa  <handa@m17n.org>
129
130         * Version 1.2.0 released.
131
132 2004-12-27  Kenichi Handa  <handa@m17n.org>
133
134         * input.c (minput_filter): Don't reset ic->xxx_changed.
135
136         * mtext.c (mtext_from_data): Fix documentation.
137
138 2004-12-25  Kenichi Handa  <handa@m17n.org>
139
140         * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
141         (M17NLIB_VERSION_NAME): Update to "1.2.".
142
143 2004-12-24  Kenichi Handa  <handa@m17n.org>
144
145         * input.c (reset_ic): Set key_unhandled to 0.
146
147 2004-12-21  Kenichi Handa  <handa@m17n.org>
148
149         * m17n-gui.h (mfont_from_spec): Delete extern.
150
151         * input-gui.c (win_callback): Handle Minput_reset.
152         (minput__win_init): Register reset_ic as a callback for
153         Minput_reset.
154
155         * input.c (reset_ic): New arg IGNORE which is ignored.  Caller
156         changed.  At first, shift to the initial state.
157         (minput__init): Initialize Minput_reset.  Register reset_ic as a
158         callback for Minput_reset.
159         (Minput_reset): New variable.
160         (minput_filter): Always set ic->xxx_changed to 0.
161         (minput_reset_ic): New function.
162         (integer_value): Fix typo ('>' -> '<') and calculation of length
163         of preedit text.
164
165         * m17n-core.c (merror_code): Change type to `int'.
166
167         * m17n-misc.h (merror_code): Adjust type.
168
169         * m17n.h (Minput_reset, minput_reset_ic): Extern them.
170
171         * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
172         (mtext_change_prop): Delete extern.
173
174         * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
175         to `int'.  Move the documents to m17n-core.h.
176
177 2004-12-13  Kenichi Handa  <handa@m17n.org>
178
179         * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
180         (MTextProperty): Document it.
181
182 2004-12-09  Kenichi Handa  <handa@m17n.org>
183
184         * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
185
186 2004-12-03  Kenichi Handa  <handa@m17n.org>
187
188         * internal.h (m17n__core_initialized, m17n__shell_initialized,
189         m17n__gui_initialized): New externs.
190
191         * m17n-core.h (enum M17NStatus): New enum.
192         (m17n_status): Extern it.
193
194         * m17n-core.c (core_initialized): Delete this variable.
195         (m17n__core_initialized, m17n__shell_initialized,
196         m17n__gui_initialized): New variables.
197         (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
198         instead of core_initialized.
199         (m17n_status): New function.
200
201         * m17n.c (shell_initialized): Delete this variable.
202         (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
203         shell_initialized.
204
205         * m17n-gui.h (m17n_init_win): Adjust the prototype.
206
207         * m17n-gui.c (win_initialized): Delete this variable.
208         (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
209         instead of gui_initialized.
210
211 2004-11-19  Kenichi Handa  <handa@m17n.org>
212
213         * input.c (reset_ic): Check if ic_info->state is NULL.
214         (filter): If ic_info->state is NULL, return 0.
215         (load_input_method): Don't unref `maps' it it's not created.
216
217 2004-11-15  Kenichi Handa  <handa@m17n.org>
218
219         * input.c (find_candidates_group): If INDEX is -1, find the last
220         candidate group.
221         (take_action_list): If the previous of the first candidate is
222         requested, select the last candidate.
223
224 2004-11-08  Kenichi Handa  <handa@m17n.org>
225
226         * m17n-X.c (device_open): Try at most 32 fonts to find a
227         non-autoscaled font.
228
229         * font.c (xlfd_parse_name): Fix previous change.
230
231 2004-11-05  Kenichi Handa  <handa@m17n.org>
232
233         * font.c: (commont_style): Include dummy elements "slanted" and
234         "rslanted" to prefer "o" to "r" if "i" is requested.
235
236         * font-ft.c (ft_to_prop): Fix "oblique" entry.
237
238 2004-10-29  Kenichi Handa  <handa@m17n.org>
239
240         * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
241
242         * m17n-X.c (MXFont): Change type of the member `sizes' to int.
243         New members smallest and larger.
244         (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
245         (xfont_registry_list): Likewise.
246         (xfont_select): Likewise.
247         
248
249 2004-10-28  Kenichi Handa  <handa@m17n.org>
250
251         * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
252         font name comparison.
253         (xfont_select): Fix logic for selecting a larger size font.
254
255 2004-10-25  Kenichi Handa  <handa@m17n.org>
256
257         * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
258         ">" actions.
259
260 2004-10-22  Kenichi Handa  <handa@m17n.org>
261
262         * input.c (update_candidate): Renamed from udpate_candidate.
263         (take_action_list): Show more debugging info on arithmetic commands.
264
265         * m17n-X.c (device_open): Fix previous change.
266
267         * draw.c (compose_glyph_string): Don't get face property at the
268         end of M-text.
269
270 2004-10-21  Kenichi Handa  <handa@m17n.org>
271
272         * draw.c (compose_glyph_string): Fix for the case of category
273         being Mnil.
274
275 2004-10-19  Kenichi Handa  <handa@m17n.org>
276
277         * input.c (mdebug_mask): New variable.
278         (shift_state): Print debug information.
279         (take_action_list): Likewise.
280         (handle_key): Likewise.
281
282 2004-10-14  Kenichi Handa  <handa@m17n.org>
283
284         * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
285
286 2004-10-13  Kenichi Handa  <handa@m17n.org>
287
288         * m17n-X.c (device_open): Be sure to register at least one font
289         driver.
290
291         * font-ft.c: Include <freetype/ftbdf.h> conditionally.  Check
292         HAVE_FTBDF_H before calling FT_Get_BDF_Property.
293
294 2004-10-12  Kenichi Handa  <handa@m17n.org>
295
296         * draw.c (alloc_gstring): Fix previous change.
297
298         * font-ft.c (ft_list_generic): Fix for the case of not
299         HAVE_FONTCONFIG.
300
301         * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
302
303         * font.c (mfont_list): If no font is found, return NULL.
304         (load_font_encoding_table): Put entries of nil registry first.
305         (find_encoding): Adjust for the above change.
306
307 2004-10-11  Kenichi Handa  <handa@m17n.org>
308
309         * m17n-gui.h (mfont_list): Adjust prototype.
310
311         * m17n-X.c (xfont_list): New arg maxnum.
312
313         * font.h (struct MFontDriver): Change prototype of <list>.
314
315         * font-ft.c (fc_generic_family_list): Delete it.
316         (Mserif, Msans_serif, Mmonospace): Delete them.
317         (M_generic_family_info): New variable.
318         (enum GenericFamilyType): New enum.
319         (struct GenericFamilyInfo): New struct.
320         (generic_family_table): New variable.
321         (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
322         iso8859-1.
323         (add_font_info): Get style here.
324         (ft_list_family): Don't initialize fc_config here.  Don't list
325         generic families.
326         (ft_list_generic): New function.
327         (ft_select): Pay attention to generic familes here.
328         (ft_open): Fix calculation of ascent and descent.
329         (ft_list): Pay attention to generic families.
330         (mfont__ft_init): Initialize M_generic_family_info,
331         generic_family_table, and fc_config..
332         (mfont__ft_fini): Finalize generic_family_table.
333
334         * draw.c (compose_glyph_string): Use more constant font for
335         glyphs.  Adjust for the member change in MGlyph.
336         (layout_glyph_string): Adjust for the member change in MGlyph.
337         (alloc_gstring): Intilize scracth_glyph to avoid
338         compose_glyph_string on it.
339         (get_gstring): Don't call compose_glyph_string on scracth_glyph.
340         (mdraw_coordinates_position): Fix previous change.
341
342         * internal-gui.h (glyph_category): New enum.
343         (MGlyph): Change type of <category> to enum glyph_category.
344
345         * face.c (mface__realize): Delete args langauge and charset.
346         (mface__for_chars): Fix for the case that glyphs have different
347         rfaces.
348         (mface__update_frame_face): Adjust for mface__realize change.
349
350         * face.h (mface__realize): Adjust prototype.
351
352 2004-10-05  Kenichi Handa  <handa@m17n.org>
353
354         * language.c (mlang__init): Add Akan.
355
356 2004-10-04  Kenichi Handa  <handa@m17n.org>
357
358         * font-ft.c (add_font_info): Add instead of push the element.
359         (ft_list_family): For generic fonts, try all
360         substituted. families.
361
362         * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
363         (run_rule): Don't update cluster range here.
364         (run_command): Update cluster range on appending a glyph.
365         (run_otf): Update cluster range for glyphs generated by OTF.
366
367 2004-10-02  Kenichi Handa  <handa@m17n.org>
368
369         * m17n-X.c (device_open): Handle Mfont key in PLIST.
370
371 2004-09-30  Kenichi Handa  <handa@m17n.org>
372
373         * font-ft.c (ft_select): Ignore family on calling mfont__score.
374
375 2004-09-30  Kenichi Handa  <handa@m17n.org>
376
377         * font.h: Include <fontconfig/fontconfig.h>.
378         (MFTInfo): New member langset.
379         (mfont__encoding_list): Extern it.
380
381         * font.c (mfont__encoding_list): New function.
382         (mdebug_dump_font_list): New function.
383
384         * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
385         (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
386         variables.
387         (ft_family_list): New variable.
388         (set_font_info): New arg basep.  Callers changed.
389         (fc_list): Check the return value of FcPatternGetString.
390         (add_font_info): New arg plist.  Callers changed. Update
391         ft_family_list.
392         (ft_list_family): New function (merged fc_list and ft_list_all).
393         (ft_select): Use ft_list_family.
394         (ft_list): Likewise.  If FONT is not NULL, check all fonts.  Fix
395         typo (== -> !=).
396         (mfont__ft_init): Initialize above new variables.
397         (mfont__ft_fini): Free ft_family_list.
398         (STRDUP_LOWER): New macro.
399         (set_font_info): Use STRDUP_LOWER.
400         (ft_list_family): Avoid duplicate addition of font path.  Use
401         STRDUP_LOWER.
402         (fc_decode_prop): Fix typo.
403
404         * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
405         (xfont_registry_list): Change argument disp_info to frame.
406         Callers changed.
407         (xfont_list_all): New function.
408         (xfont_list): If FONT is not NULL, check all fonts.
409
410 2004-09-28  Kenichi Handa  <handa@m17n.org>
411
412         * m17n-X.c (MXFont, MXFontList): New types.
413         (MDisplayInfo): Delete members font_registry_list,
414         iso8859_1_family_list, iso10646_1_family_list, new members
415         font_list, base_font_list.
416         (free_display_info): Adusted for the change of MDisplayInfo.
417         (xfont_driver): Initialize with xfont_list.
418         (font_compare): New function.
419         (build_font_list): Deleted.
420         (xfont_registry_list): New function.
421         (xfont_select): Use xfont_registry_list.
422         (xfont_list): New function.
423         (device_open): Adusted for the change of MDisplayInfo.
424
425         * font-ft.c (add_font_info): New arg languages.  Callers changed.
426         (fc_list): Get languages from fonts..
427         (ft_list_all): Renamed from ft_list.  Callers changed.
428         (ft_list): New function.
429         (mfont__ft_driver): Initalize with ft_list.
430
431         * font.c (mfont_list): New function.
432
433         * font.h (struct MFontDriver): New member `list'.
434         (MFTInfo): New member languages.
435
436         * m17n-gui.h (mfont_list): Extern it.
437
438 2004-09-27  Kenichi Handa  <handa@m17n.org>
439
440         * internal-gui.h (struct MGlyphString): Delete members mt,
441         sub_width, sub_lbrearing, sub_rbearing, and region.
442
443         * draw.c (MSubTextExtents): New type.
444         (layout_glyphs): New arg extents.  Set its members.
445         (layout_glyph_string): Adjusted for the above change.
446         (alloc_gstring): Don't set gstring->mt.
447         (truncate_gstring): Call line_break function with mt instead of
448         gstring->mt.
449
450 2004-09-22  Kenichi Handa  <handa@m17n.org>
451
452         * mtext.c (count_utf_16_chars): Count each code of invalid
453         surrogates as one.
454
455 2004-09-19  Kenichi Handa  <handa@m17n.org>
456
457         * mtext.c (default_utf_16, default_utf_32): Rename them to
458         MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively.  Caller
459         changed.
460
461         * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
462         them.
463
464 2004-09-13  Kenichi Handa  <handa@m17n.org>
465
466         * draw.c (Mlatin): Don't declare it here.
467         (visual_order): Fix reordering of combining characters.
468         (compose_glyph_string): Fix detection of script.
469         (layout_glyphs): Don't fix reordering of combining characters
470         here.
471         (layout_glyph_string): Pay attention to
472         control->disable_overlapping_adjustment.
473         (truncate_gstring): Include at least on character in a line.
474         (get_gstring): Always scan one full line.
475         (mdraw__init): Don't initialize Mlatin here.
476         (mdraw_text_per_char_extents): Fix iteration.  If a glyph doesn't
477         have a font, use ascent/descent of an ASCII font.  Allow
478         ink_array_return and logical_array_return to be NULL.
479         (mdraw_coordinates_position): Fix iteration.
480
481         * font-ft.c (MFTtoProp): Member completely changed.
482         (ft_to_prop): Adjusted for the above change.
483         (ft_to_prop_size): Likewise.
484         (set_font_info): Adjusted for the change of MFTtoProp.
485         (fc_generic_family_list): New variable.
486         (fc_list): Add special handling of generic font names.
487         (mfont__ft_init): Adjusted for the change of MFTtoProp.
488         Initialize fc_generic_family_list.
489         (mfont__ft_fini): Don't free ft_to_prop.  Free
490         fc_generic_family_list.
491         (FC_vs_M17N_font_prop): New type.
492         (fc_weight_table, fc_slant_table, fc_width_table): New variables.
493         (fc_decode_prop, fc_encode_prop): New functions.
494         (mfont__ft_parse_name): Use fc_decode_prop.
495         (mfont__ft_unparse_name): Use fc_encode_prop.
496
497         * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
498         (MWDevice): Add member realized_font_list.
499         (free_display_info): Don't free disp_info->realized_font_list.
500         (free_device): Free device->realized_fontset_list.
501         (xft_find_metric): Use gstring->frame instead of rfont->frame.
502         (device_open): Don't initialize disp_info->realized_font_list.
503         (device_open): Initialize device->realized_font_list and set it to
504         frame->realized_font_list.
505
506         * fontset.c (try_font_group): New function.
507         (mfont__lookup_fontset): Use try_font_group.
508
509         * font.c (common_weight): Change the order of "regular".
510
511         * face.c (Mlatin): Don't make it static.
512         (mface__realize): Be sure to set work_gstring.frame.
513         (mface__for_chars): Likewise.
514
515         * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
516         MTEXT_FORMAT_UTF_8.
517
518         * internal-gui.h (Mlatin): Extern it.
519
520         * m17n-gui.h (MDrawControl): New member
521         disable_overlapping_adjustment.
522
523 2004-09-06  Kenichi Handa  <handa@m17n.org>
524
525         * font-flt.c (run_otf): Fix typo ('}'->']').
526
527         * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
528         (COMBINING_PRECOMPUTED_P): New macros.
529
530         * draw.c (layout_glyphs): Handle precomputed combining code.
531
532         * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
533         precomupted combining code.
534
535 2004-09-03  Kenichi Handa  <handa@m17n.org>
536
537         * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
538         otf_gstring.glyphs.
539
540 2004-08-27  Kenichi Handa  <handa@m17n.org>
541
542         * face.c (mface_put_prop): If the new value is the same as the
543         current one, don't increment frame->tick.
544
545 2004-08-25  Kenichi Handa  <handa@m17n.org>
546
547         * fontset.c (mfontset): Initialize font_spec_list member.
548         (mfontset_copy): Load fontset if necessary.
549
550         * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
551         'metrics' to for C++.
552
553         * draw.c (mdraw_glyph_info): Adjusted for the member name change
554         (this -> metics).
555
556 2004-08-16  Kenichi Handa  <handa@m17n.org>
557
558         * Version 1.1.0 released.
559
560 2004-08-13  Kenichi Handa  <handa@m17n.org>
561
562         * language.c (mlang__init): Add Dhivehi.
563
564         * m17n-gui.c (Mx, Mfreetype): Delete it.
565         (m17n_init_win): Don't initialize Mx and Mfreetype here.
566
567         * m17n-gui.h (Mfreetype, Mxft): Extern them.
568         (mfont_resize_ratio): Extern it.
569         (MDrawGlyphInfo): New member logical_width;
570         (MDrawGlyph): New type.
571         (mdraw_glyph_list): Prototype adjusted.
572
573         * m17n-X.c (xfont_open): Set type and fontp members.
574         (xft_open): Likewise.
575
576         * internal-gui.h (Mx, Mfreetype): Delete extern.
577
578         * font.h (struct MRealizedFont): New member type and fontp.
579
580         * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
581         (Mx, Mfreetype): Declare here.
582         (Mxft): New variable.
583         (mfont_resize_ratio): New function.
584
585         * font-ft.c (ft_open): Set type and fontp members.
586
587         * draw.c (mdraw_glyph_list): Argument type changed.  Don't set
588         glyph_code member.
589
590 2004-08-11  Kenichi Handa  <handa@m17n.org>
591
592         * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
593         FT_LOAD_DEFAULT.
594
595 2004-08-06  Kenichi Handa  <handa@m17n.org>
596
597         * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
598         feature to apply.
599
600         * font-flt.c (run_otf): Print debugging information if necessary.
601
602 2004-08-05  Kenichi Handa  <handa@m17n.org>
603
604         * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff.  Support
605         positioning_type 5 and 6.  Switch simplified.
606
607 2004-08-04  Kenichi Handa  <handa@m17n.org>
608
609         * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
610
611 2004-08-02  Kenichi Handa  <handa@m17n.org>
612
613         * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
614         set val to 1 even if it is greater than 1.
615
616         * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
617
618 2004-07-29  Kenichi Handa  <handa@m17n.org>
619
620         * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
621         debugging information.
622
623         * internal.h (MDEBUG_PRINT5): New macro.
624
625         * draw.c (layout_glyphs): Don't combine a zero width glyph with
626         the previous one if the zero width glyph has left or right
627         padding.
628
629 2004-07-26  Kenichi Handa  <handa@m17n.org>
630
631         * m17n-X.c (xft_render): Pay attention to members left_padding and
632         right_padding of MGlyph.
633
634         * draw.c (visual_order): Allocate one more elements for arrays as
635         a workaround of fribidi bug.
636         (layout_glyphs): Fix previous change. Check MGlyph->combining_code
637         instead of MGlyph->bidi_sensitive.
638         (layout_glyph_string): Pay attentinon to
639         control->orientation_reversed when padding at the head or tail.
640         Fix adjustment of space glyph width.
641         (get_gstring): If cursor_width or cursor_bidi is changed, don't
642         use a cache.
643
644         * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
645         instead of MGlyph->bidi_sensitive.
646
647         * internal-gui.h (MGlyph): Delete member bidi_sensitive.
648
649 2004-07-26  Kenichi Handa  <handa@m17n.org>
650
651         * draw.c (visual_order): Don't treat combined glyphs specially.
652         (layout_glyphs): Don't get metrics glyphs that are already ready.
653         Pay attention to MGlyph->bidi_sensitive.  Combine a glyph of zero
654         width with the previous one. 
655         (draw_background): Fix bar cursor position on a r2l glyph.
656
657         * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
658         (run_rule): Fix place of updating cluster_begin_pos and
659         cluster_end_pos here.
660         (run_otf): Don't set left_padding.
661
662         * font-ft.c (adjust_anchor): Type of argument `code' changed.
663         Caller changed.
664         (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
665         Fix handling of GPOS.
666         (mfont__ft_drive_gpos): Delete this function.
667
668         * font.h (mfont__ft_drive_otf): Renamed back from
669         mfont__ft_drive_gsub.
670         (mfont__ft_drive_gpos): Delete extern.
671
672         * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
673         (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
674
675 2004-07-23  Kenichi Handa  <handa@m17n.org>
676
677         * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
678         the same bidi level.
679
680         * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
681
682 2004-07-22  Kenichi Handa  <handa@m17n.org>
683
684         * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
685
686 2004-07-20  Kenichi Handa  <handa@m17n.org>
687
688         * draw.c (render_glyphs): Fix checking of g->code validity.
689
690         * face.c (mface__realize): Set g.type.
691
692 2004-07-18  Kenichi Handa  <handa@m17n.org>
693
694         * Makefile.am: Prepend ${top_srcdir} to all *.la in
695         *_LIBADD/*_LDADD.
696
697         * m17n-gui.c (mframe): Print error message give by dlopen to
698         stderr.
699
700 2004-07-16  Kenichi Handa  <handa@m17n.org>
701
702         * draw.c (compose_glyph_string): Improve the way of deciding a
703         script.  For a character that doesn't have script property, use
704         the last non-latin script.
705
706         * font-ft.c (fc_list): Cancel previous change.
707         (mfont__ft_init): Add more entries in ft_to_prop_name.
708
709 2004-07-15  Kenichi Handa  <handa@m17n.org>
710
711         * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
712         previous or next character glyphs.
713
714 2004-07-14  Kenichi Handa  <handa@m17n.org>
715
716         * draw.c (compose_glyph_string): Be sure to set codes for glyphs
717         of type GLYPH_SPACE.
718
719         * fontset.c (mfont__lookup_fontset): If glyph type is
720         GLYPH_SPACE, get codes for SPACE.
721
722         * internal-gui.h (Mfont): Delete extern.
723
724         * m17n-gui.h (Mfont): Delete duplicated extern.
725
726 2004-07-13  Kenichi Handa  <handa@m17n.org>
727
728         * font-ft.c (DEVICE_DELTA): New macro.
729         (adjust_anchor): New function.
730         (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf.  Drive
731         only GSUB.
732         (mfont__ft_drive_gpos): New function.
733
734         * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
735         (FontLayoutContext): Delete member `rfont'.
736         (run_otf): Set g->otf_cmd.  Call 
737         (mfont__flt_run): Don't set ctx.rfont.  Call mfont__ft_decode_otf
738         only whne HAVE_OTF is defined.
739
740         * fontset.c: Include "config.h".
741
742         * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
743         (MGlyph): New member otf_cmd.
744
745         * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
746         (mfont__ft_drive_gpos): Extern it.
747
748         * face.c: Include "config.h".
749
750         * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
751
752         * input-gui.c: Include "config.h".
753
754         * plist.c: Include "config.h".
755
756 2004-07-06  Kenichi Handa  <handa@m17n.org>
757
758         * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
759         internal-gui.h: Cancel previous changes.
760
761         * m17n-gd.h: Delete it.
762
763         * Makefile.am (libm17n_core_la_LIBADD): New variable.
764         (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
765         @XML2_LD_FLAGS@ to above.
766         (libm17n_la_LIBADD): Add -ldl.
767         (libm17n_la_LDFLAGS): Add -export-dynamic.
768         (X_LD_FLAGS): Fix the order of linking.
769         (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
770         (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
771         (libm17n_X_la_LDFLAGS): Add -module.
772         (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
773         (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
774         (libm17n_gd_la_LDFLAGS): Add -module.
775         (include_HEADERS): Delete m17n-gd.h.
776
777 2004-06-30  Kenichi Handa  <handa@m17n.org>
778
779         * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
780         (MDeviceLibraryInterface): Delete it.
781         (register_device_library): Delete it.
782         (m17n__device_library_list): Renamed from device_library_list.
783
784         * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
785         (m17n_init_win): Adjust prototype.
786
787         * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
788         (m17n_init_gd): New function. 
789
790         * m17n-gd.h: New file.
791
792         * m17n-X.h: Include <m17n-gui.h>.
793         (m17n_init_X): Extern it.
794         (M17N_INIT): Redefine it.
795
796         * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
797         (m17n_init_X): New function.
798
799         * internal-gui.h (m17n__device_library_list): Extern it.
800         (struct MDeviceDriver): New members initialized, init, and fini.
801
802         * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
803         @XFT2_LD_FLAGS@.
804         (libm17n_X_la_LIBADD): Delete aboves.
805         (libm17n_gd_la_SOURCES): Add m17n-gd.h.
806         (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
807         (libm17n_gd_la_LDFLAGS): Delete it.
808         (include_HEADERS): Add m17n-gd.h.
809
810 2004-06-25  Kenichi Handa  <handa@m17n.org>
811
812         * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
813         (libm17n_gd_la_LDFLAGS): Cancel previous change.
814
815         * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
816
817         * font-ft.c (fc_list): If FcFontList finds no font, try
818         FcFontMatch.
819
820         * draw.c (compose_glyph_string): Terminate the last loop after
821         doing default combining if necessary.
822
823 2004-06-24  Kenichi Handa  <handa@m17n.org>
824
825         * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
826
827         * character.c (mchar_define_property): Add const to an arg.
828
829         * charset.c (mchar_define_charset): Add const to an arg.
830
831         * coding.c (MCodingSystem): Add const to an arg or decoder.
832         (finish_decoding): Add const to an arg.
833         (decode_coding_charset, decode_coding_utf_8)
834         (decode_coding_utf_16, decode_coding_utf_32)
835         (decode_coding_iso_2022, decode_coding_sjis)
836         (mconv_define_coding): Likewise.
837
838         * m17n-X.c (xft_find_metric): Delete unused variable.
839
840         * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
841         prototypes.
842
843         * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
844         prototypes.
845
846         * mtext.c (count_utf_8_chars, count_utf_16_chars)
847         (mtext__from_data, mtext_from_data): Add `const' to an arg.
848
849         * mtext.h (mtext__from_data): Ajust prototype.
850
851 2004-06-23  Kenichi Handa  <handa@m17n.org>
852
853         * draw.c (compose_glyph_string): Always get glyph codes by
854         mface__for_char.
855         (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
856         (mdraw_glyph_list): New function.
857
858         * font-flt.c (mfont__flt_run): Be sure to call
859         rfont->driver->encode_char.
860
861         * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
862         (ft_encode_char): Delete arg C.
863         (ft_render): Don't call FT_Get_Char_Index.
864
865         * font.c (mfont__encodable_p): Delete it.
866         (mfont__encode_char): Be sure to call rfont->driver->encode_char.
867
868         * font.h (struct MFontDriver): Delete arg C of encode_char.
869         (mfont__encodable_p): Delete extern.
870
871         * m17n-X.c (xfont_encode_char): Delete arg C.
872         (xft_find_metric): Don't cal FT_Get_Char_Index.
873         (xft_render): Likewise.
874
875         * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
876         logical_width.
877         (mdraw_glyph_list): Extern it.
878
879         * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
880
881 2004-06-22  Kenichi Handa  <handa@m17n.org>
882
883         * m17n-gui.h (mfontset_lookup): Extern it.
884
885         * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
886
887         * fontset.c (realize_fontset_elements)
888         (free_realized_fontset_elements, update_fontset_elements): New
889         functions.
890         (mfont__realize_fontset): Call realize_fontset_elements.
891         (mfont__free_realized_fontset): Call free_realized_fontset_elements.
892         (mfont__lookup_fontset): If a fontset was modified, update
893         the realized fontset.
894         (mfontset_modify_entry): Increment fontset->tick.
895         (mfontset_lookup): New function.
896
897 2004-06-21  Kenichi Handa  <handa@m17n.org>
898
899         * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
900
901         * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
902         (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
903         length of source text 0.
904
905 2004-06-21  Kenichi Handa  <handa@m17n.org>
906
907         * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
908         (compare): Pay attention to format other than utf-8.
909         (copy): Delete this function.
910         (count_by_utf_8, count_by_utf_16, insert): New functions.
911         (count_utf_16_chars): Fix handling of a surrogate pair.
912         (find_char_forward, find_char_backward): Likewise.
913         (mtext__from_data): Delete unnecessary check.  Fix number of
914         allocated bytes.
915         (mtext_from_data): Don't count items.
916         (mtext_ref_char): Optimize the code.
917         (mtext_set_char): Pay attention to format other than utf-8.
918         (mtext_cat_char): Likewise.
919         (mtext_dup): Don't call copy, instead do allocation here.
920         (mtext_cat): Call insert instead of copy.
921         (mtext_ncat): Likewise.
922         (mtext_cpy): Delete character at first and call insert instead of
923         copy.
924         (mtext_ncpy): Likewise.
925         (mtext_copy): Likewise.
926         (mtext_duplicate): Call insert instead of copy.
927         (mtext_del): Pay attention to format other than utf-8.
928         (mtext_ins): Simply call insert.
929         (mtext_ins_char): Pay attention to format other than utf-8.
930         (mtext_tok): Call insert instead of copy.
931         (mtext_text): Call UNIT_BYTES.
932
933         * textprop.c (mtext__adjust_plist_for_change): New function.
934
935         * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
936         (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
937         (CHAR_UNITS_AT): Fix typo.
938         (CHAR_UNITS_BY_HEAD): Fix typo.
939         (STRING_CHAR_AND_UNITS): Fix typo.
940
941         * internal.h (MTEXT_READ_ONLY_P): New macro. 
942
943         * mtext.h (mtext__replace): Delete the extern.
944         (mtext__adjust_foramt): Adjust prototype.
945
946         * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
947         if possible.  Otherwise make a copy of mmt.
948
949         * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
950         utf-8.
951
952 2004-06-18  Kenichi Handa  <handa@m17n.org>
953
954         * character.h (CHAR_STRING_UTF16): Fix syntax.
955
956 2004-06-16  Kenichi Handa  <handa@m17n.org>
957
958         * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
959         (libm17n_X_la_LIBADD): Delete it.
960         (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
961
962         * m17n-X.c (device_open): Add parens in `if' condition.
963
964         * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
965         (DEC_POSITION): Likewise.
966         (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
967
968 2004-06-15  Kenichi Handa  <handa@m17n.org>
969
970         * fontset.c (mfont__lookup_fontset): Fix selection of font groups
971         by language.
972
973         * draw.c (compose_glyph_string): If langauge is specified, call
974         mface__for_chars even if a text is all latin.  Fix condition for
975         setting non_ascii_found.
976
977         * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
978
979         * m17n.h (minput_char_to_key): Delete extern.
980
981         * m17n-gui.h (minput_event_to_key): Cancel previous change.
982
983         * m17n-gui.c (null_device_open): Set several members of frame.
984
985 2004-06-14  Kenichi Handa  <handa@m17n.org>
986
987         * m17n-gui.h (minput_event_to_key): Delete extern.
988
989         * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
990
991         * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
992
993         * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
994
995 2004-06-08  Kenichi Handa  <handa@m17n.org>
996
997         * character.c (mchar_put_prop): Don't increment the ref-count of
998         record->table.
999
1000 2004-06-04  Kenichi Handa  <handa@m17n.org>
1001
1002         * m17n-core.c (mdebug__register_object): New function.
1003         (mdebug__unregister_object): Likewise.
1004
1005         * internal.h (mdebug__register_object, mdebug__unregister_object):
1006         Extern them.
1007         (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
1008         respectively.
1009
1010         * charset.c (mcharset__load_from_database): Don't call
1011         mconv__register_charset_coding here.
1012
1013         * coding.c (find_coding): Get a real name from an element of
1014         coding_definition_list.
1015         (mconv__register_charset_coding): Set the real name at the top of
1016         param.
1017         (mcoding__load_from_database): Likewise.
1018         (mconv_list_codings): Adjusted for the above change.
1019
1020 2004-06-03  Kenichi Handa  <handa@m17n.org>
1021
1022         * coding.c (find_coding): Find by canonicalized name.  Don't have
1023         to modify the element of coding_definition_list by
1024         mplist__from_plist.
1025         (mconv__define_coding_from_charset): Delete it.
1026         (mconv__register_charset_coding): Canonicalize sym.
1027         (mcoding__load_from_database): Register plist modified by
1028         mplist__from_plist.
1029
1030         * coding.h (mconv__define_coding_from_charset): Don't extern it.
1031
1032         * font-ft.c (ft_open): Fix setting of rfont->descent.
1033
1034 2004-06-02  Kenichi Handa  <handa@m17n.org>
1035
1036         * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
1037         (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
1038         (xlfd_unparse_name): Renamed from xfont_build_name.
1039         (mfont__init): Initialized Mfontconfig.
1040         (mfont__free_realized): Unconditionally unref rfont->info.
1041         (mfont__select): Free `this' if it's not best.
1042         (mfont__open): Don't check frame->realized_font_list.
1043         (mfont__parse_name_into_font): New function.
1044         (Mfontconfig): New variable.
1045         (mfont_from_name): Call mfont_parse_name.
1046         (mfont_name): Call mfont_unparse_name.
1047         (mdebug_dump_font): Likewise.
1048
1049         * font.h (struct MFontDriver): Delete members parse_name and
1050         build_name.
1051         (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
1052         (mfont__parse_name_into_font): Extern it.
1053
1054         * font-ft.c: Include "symbol.h".
1055         (close_ft): Unconditionally free filename and charmap_list of
1056         ft_into.
1057         (ft_open): Duplicate base->filename.  Increment ref-count of
1058         ft_info->charmap_list.  Free ft_info->charmap_list and
1059         ft_info->filename on error.
1060         (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
1061
1062         * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
1063         xfont_build_name.
1064         (enum xlfd_field_idx): Moved to font.c.
1065         (split_font_name, build_font_name): Likewise.
1066         (build_font_list): Call mfont__parse_name_info_font.
1067         (xfont_open): Call mfont__unparse_name.  Free name.
1068         (xfont_parse_name, xfont_build_name): Moved to font.c
1069         (xft_select): Prototype deleted.
1070         (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
1071         Call mfont_pase_name.
1072
1073         * m17n-gui.c (free_frame): Unref frame->font_driver_list.
1074         (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
1075         (mframe): Likewise.
1076
1077         * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
1078         Extern them.
1079
1080         * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
1081
1082 2004-06-01  Kenichi Handa  <handa@m17n.org>
1083
1084         * fontset.c (mfontset_modify_entry): Pay attention to the case
1085         that fontset->font_spec_list is NULL.
1086
1087 2004-05-31  Kenichi Handa  <handa@m17n.org>
1088
1089         * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
1090
1091         * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
1092
1093         * font.c (mfont__select): Print score the a font for debugging.
1094
1095         * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
1096
1097         * coding.c (reset_coding_sjis): Check kanji and kana instead of
1098         kanji_sym and kana_sym.
1099
1100 2004-05-28  Kenichi Handa  <handa@m17n.org>
1101
1102         * Makefile.am (VINFO): New variable.
1103         (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
1104         (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
1105
1106 2004-05-27  Kenichi Handa  <handa@m17n.org>
1107
1108         The following chanages are to make device dependent functions
1109         accessible only from MDeviceDriver structure, and to add GD and
1110         null device drivers.  Font drivers get also device dependent.
1111
1112         * m17n.c (m17n_init): Increament shell_initialized.
1113         (m17n_fini): Decremented shell_initialized.
1114
1115         * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
1116
1117         * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
1118         (Mwidget, Mcolormap, Mx): Extern them.
1119
1120         * m17n-gui.c: Include <dlfcn.h> and "config.h".
1121         (free_frame): Call frame->driver->close instead of
1122         mwin__close_device.
1123         (DLOPEN_SHLIB_EXT): New macro.
1124         (MDeviceLibraryInterface): New type.
1125         (device_library_list): New variable.
1126         (register_device_library): New function.
1127         (null_device): New variable.
1128         (null_device_close, null_device_get_prop)
1129         (null_device_realize_face, null_device_free_realized_face): New
1130         function.
1131         (null_driver): New variable.
1132         (null_device_init, null_device_fini, null_device_open): New
1133         functions.
1134         (null_interface): New variable.
1135         (Mfreetype, Mdevice): Declare them.
1136         (m17n_init_win): Increment win_initialized.  Initialize Mx, Mgd,
1137         Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
1138         Mwin__Close_Device.  Register drivers for Mx and Mgd.
1139         (m17n_fini_win): Decremented win_initialized.  Call "fini"
1140         function of all opened devices.  Don't call mwin__fini.
1141         (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
1142         Declare them here.
1143         (mframe): Handle Mdevice key of PLIST.
1144         (mframe_get_prop): Call frame->device->get_prop instead of
1145         mwin__device_get_prop.
1146
1147         * m17n-gd.c: New file.
1148
1149         * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
1150         (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
1151
1152         * m17n-core.c (m17n_init_core): Increate core_initialized.
1153         (m17n_fini_core): Decremented core_initialized.
1154
1155         * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
1156         (Mcolormap): Don't extern them here.
1157
1158         * m17n-X.c (FRAME_DEVICE): New macro.
1159         (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
1160         (free_display_info): Use MPLIST_DO.
1161         (free_device): Free rface->info.
1162         (xft_close): Delete it.
1163         (device_init): Renamed from mwin__init.
1164         (device_fini): Renamed from mwin__fini.
1165         (device_open): Renamed from mwin__open_device.
1166         (x_driver): New variable.
1167         (MXFontInfo): Delete member frame, add member display.
1168         (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
1169         Don't declare them here.
1170
1171         * internal-gui.h (MDeviceType): New enum.
1172         (MWDefice): Delete it.
1173         (struct MFrame): Change type of device to void *.  New members
1174         device_type, driver, font_driver_list.
1175         (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
1176         (MDeviceDriver): New type.
1177         (Mx, Mgd, Mfreetype): Extern them.
1178         (mwin__XXX): Delete all of them.
1179
1180         * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
1181         mwin__XXX.
1182         (win_destroy_ic): Likewise.
1183         (adjust_window_and_draw): Likewise.
1184         (win_callback): Likewise.
1185         (Mxim): Declare it here.
1186         (minput_event_to_key): Call M_CHECK_READABLE.
1187
1188         * fontset.c (mfont__lookup_fontset): Delete local variable
1189         font_group.
1190
1191         * font.h (struct MFontDriver): Delete member close, add members
1192         parse_name and build_name.
1193         (mfont__driver_list): Delete extern.
1194         (mfont__close): Delete extern.
1195
1196         * font.c (mfont__init): Don't set mfont__driver_list.
1197         (mfont__fini): Don't unref mfont__driver_list.
1198         (mfont__select): Try font drivers in frame->font_driver_list.  Set
1199         driver member of a realized font.
1200         (mfont__close): Delete it.
1201         (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
1202         functions of the default frame.
1203
1204         * font-ft.c (close_ft): Check ft_info->ft_face and work
1205         differently.
1206         (add_font_info): Allocate ft_info by M17N_OBJECT.
1207         (ft_close): Delete it.
1208         (mfont__ft_driver): Don't set ft_close.
1209         (ft_select): Increment ref-count of best_font.
1210         (ft_open): Decremented ref-count of base.  On error, call
1211         FT_Done_Face and free ft_info.
1212         (ft_find_metric): Always use XXX_MONO in load_flags.
1213         (ft_render): Fix setting of width.  Call
1214         frame->driver->draw_points instead of mwin__draw_points.
1215         (ft_to_prop): Don't set mfont__driver_list.
1216         (mfont__ft_fini): Just unref ft_info.
1217
1218         * face.c (mface__init): Exchange foreground and background of
1219         mface__default.  Call mface_put_prop to set hline of
1220         mface_underline,
1221         (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
1222         (mface__free_realized): Don't call mwin__free_realized_face.
1223
1224         * draw.c (Mdepth): Don't declare it here.
1225         (draw_background): Call frame->driver->XXX instead of mwin__XXX.
1226         (render_glyphs, render_glyph_string): Likewise.
1227         (mdraw__init): Don't set Mdepth.
1228         (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
1229         M_CHECK_WRITABLE.
1230         (mdraw_text_per_char_extents): Return 0 on success and -1 on
1231         error.
1232         (mdraw_text_items): Check FRAME is writable.
1233         (mdraw_per_char_extents): Implement body.
1234
1235         * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
1236         libm17n-gd.la.
1237         (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
1238         (GUI_SOURCES): Delete it.
1239         (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
1240         (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
1241         (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
1242         (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
1243         (linkgui_LDADD): Set to libm17n-gui.la
1244         (linkgui_LDFLAGS): New target.
1245         (SRC): Include ${libm17n_gui_la_SOURCES} and
1246         ${libm17n_gd_la_SOURCES}.
1247
1248 2004-05-24  Kenichi Handa  <handa@m17n.org>
1249
1250         * draw.c (draw_background): Don't draw background even if
1251         rface->face.property[MFACE_BACKGROUND] is not Mnil.
1252
1253 2004-05-22  Kenichi Handa  <handa@m17n.org>
1254
1255         * m17n-X.c (xft_open_font): Fix anti_alias setting.
1256
1257 2004-05-20  Kenichi Handa  <handa@m17n.org>
1258
1259         * m17n-gui.h (MFaceHookFunc): Change this function type to void.
1260
1261         * m17n-gui.c: Include "plist.h".
1262         (mframe): If PLIST is NULL, initialize it to emply plist.
1263
1264         * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
1265         (xft_driver): New variable.
1266         (xft_select, close_xft, xft_open_font, xft_open, xft_close)
1267         (xft_find_metric, xft_render): New function.
1268         (mwin__init): Adjusted for the new mfont__driver_list.
1269         (mwin__open_device): Assume arg PARAM is not NULL.  Push a newly
1270         generated face to PARAM.
1271         (mwin__realize_face): Fix setting of box colors.  Don't call hook
1272         function here.
1273         (mwin__draw_hline): New function.
1274         (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
1275         (mwin__xft_render): Delete these function.
1276
1277         * internal-gui.h (struct MFrame): New member tick.
1278         (struct MGlyphString): New member tick.
1279         (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
1280         (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
1281         (mwin__xft_render): Delete extern.
1282
1283         * fontset.c (mfont__lookup_fontset): Make the code simpler.
1284         (mfontset): Always increment the reference count of returned
1285         object.
1286
1287         * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
1288         (MFTInfo): Moved to font.h.
1289         (ft_iso8859_1_font_list): Delete this variable.
1290         (set_font_info): Don't set font->property[MFONT_TYPE].
1291         (set_font_info): Don't udpate ft_iso8859_1_font_list.
1292         (add_font_info): Change type to void.
1293         (fc_list): Change anme from xft_list.  Caller changed.  Include
1294         FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
1295         (mfont__ft_driver): Change name from ft_driver.  Caller changed.
1296         (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
1297         (close_ft): Don't call mwin__xft_close.  Unref
1298         ft_info->extra_info.
1299         (ft_open): Don't setup ft_info->fontname.  Don't call
1300         mwin__xft_open.
1301         (ft_find_metric): Don't call mwin__xft_get_metric.
1302         (ft_encode_char): Call rfont->driver->open instead of ft_open.
1303         (ft_render): Don't check HAVE_XFT2.  Don't call mwin__xft_render.
1304         (mfont__ft_init): Adjusted for new mfont__driver_list.
1305         (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
1306
1307         * font.c (mfont__driver_list): Make it MPlist.
1308         (mfont__init): Adjust initialization of mfont__driver_list.
1309         (mfont__fini): Free mfont__driver_list.
1310         (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
1311         (mfont__select): Adjusted for the new mfont__driver_list.
1312
1313         * font.h (enum MFontProperty): Delete MFONT_TYPE.
1314         (mfont__drirver_list): Adjust prototype.
1315         (MFTInfo): Move to here from fron.c.  Deleve member fontname.
1316
1317         * face.h (struct MFace): Delete member realized_face_list, add
1318         member frame_list.
1319         (struct MRealizedFace): Delete member need_update
1320         andnofont_rface, add member non_ascii_list.
1321         (mface__update_frame_face): Extern it.
1322
1323         * face.c (hline_prop_list, box_prop_list, noop_hook): New
1324         variables.
1325         (get_hline_create, get_box_create): New functions.
1326         (find_realized_face): Cancel previous change.  Arg RFONT deleted.
1327         Use memcmp.
1328         (free_face): Cancep previous change.  Free face->frame_list.
1329         (serialize_hline): Do nothing if hline->width is zero.
1330         (serialize_box): Do nothing if box->width is zero.
1331         (mface__init): Setup all properties of mface__default.
1332         (mface__fini): Free hline_prop_list and box_prop_list.
1333         (mface__realize): Cancel previous change.  Update
1334         face->frame_list.  Setup rface->non_ascii_list.
1335         (mface__for_chars): Update rface->non_ascii_list.
1336         (mface__free_realized): Free rface->non_ascii_list.
1337         (mface__update_frame_face): New function.
1338         (mface): Initialize face->frame_list.
1339         (mface_copy): Likewise.  Just copy MFACE_HLINE and MFACE_BOX
1340         properties.
1341         (mface_merge): Likewise.
1342         (mface_put_prop): If key is Mhline or Mbox, get value by
1343         get_hline_create or get_box_create respectively.
1344         (mface_put_prop): Update frame->tick and call
1345         mface__update_frame_face if necessary.
1346         (mface_update): Do nothing if func is noop_hook.
1347
1348         * draw.c (render_glyphs): If a font is not found, use
1349         mwin__draw_empty_boxes.
1350         (alloc_gstring): Initialize gstring->tick.
1351         (get_gstring): Check gstring->tick.
1352
1353 2004-05-17  Kenichi Handa  <handa@m17n.org>
1354
1355         * face.c (find_realized_face): Return value changed.  If RFONT is
1356         NULL, avoid unnecessary checking.
1357         (free_face): Free face->realized_face_list.
1358         (mface__realize): Adjusted for the change of find_realized_face.
1359         If it returns a realized face that needs update, free it and
1360         realize a new one.  Push a new realized face to
1361         frame->realized_face_list instead of appending.
1362         (mface__for_chars): Adjusted for the change of find_realized_face.
1363         Short cut if the required font is in rface->ascii_rface.
1364         (mface_put_prop): Free old value if necessary.  Set need_update
1365         member of realized faces to 1.
1366
1367         * face.h (struct MFace): Delete member tick, add member
1368         realized_face_list.
1369         (struct MRealizedFace): Delete member tick, add member
1370         need_update.
1371
1372 2004-05-13  Kenichi Handa  <handa@m17n.org>
1373
1374         * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
1375
1376 2004-05-12  Kenichi Handa  <handa@m17n.org>
1377
1378         * internal-gui.h (mwin__xft_open): Arguemnt name changed.
1379
1380         * m17n-X.c (mwin__xft_open): Argument changed to fontname and
1381         parse it XftNameParse.
1382
1383         * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
1384         (all_fonts_scaned): New variable.
1385         (set_font_info): FAMILY may be Mnil.
1386         (add_font_info): Argument changed.
1387         (xft_list): Call add_font_info in it.
1388         (ft_list): Likewise.
1389         (ft_select): Make it work in the case family is Mnil.
1390         (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
1391         (mfont__ft_fini): Set all_fonts_scaned to 0.
1392
1393         * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
1394         that is failed to open.
1395
1396 2004-05-10  Kenichi Handa  <handa@m17n.org>
1397
1398         * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
1399         device's depth is 1 (i.e. monochrome).
1400
1401         * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
1402         to work around the problem of libtool.
1403
1404         * font-ft.c: Include <freetype/ftbdf.h>.
1405         (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
1406         variables.
1407         (mfont__ft_init): Initialize them.
1408         (ft_iso8859_1_font_list): New variable.
1409         (set_font_info): Detect a font containing iso8859-1 glyphs and
1410         register it in ft_iso8859_1_font_list.  If the font is not
1411         scalable, assume it as BDF or PCF font and setup SIZE and RESY
1412         properties of the font from its properties.
1413         (add_font_list): If the font is not scalable, check if it is BDF
1414         or PCF font.  If not, ignore it.
1415         (ft_select): If FAMILY is Mnil, return NULL only if the requested
1416         registry is not iso8859-1.
1417         (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
1418         ft_iso8859_1_font_list.
1419         (ft_find_metric): If the font is not scalable, assume it as BDF
1420         or PCF, and get a metric from its properties.
1421         (mfont__ft_fini): Free ft_iso8859_1_font_list.
1422
1423 2004-05-07  Kenichi Handa  <handa@redhat.m17n.org>
1424
1425         * Makefile.am (libm17n_la_LIBADD): Include -ldl.
1426         (libm17n_la_LDFLAGS): Delete it.
1427         (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
1428         (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
1429
1430 2004-05-06  Kenichi Handa  <handa@m17n.org>
1431
1432         * draw.c (compose_glyph_string): Fix previous change.
1433
1434 2004-04-30  Kenichi Handa  <handa@m17n.org>
1435
1436         * font-ft.c (ft_list): Delete unused variable `result'.
1437         (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
1438
1439 2004-04-27  Kenichi Handa  <handa@m17n.org>
1440
1441         * m17n-X.c: Include config.h
1442         [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
1443         (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
1444         (MWDevice) [HAVE_XFT2]: New member xft_draw.
1445         (FRAME_CMAP, FRAME_VISUAL): New macros.
1446         (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
1447         (xfont_driver): Make it static.
1448         (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
1449         (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
1450         info->xft_color_back.
1451         (MXftFontInfo) [HAVE_XFT2]: New type.
1452         (mwin__xft_close) [HAVE_XFT2]: New function.
1453         (mwin__xft_open) [HAVE_XFT2]: New function.
1454         (mwin__xft_get_metric) [HAVE_XFT2]: New function.
1455         (mwin__xft_render) [HAVE_XFT2]: New function.
1456
1457         * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
1458         (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
1459         (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
1460         externs.
1461
1462         * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
1463
1464         * font-ft.c: Don't include FT_FREETYPE_H here.
1465         [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
1466         (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
1467         (MFTInfo): New member charmap_index.
1468         (MFTInfo) [HAVE_XFT2]: New member xft_info.
1469         (check_otf_filename): Renamed from check_filename.  Return value
1470         changed.
1471         (ft_set_property): This function deleted.
1472         (set_font_info): New function.
1473         (add_font_list): Argument changed.  Add multiple fonts.
1474         (xft_list) [HAVE_XFT2]: New function.
1475         (ft_list) [not HAVE_XFT2]: New function.
1476         (ft_select): Add code for Xft.
1477         (close_ft): Likewise.
1478         (ft_open): Likewise.
1479         (ft_find_metric): Likewise.
1480         (ft_encode_char): Likewise.
1481         (ft_render): Likewise.
1482
1483         * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
1484
1485 2004-04-26  Kenichi Handa  <handa@m17n.org>
1486
1487         * textprop.c (mtext_attach_property): Declare the return type as
1488         `int'.
1489
1490 2004-04-21  Kenichi Handa  <handa@m17n.org>
1491
1492         * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
1493
1494 2004-04-09  Kenichi Handa  <handa@m17n.org>
1495
1496         * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
1497         seq_to.
1498         (load_command): Setup above members.
1499
1500 2004-04-05  Kenichi Handa  <handa@m17n.org>
1501
1502         * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
1503
1504 2004-03-30  Kenichi Handa  <handa@m17n.org>
1505
1506         * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
1507         >= 0x10000.
1508
1509         * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
1510         (M17NLIB_VERSION_NAME): Changed to 1.0.2.
1511
1512 2004-03-29  Kenichi Handa  <handa@m17n.org>
1513
1514         * Version 1.0 Patch Level 2 released.
1515
1516 2004-03-29  Kenichi Handa  <handa@m17n.org>
1517
1518         * charset.c (make_charset): Set charset->fully_loaded and
1519         charset->simple correctly.  Don't try to get charset->min_char and
1520         charset->max_char for a charset of method subset and superset.
1521         Don't load a mapping file here.
1522         (mcharset__init): Set unified_max.
1523         (mcharset__load_from_database): Free a working plist.
1524
1525         * coding.c (mcoding__fini): Free all malloced data.
1526
1527         * input-gui.c (win_create_ic): Set control.as_image for preediting
1528         to 0.
1529
1530         * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
1531         `count') to initialize the array.
1532
1533         * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
1534         M17N_OBJECT_UNREF.
1535
1536         * m17n-X.c (xfont_render): If rface->rfont is null, draw a
1537         rectangle.
1538         (mwin__create_window): Fix bug of setting a background pixel of a
1539         new window.
1540         (mwin__adjust_window): Clear the window before drawing.
1541
1542         * m17n-core.c (mdebug__report_object): Free array->objectes if
1543         necessary.
1544         (m17n_init_core): Don't set report_header_printed to 0 here.
1545         Fix debugging information.
1546         (m17n_fini_core): Set report_header_printed to 0 here.
1547
1548         * m17n-core.h (mplist_deserialize): Extern it.
1549
1550         * m17n-gui.c (m17n_fini_win): Fix debugging information.
1551
1552         * m17n.c (m17n_fini): Fix debugging information.
1553
1554         * mtext.c (mtext__adjust_foramt): New function.
1555
1556         * mtext.h (mtext__adjust_foramt): Extern it.
1557
1558         * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
1559
1560         * plist.h (mplist__deserialize): Don't extern it.
1561
1562         * symbol.c (msymbol__fini): Set freed_symbols to 0.  Set all
1563         elements of symbol_table to NULL.  Report about created and freed
1564         symbols if MDEBUG_FINI is set.
1565
1566 2004-03-22  Kenichi Handa  <handa@m17n.org>
1567
1568         * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
1569
1570         * m17n.c (m17n_init): Fix the way of checking merror_code.
1571
1572         * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
1573
1574 2004-03-22  Kenichi Handa  <handa@m17n.org>
1575
1576         * fontset.c (realize_font_group): Adjust the font size by
1577         mfont__resize before selecting a font.
1578
1579         * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
1580
1581 2004-03-19  Kenichi Handa  <handa@m17n.org>
1582
1583         * Version 1.0 Patch Level 1 released.
1584
1585 2004-03-19  Kenichi Handa  <handa@m17n.org>
1586
1587         * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
1588
1589         * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
1590
1591 2004-03-19  Kenichi Handa  <handa@m17n.org>
1592
1593         Re-apply the changes forgotten in the released version.
1594
1595         * charset.c (mcharset__load_from_database): Call
1596         mchar_define_charset.
1597
1598         * coding.c (encode_unsupporeted_char): Put Mcoding text property.
1599         (mconv_encode_range): Put Mcoding text property.
1600
1601 2004-03-18  Kenichi Handa  <handa@m17n.org>
1602
1603         * draw.c (Mdepth): New variable.
1604         (visual_order): Delete unused local var `pos'.
1605         (compose_glyph_string): Fix for the case that gstring->glyphs is
1606         realloced.  Stop generating glyphs at TO.  Fix handling of
1607         control charaters.
1608         (layout_glyphs): Get metrics of all glyphs in advance.  Set
1609         lbearing and rbearing of base of composition glyph correctly.
1610         Handle left-overhang glyphs correctly.
1611         (alloc_gstring): New arg frame.  Set gstring->anti_alias.  Caller
1612         changed.
1613         (dump_combining_code): Change the defualt off_x character to ".".
1614         (mdraw__init): Initialize Mdepth.
1615
1616         * face.c (work_gstring): New variable
1617         (mface__init): Initialize work_gstring.
1618         (mface__fini): Free work_gstring.glyphs.
1619         (mface__realize): Don't handle videomode property here.  Adjusted
1620         for the change of mfont__get_metric.
1621         (mface__for_chars): Adjusted for the change of mfont__get_metric.
1622
1623         * face.h (enum face_gc): Moved to m17n-X.c.
1624
1625         * font.h (struct MFontDriver): Arguments of find_metric changed.
1626         (mfont__select): Prototype adjusted.
1627         (mfont__get_metric): Likewise.
1628         (mfont__ft_drive_otf): Likewise.
1629         (mfont__flt_run): Likewise.
1630         
1631         * font.c (mfont__select): New argument layouter.  If layouter is
1632         different in the registered font, make a new copy of realized
1633         font.
1634         (mfont__get_metric): Argument changed.  Get metrics of multiple
1635         glyphs.
1636         (mfont_find): Call mfont__select with layouter as Mnil.
1637
1638         * font-flt.c (FontLayoutContext): New member rfont.
1639         (run_otf): Adjusted for the change of mfont__ft_drive_otf.
1640         (mfont__flt_run): Argument changed.  Initialize ctx.rfont.
1641
1642         * font-ft.c (ft_find_metric): Arguments changed.  Get metrics of
1643         multiple glyphs.
1644         (NUM_POINTS): New macro.
1645         (MPointTable): New type.
1646         (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
1647         (mfont__ft_drive_otf): New argument rfont.
1648
1649         * fontset.c (realize_font_group): Adjusted for the changed of
1650         mfont__select.
1651         (check_fontset_element): This function deleted.
1652
1653         * input-gui.c (adjust_window_and_draw): Locate a preedit window
1654         off the parent window if the preedit text is zero length.
1655
1656         * internal-gui.h (struct MFrame): New members foreground,
1657         background, videomode, font.
1658         (struct MGlyphString): New member anti_alias.
1659         (MDrawPoint): New type.
1660         (mwin__draw_bitmap): Prototype deleted.
1661         (mwin__draw_points): Prototype added.
1662
1663         * m17n-gui.h (MDrawControl): New member anti_alias.
1664
1665         * m17n-gui.c (free_frame): Free frame->font.
1666         (mframe): Set the fontset of frame->face to the default fontset.
1667
1668         * m17n-X.c (RGB_GC): New type.
1669         (enum gc_index): Renamed from enum face_gc.  Member names changed.
1670         (GCInfo): New typel
1671         (struct MWDevice): Members foreground and background deleted.  New
1672         member scratch_gc, gc_list.
1673         (DEFAULT_FONT, FALLBACK_FONT): New macros.
1674         (free_device): Free GCs in device->gc_list.
1675         (get_rgb_gc): New function.
1676         (get_gc): Renamed and argument changed from get_color.
1677         (get_gc_for_anti_alias): New function.
1678         (xfont_find_metric): Arguments changed.  Get metrics of multiple
1679         glyphs.
1680         (set_region): Argument changed.  Caller changed.
1681         (xfont_render): Allways set a font in gc.
1682         (x_error_handler, x_io_error_handler): Define only if
1683         X_SET_ERROR_HANDLER is defined.
1684         (mwin__open_device): Create device->scratch_gc.  Set members
1685         foreground, background, and videomode of frame.  Call
1686         XSetErrorHandler and XSetIOErrorHandler only if
1687         X_SET_ERROR_HANDLER is defined.
1688         (struct gc_list): Deleted.
1689         (REGISTER_GC, UNREGISTER_GC): These macros deleted.
1690         (mwin__realize_face): Adjusted for the change of the format of
1691         rface->info and the charge of set_region.
1692         (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
1693         (mwin__draw_box): Likewise.
1694         (mwin__draw_bitmap): This function deleted.
1695         (mwin__draw_points): New function.
1696         (mwin__verify_region): Adjusted for the change of the format of
1697         rface->info and the charge of set_region.
1698         (mwin__create_window): Inherit backgound pixel from parent.
1699         (mwin__dump_gc): Adjusted for the change of the format of
1700         rface->info.
1701
1702 2004-03-16  Kenichi Handa  <handa@m17n.org>
1703
1704         * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
1705
1706         * input.c (M_key_alias): New variable.
1707         (handle_key): Try M_key_alias property of a key too.
1708         (minput__init): Initialize M_key_alias.  Give that property to
1709         symbols in one_char_symbol.  Fix bug of initializing
1710         one_char_symbol.
1711
1712         * draw.c (compose_glyph_string): Don't handle
1713         ignore_formatting_char here.  Include formatting characters in the
1714         range processed by a FTL.
1715         (layout_glyph_string): Handle ignore_formatting_char here.
1716
1717 2004-03-12  Kenichi Handa  <handa@m17n.org>
1718
1719         * input-gui.c (win_create_ic): Enable bidi in status control.
1720
1721         * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
1722
1723 2004-03-09  Kenichi Handa  <handa@m17n.org>
1724
1725         * input.c (load_input_method): If title is not specified, use the
1726         input method name as title.
1727
1728         * m17n-X.c (get_color): Make it static.
1729         (xim_create_ic, xim_destroy_ic, x_error_handler)
1730         (x_io_error_handler): Likewise.
1731
1732 2004-03-01  Kenichi Handa  <handa@m17n.org>
1733
1734         * Version 1.0 released.
1735
1736 \f
1737 Copyright (C) 2003, 2004
1738   National Institute of Advanced Industrial Science and Technology (AIST)
1739   Registration Number H15PRO112
1740
1741 This file is part of the m17n library.
1742
1743 The m17n library is free software; you can redistribute it and/or
1744 modify it under the terms of the GNU Lesser General Public License
1745 as published by the Free Software Foundation; either version 2.1 of
1746 the License, or (at your option) any later version.
1747
1748 The m17n library is distributed in the hope that it will be useful,
1749 but WITHOUT ANY WARRANTY; without even the implied warranty of
1750 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
1751 Lesser General Public License for more details.
1752
1753 You should have received a copy of the GNU Lesser General Public
1754 License along with the m17n library; if not, write to the Free
1755 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1756 02111-1307, USA.