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