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