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