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