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