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