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