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