1 2005-11-21 Kenichi Handa <handa@m17n.org>
3 * Makefile.am (lib_LTLIBRARIES): Define it conditionaly on
6 * fontset.c (fontset_table): New variable.
7 (free_fontset): Call M17N_OBJECT_UNREGISTER.
8 (mfont__fontset_init): Add fontset_table as an object array.
9 (mfont__realize_fontset): Ref FONTSET.
10 (mfont__free_realized_fontset): Unref REALIZED->fontset.
11 (mfontset): Call M17N_OBJECT_REGISTER.
12 (mfontset_copy): Likewise.
14 * input.c (handle_key): For debugging, print information about
16 (filter): Add an alias for Meta and Alt modifiers.
17 (Mcond, Mplus, Mminus, Mstar, Mslush, Mand, Mor, Mnot): New
19 (minput__init): Initialize them.
20 (parse_expression): New function.
21 (resolve_expression): New function.
22 (parse_action_list): Handle expressions by parse_expression.
23 (take_action_list): Handle expressions by resolve_expression.
24 (parse_nested_list_value): Fix previous change.
25 (resolve_command): Fix handling of the return value of
28 2005-11-18 Kenichi Handa <handa@m17n.org>
30 * font-ft.c (ft_check_otf, otf_script_list): Define only when
32 (ft_list_capability): Call ft_check_otf only when HAVE_OTF is
34 (ft_select): Likewise.
36 * font.c (mfont_list): Fix for the case that FONT is NULL.
38 (load_otf_script_list): Define only when HAVE_OTF is defined.
39 (mfont__fini): Unref otf_script_list only when HAVE_OTF is
42 * draw.c (truncate_gstring): Be sure to truncate at
43 glapheme-cluster boundary.
45 2005-11-11 Kenichi Handa <handa@m17n.org>
47 * input.c (delete_surrounding_text): Clear cache if necessary.
49 2005-11-09 Kenichi Handa <handa@m17n.org>
51 * draw.c (compose_glyph_string): Update prev->rface->rfont if the
52 glyph prev is also supported by the current flt.
54 2005-11-08 Kenichi Handa <handa@m17n.org>
56 * m17n-X.c (xft_render): Cancel previous change.
58 2005-11-07 Kenichi Handa <handa@m17n.org>
60 * input.c: Include <stdlib.h>.
61 (get_surrounding_text, delete_surrounding_text)
62 (get_preceding_char, get_following_char): New functions.
63 (integer_value): New arg surrounding. If it is nonzero, try to
64 get a surrounding character. Callers changed.
65 (take_action_list): Check `value' before setting an element.
66 (destroy_ic): Unref ic_info->preceding_text and
67 ic_info->following_text.
68 (minput__init): Initialize Minput_get_surrounding_text and
69 Minput_delete_surrounding_text.
70 (Minput_get_surrounding_text, Minput_delete_surrounding_text): New
72 (filter): Unref ic_info->preceding_text and
73 ic_info->following_text.
75 * m17n.h (Minput_get_surrounding_text, Minput_delete_surrounding_text):
78 * input.h (MInputContextInfo): New members preceding_text and
81 2005-11-04 Kenichi Handa <handa@m17n.org>
83 * input.c (parse_nested_list_value): Fix handling of the global
85 (get_nested_list): Get global definitions by load_partial_im_info.
86 (preedit_commit): Set ic->candidates_changed to bitwise or of enum
87 MInputCandidatesChanged.
88 (take_action_list): Likewise.
90 (create_ic): Don't pay special attention to
91 Mcandidates_group_size.
92 (load_partial_im_info): Call mdatabase_find with correct 4th arg.
93 (minput_set_variable): Get a definition of varible by
94 mplist_find_by_value, not mplist_get.
96 * m17n.h (enum MInputCandidatesChanged): New enum.
98 2005-11-01 Kenichi Handa <handa@m17n.org>
100 * m17n-X.c (xft_render): Check xft_draw's drawable before changing
102 (mwin__destroy_window): If xft_draw's drawable is win, change it
103 to device->drawable before destroying win.
105 2005-10-31 Kenichi Handa <handa@m17n.org>
107 * input.c (load_im_info): Fix adding of state.
109 * m17n-core.c (m17n_fini_core): Fix reporting of module
112 * m17n.c (m17n_fini): Fix reporting of module finalization.
114 * m17n-gui.c (m17n_init_win): Fix reporting of module
117 2005-10-29 Kenichi Handa <handa@m17n.org>
119 * input.c (get_candidate_list): Fix the timing of referring plist.
121 2005-10-28 Kenichi Handa <handa@m17n.org>
123 * input.c (load_branch): Ignore an undefined map name.
124 (load_im_info): Set im_info->title from `name' only if it's not
126 (shift_state): Always update ic->status.
127 (adjust_candidates): Renamed from adjust_candidate_command.
128 Argument changed. Caller changed.
129 (get_candidate_list, regularize_action): New functions.
130 (take_action_list): Use them. On handling Munhandle, don't set
132 (handle_key): If KEY is not handled by MAP, and MAP has
133 branch_actions, perform them.
135 * database.c (mdatabase__fini): Free dir_info->filename;
137 2005-10-20 Kenichi Handa <handa@m17n.org>
139 * input.c (marker_code): Accept '@@'.
140 (integer_value): Handle '@@'.
141 (parse_action_list): Accept a symbol argument.
142 (take_action_list): Resolve the symbol argument. Handle the
145 2005-10-18 Kenichi Handa <handa@m17n.org>
147 * input.c: Include "charset.h".
148 (M_candidates, Mcandidates_group_size, Mcandidates_charset): New
150 (MIMState): New member (M17NObject control).
151 (lookup_nested_list, set_nested_list, parse_nested_list_value)
152 (get_nested_list, resolve_variable): New functions.
153 (integer_value): New arg (MPlist **value). Set it to the plist
154 element containing the value.
155 (resolve_command): New function.
156 (load_translation): New arg (MPlist *map_actions).
157 (load_branch): New args language and name. If `keylist' is a
158 symbol, resolved that as a command name.
159 (free_map): New arg top. Free map->map_actions only if top is
161 (free_state): New function.
162 (load_state): New arg name.
163 (im_info_list): New variable.
164 (free_im_info, get_im_info_by_tags): New functions.
165 (load_im_info): Arg key changed to plist. Handle `include'.
166 Return (MInputMethodInfo *).
167 (preedit_commit): Ref ic->candidate_list.
168 (get_select_charset, adjust_candidate_command): New functions.
169 (take_action_list): Handle `include'. Adjust candidate action
170 properly. Handle control variables `candidates-charset' and
171 `candidates-group-size'.
172 (open_im): Use get_im_info.
173 (create_ic): Get global variables.
174 (load_partial_im_info): New function.
175 (get_im_info): New function.
176 (check_command_keyseq, check_command_list, check_variable_list):
178 (minput__init): Don't handle M_database_hook and Mdetail_text.
179 Initialize M_candidates, Mcandidates_group_size,
181 (parse_variable_list, get_variable_list, parse_command_list)
182 (get_command_list): Delete them.
183 (MDatabaseStatList, imdir_stat_list, input_method_hook): Delete them.
184 (minput__fini): Simply unref command_list and variable_list.
185 (minput_get_description): Adjusted for the new form of description.
186 (minput_get_commands): Use get_nested_list.
187 (minput_assign_command_keys): Likewise.
188 (minput_get_variables, minput_set_variable): Likewise.
190 * input.h (MInputMethodInfo): New members im and maps.
192 * database.h (M_database_hook): Delete extern.
193 (MDatabaseHookFunc): Delete extern.
194 (mdatabase__check): Extern it.
196 * database.c: Include <glob.h>.
197 (MAX_TIME): New macro.
198 (Masterisk): New variable.
199 (get_database_stream): Argument changed to (MDatabaseInfo *).
201 (get_dir_info): Renamed from duplicate_dirname. Callers changed.
202 (find_database): New function.
203 (update_database_list): New function.
204 (mdatabase__init): Initialize Masterisk. Setup mdb_list by
205 calling update_database_list.
206 (mdatabase__check): New function.
207 (mdatabase_find): Use update_database and find_database. Don't
208 handle MDatabaseHookFunc.
209 (mdatabase_list): Call update_database at first.
210 (mdatabase_define): Adjusted for the change of mdb->extra_info.
211 (MDatabaseList): New type.
213 * plist.h (mplist_conv, mplist__pop_unref): Extern them.
215 * m17n.h (Mdetail_text): Delete extern.
217 * m17n-core.h (mplist_conc): Delete extern.
219 * plist.c (mplist__conc): Renamed from mplist_conc. Don't ref
221 (mplist_conc): Renamed to mplist__conc.
222 (mplist__pop_unref): New function.
224 2005-10-14 Kenichi Handa <handa@m17n.org>
226 * plist.c (read_mtext_element): Ignore the sequence of '\\' and
228 (read_element): If keys is an empty plist, return any element
230 (dump_plist_element): Check if plist is nested.
231 (mplist_conc): Always ref tail.
232 (mplist_set): If key is a managing key, ref val in advance.
234 * plist.h (MPLIST_VAL_MANAGED_P): Delete this macro.
235 (MPLIST_NESTED_P, MPLIST_SET_NESTED_P): New macros.
236 (MPLIST_ADD_PLIST, MPLIST_PUSH_PLIST, MPLIST_PUT_PLIST): New
239 * fontset.c (free_fontset): Unref fontset_list if necessary.
240 (mfont__fontset_fini): Don't free fontset_list. Unref
242 (mfont__realize_fontset): Initialize request.
243 (mfontset): Ref default_fontset or fontset only if necessary.
244 (mfontset_copy): Don't ref copy.
246 * draw.c (render_glyphs): Check gend->type before checking
249 * font-ft.c (mfont__ft_fini): Unref ft_default_list. Set all
250 unrefed plists to NULL.
252 2005-10-04 Kenichi Handa <handa@m17n.org>
254 * textprop.c (mtext_serialize): Be sure to make mt
255 MTEXT_FORMAT_UTF_8 and NULL terminated.
257 * m17n-gui.c (m17n_init_win): Initialize Mcolormap.
259 * draw.c (mdraw_glyph_list): Fix settting of glyphs->font->source.
261 2005-10-03 Kenichi Handa <handa@m17n.org>
263 * draw.c (mdraw_glyph_info): Pay attention to the case that FROM
264 is not at the beginning of line.
266 2005-09-22 Kenichi Handa <handa@m17n.org>
268 * input.c: Include <sys/stat.h> and <unistd.h>.
269 (Minclude, Mcommit, Munhandle): New variables.
270 (minput__init): Initialize them. Push only Mstate to
271 load_im_info_keys. Add aliases C-lowercase for C-uppercase.
272 (parse_action_list): Allow integer arg for undo. Handle Mcommit
274 (load_input_method): Handle "include" directive. If no states are
276 (shift_state): If state_name is Mt, shift back to the previous
277 state. Call preedit_commit to commit preedit text.
278 (preedit_commit): New function.
279 (take_action_list): Improve debug printing. Handle commit and
281 (handle_key): Check the return value of take_action_list. Don't
282 take branch_actions just after changing to the root map.
283 (reset_ic): Reset all ic_info members.
284 (filter): When a key is not handled, just move ic_info->keys
285 instead fo calling reset_ic.
286 (load_im_info): If key is not Mstate, push Mmap to
288 (MDatabaseStatList): New type.
289 (imdir_stat_list): New variable.
290 (input_method_hook): Don't cancel the hook. Check the
291 modification time of directories.
292 (minput__fini): Free imdir_stat_list;
294 * input.h (MInputContextInfo): New member prev_state.
296 * m17n-core.h (mplist_conc): Extern it.
298 * plist.c (mplist_conc): New function.
300 * mtext.c (mdebug_dump_mtext): Escape '"' and '\\' by '\\'.
302 * font.h (MRealizedFont): New member average_width.
304 * font-ft.c (ft_open): Set rface->average_width.
306 * font.c (xlfd_unparse_name): Print '*' before registry name.
308 * m17n-X.c (MDisplayInfo): New member AVERAGE_WIDTH.
309 (xfont_open): Set rfont->average_width.
310 (xft_open): Likewise.
311 (device_open): Initialize disp_info->AVERAGE_WIDTH.
313 * internal-gui.h (struct MFrame): New member average_width.
315 * m17n-gui.c (mframe): Fix setting of frame->rfont.
316 (mframe_get_prop): Return the average_width of a font.
318 * face.c (mface__realize): Set rface->average_width.
319 (mface__update_frame_face): Set frame->average_width.
321 * face.h (MRealizedFace): New member average_width.
323 2005-09-19 Kenichi Handa <handa@m17n.org>
325 * font.c (xlfd_unparse_name): New arg full_xlfd.
326 (mfont__encode_char): Use shortcut only for X core fonts.
327 (mfont_unparse_name): Call xlfd_unparse_name with full_xlfd arg 1.
328 (mfont_put_prop): Handle `language' property.
329 (mdebug_dump_font): Call xlfd_unparse_name with full_xlfd arg 0.
330 Print file can capability info too.
332 * m17n-core.c (mdebug__output): New variable.
333 (SET_DEBUG_FLAG): Unset mask if env_value is '0'.
334 (m17n_init_core): Handle MDEBUG_ALL and MDEBUG_OUTPUT_FILE.
335 (m17n_fini_core): Close mdebug__output if it's not stderr.
337 * m17n-X.c (MDisplayInfo): New member MULE_BASELINE_OFFSET.
338 (xfont_open): Handle baseline_offset.
339 (xfont_find_metric): Likewise.
340 (xfont_render): Likewise.
341 (xft_open): Likewise.
342 (xft_render): Likewise.
344 * internal.h (MDebugMaskBit): Add MDEBUG_ALL.
345 (mdebug__output): Extern it.
346 (MDEBUG_PRINT, MDEBUG_PRINT1, MDEBUG_PRINT2, MDEBUG_PRINT3)
347 (MDEBUG_PRINT4, MDEBUG_PRINT5): Print to medebug__output.
348 (MDEBUG_DUMP): New macro.
349 (MDEBUG_PRINT_TIME): Print to medebug__output.
351 * font.h (MRealizedFont): New member baseline_offset.
353 * font-ft.c (ft_get_charmaps): Check if the font support iso8859-1
355 (fc_weight_table): Add FC_WEIGHT_REGULAR.
356 (ft_list_family): Check alias.
357 (ft_list_language): If language is "en", don't try to the second
359 (ft_default_list): New variable.
360 (ft_list_default): New function.
361 (ft_select): If family is not specified, try only the default
362 fonts. Treat the weights normal and medium same.
363 (ft_open): Fix debug message. If registry is not specified, try
364 unicode-bmp. Handle _MULE_BASELINE_OFFSET property of BDF fonts.
365 (ft_find_metric): Likewise.
366 (ft_render): Likewise.
367 (ft_list): Fix debug message. Accept the registring iso8859-1.
368 If family is not specified, try only the default fonts.
370 * face.c (mface__realize): Fix logic of opening a font.
372 2005-09-16 Kenichi Handa <handa@m17n.org>
374 * face.c (mface__realize):
376 * m17n.h (Minput_focus_move, Minput_focus_in, Minput_focus_out):
379 * input.c (shift_state): Fix the condition of taking init actions.
380 (take_action_list): Fix handling of pushback action.
381 (handle_key): Don't change key while checking its alias.
382 (minput__init): Initialize new variables.
383 (Minput_focus_move, Minput_focus_in, Minput_focus_out): New
386 2005-09-12 Kenichi Handa <handa@m17n.org>
388 * mtext.c (mtext__uppercase): Add proper open/close parens.
389 (mtext_titlecase): Add proper casting.
391 * input.c (parse_action_list): Handle the case that the arg is a
392 key sequence (MText or MPlist).
393 (take_action_list): Likewise.
394 (shift_state): Shorter debug message.
395 (handle_key): Terminate a debug message by "\n".
396 (reset_ic): Don't take initial actions here.
397 (minput_open_im): Print a debug message.
398 (minput_close_im): Likewise.
399 (minput_create_ic): Likewise.
400 (minput_destroy_ic): Likewise.
402 2005-09-09 TAKAHASHI Naoto <ntakahas@m17n.org>
404 * mtext.c (mtext_lowercase, mtext_titlecase, mtext_uppercase):
407 2005-09-07 TAKAHASHI Naoto <ntakahas@m17n.org>
408 * character.c: Add "cased", "soft-dotted", and "case-mapping" in
411 * character.c: Add Japanese documentation for
412 mchar_get_prop_table ().
414 2005-09-06 TAKAHASHI Naoto <ntakahas@m17n.org>
416 * mtext.c (tricky_chars, *cased, *soft_dotted, *case_mapping)
417 (MCharTable *combining_class, Mlt, Mtr, Maz, gr03A3, lt0049,
418 (lt004A, lt012E, lt00CC, lt00CD, lt0128, tr0130, tr0049, tr0069):
420 (init_case_conversion): New function.
421 (CASE_CONV_INIT, REPLACE, DELETE, LOOKUP): New macros.
422 (uppercase_precheck, lowercase_precheck, final_sigma)
423 (after_soft_dotted, more_above, before_dot, after_i)
424 (mtext_uppercase, mtext_titlecase, mtext_lowercase): New functions.
426 2005-09-05 TAKAHASHI Naoto <ntakahas@m17n.org>
428 * plist.c (read_mtext_element): Fix previous change.
430 2005-09-05 Kenichi Handa <handa@m17n.org>
432 * plist.c (read_mtext_element): Handle \uXXXX notation.
434 * internal.h (MTABLE_MALLOC): Don't use a local variable.
435 (MTABLE_ALLOCA): Change the name of local variable.
437 * m17n-gd.c (device_open): Define it even if HAVE_GD nor
438 HAVE_FREETYPE are defined.
440 * m17n-X.c: Check HAVE_X11.
442 * Makefile.am (X_LD_FLAGS): Use @X11_LD_FLAGS@ instead of
443 directory listing libraries.
444 (noinst_PROGRAMS): Define it only in maintainer mode.
446 2005-09-02 Kenichi Handa <handa@m17n.org>
448 * m17n-gui.h (mdraw_line_break_option): Extern it.
450 * draw.c (truncate_gstring): Use find_glyph_in_gstring to find the
451 end of the first glyph.
452 (GET_LB_TYPE, find_break_backward, find_break_forward): Delete
454 (mdraw_line_break_option): New variable.
455 (mdraw_default_line_break): Use mtext_line_break.
457 * mtext.h (wordseg_func_table): Don't extern it.
458 (mtext__wseg_fini): Extern it.
460 * mtext.c: Don't include word-thai.h.
461 (wordseg_func_table): Delete this variable.
462 (mtext__init): Don't initialize above. Don't call
463 mtext__word_thai_init.
464 (mtext__fini): Don't free wordseg_func_table. Call
465 mtext__wseg_fini instead fo mtext__word_thai_fini.
466 (MTextWordsegFunc): Don't typedef it.
467 (mtext__word_segment): Moved to mtext-wseg.c.
469 * m17n-core.h (enum MTextLineBreakOption): New enum.
470 (mtext_line_break): Extern it.
472 * mtext-wseg.c: New file.
474 * mtext-lbrk.c: New file.
476 * Makefile.am (libm17n_core_la_SOURCES): Delete word-thai.[ch],
477 add mtext-lbrk.c and mtext-wseg.c.
479 * textprop.c (mtext__adjust_plist_for_change): Pay attention for
480 the case that head is NULL.
482 2005-09-01 Kenichi Handa <handa@m17n.org>
484 * word-thai.c (wordseg_propertize): If the property value is nil,
485 don't make the property no-merge.
486 (thai_wordseg): Don't require *from and *to are set a priori. Pay
487 attention to the case that they are NULL.
488 (mtext__word_thai_init): Make the name of Mthai_wordseg starts
491 * character.c (mchar_get_prop_table): New function.
493 * textprop.h (mtext__adjust_plist_for_change): Prototype adjusted.
495 * m17n-core.h (mtext_insert, mtext_replace): Extern them.
496 (mchar_get_prop_table): Extern it.
498 * textprop.c (prepare_to_modify): New arg deleting. Callers changed.
499 (mtext__adjust_plist_for_change): Argument changed. Callers changed.
501 * internal.h (enum MTextCoverage): New enum.
502 (MText): New member coverage.
504 * mtext.c (FORMAT_COVERAGE): New macro.
505 (insert): Copy mt2->coverage.
506 (mtext__from_data): Initialize mt->coverage.
507 (mtext__adjust_format): Update mt->coverage.
508 (mtext): Initialize mt->coverage.
509 (mtext_set_char): Adjust args to mtext__adjust_plist_for_change.
510 Update mt->coverage if necessary.
511 (mtext_duplicate): Copy mt->coverage.
512 (mtext_insert, mtext_replace): New functions.
513 (mtext_dup): Use mtext_duplicate.
514 (mtext__word_segment): Don't set *from and *to if a word
515 segmentation funcion is not found.
516 (mtext_ins_char): Fix typo.
518 2005-08-25 Kenichi Handa <handa@m17n.org>
520 * font.h (MFont): New member for_full_width.
522 * font.c (compare_font_score): Prefer a font of not
525 * m17n-X.c (xfont_registry_list): Set font.for_full_width if the
526 registry charset of a font is one of CJK charsets.
528 * font-ft.c (fc_parse_pattern): Set font->for_full_width if a font
529 supports some of CJK.
531 2005-08-24 Kenichi Handa <handa@m17n.org>
533 * m17n-gui.h (Mascent, Mdescent): Don't extern them.
535 * m17n-gui.c (null_device_open): Check Mresolution param and set
538 * m17n-gd.c (device_open): Check Mresolution param and set
541 * m17n-X.c (MWDevice): New member resy.
542 (xfont_open): Set ascent, descent, and max_advance members of
544 (xft_open): Likewise.
545 (device_open): Compare also screen_num to find a device. Set
546 device->resy and frame->dpi.
548 * internal-gui.h (MFrame): New member dpi.
550 * font.h (MRealizedFont): New member max_advance.
552 * font.c (xlfd_unparse_name): Handle the case of font->size < 0.
553 (mfont__init): Don't initialize Mascent, Mdescent.
554 (Mascent, Mdescent): Delete these variables.
555 (mfont_get_prop): Fix previous change. Check Mfont_ascent and
556 Mfont_descent instead of Mascent and Mdescent.
557 (mfont_put_prop): Allow negative size.
558 (mfont_find): Handle the case of spec->size < 0. Fix previous
560 (mfont_list): Handle the case of spec->size < 0.
561 (mfont_check): Likewise.
563 * font-ft.c (STRDUP_LOWER): Ignore the tailing spaces.
564 (fc_get_pattern): Handle the case of font->size < 0.
565 (ft_open): Set ascent, descent, and max_advance members of rfont.
566 (ft_find_metric): Improve rounding.
567 (mfont__ft_parse_name): If FC_PIXEL_SIZE is not available, set
570 * face.c (mface__realize): Handle the case of font->size < 0.
572 2005-08-22 Kenichi Handa <handa@m17n.org>
574 * coding.c (MConverterStatus): Change the member buf to union.
575 (mconv_buffer_converter): Add const to the arg buf.
576 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
577 (mconv_decode): Adjusted for the change of MConverterStatus.
578 (mconv_encode_range): Likewise.
580 * m17n.h (mconv_buffer_converter): Prototype adjusted.
581 (mconv_decode_buffer, mconv_rebind_buffer): Likewise.
583 2005-08-20 Kenichi Handa <handa@m17n.org>
585 * m17n-gui.h (mfont_from_name): Prototype adjusted.
586 (Mspacing, Mascent, Mdescent, Mmax_advance): Extern them.
588 * m17n-X.c (xfont_open): Set members ascent, descent, and
589 max_advance of rfont.
590 (xft_open): Likewise.
592 * font-ft.c (ft_open): Set members ascent, descent, and max_advance
594 (mfont__ft_parse_name): Add const to the arg name.
596 * font.c (xlfd_parse_name): Add const to the arg name. Call
597 mfont__set_property instead of mfont_set_spec. Set font->spacing.
598 (xlfd_unparse_name): Handle spacing.
599 (mfont__init): Initialize new variables.
600 (mfont__id): Handle spacing.
601 (mfont__merge): Likewise.
602 (mfont__set_spec): This function deleted.
603 (mfont__parse_name_into_font): Add const to the arg name. Fix the
604 condition of calling mfont__ft_parse_name.
605 (Mspacing, Mascent, Mdescent, Mmax_advance): New variables.
606 (mfont_get_prop): Handle properties spacing, ascent, descent,
608 (mfont_find): Return a realized font.
609 (mfont_from_name): Add const to the arg name.
611 * font.h (enum MFontProperty): New member MFONT_SPACING.
612 (enum MFontSpacing): New enum.
613 (MFont): New members spacing and max_advance.
614 (mfont__ft_parse_name): Prototype adjusted.
615 (mfont__set_spec): Extern deleted.
616 (mfont__parse_name_into_font): Prototype adjusted.
618 2005-08-19 Kenichi Handa <handa@m17n.org>
620 * m17n-gui.h (mfont_parse_name): Prototype adjusted.
622 * font.c (mfont_list): If FONT is null, use a temporary font.
623 (mfont_parse_name): Add const to the arg name.
625 2005-08-18 Kenichi Handa <handa@m17n.org>
627 * word-thai.c: Surround code by #ifdef and #endif to escape from
630 * font-ft.c: Mostly re-written.
632 * font-flt.c (FontLayoutCmdOTF): This type deleted.
633 (FontLayoutCmd): Type of the member otf changed..
634 (load_otf_command): Adjusted for the format change of otf command.
635 (load_command): Likewise.
636 (free_flt_command): Unref cmd->body.otf.
637 (run_otf): Ajusted for the type change of otf_cmd.
638 (run_command): Ajusted for the type change of otf_cmd. On
639 debugging, print ctx->combining_code.
640 (mfont__flt_run): Initialize ctx's members code_offset,
641 combining_code, and left_padding to 0.
643 * face.h (struct MRealizedFace): New member font.
644 (mface__realize): Prototype adjusted.
646 * face.c (find_realized_face): New arg font.
647 (find_realized_face): Adjusted for the change of MFont.
648 (mface__init): Call M17N_OBJECT_ADD_ARRAY.
649 (mface__fini): Don't call mdebug__report_object.
650 (mface__realize): New arg font.
651 (mface__for_chars): Adjusted for the change of mfont__encode_char.
652 Optimize the latin case.
653 (mface__free_realized): Free rface->font.
654 (mface__update_frame_face): Adjusted for the change of mface__realize.
655 (mface_equal): New function.
657 * draw.c (Mcommon): New variable.
658 (visual_order): Args to mfont__encode_char changed.
659 (compose_glyph_string): Handle Mfont text property.
660 (layout_glyphs): Adjusted for the change of MFont.
661 (mdraw__init): Initialize Mcommon.
662 (mdraw_glyph_info): Adjusted for the change of MRealizedFont.
664 * font.h (enum MFontType): Members completely changed.
665 (enum MFontProperty): Move MFONT_SIZE to the tail.
666 (enum MFontSource): New enum.
667 (struct MFont): New members type, source, sizes, file, capability,
669 (struct MRealizedFont): Type of member font changed. Members
670 score, status, and encoding deleted.
671 (MFontScore): New type.
672 (MFontList): Member changed.
673 (struct MFontDriver): New member has_char. Types of members
675 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
676 (Mapple_roman): Extern them.
677 (OTF_Tag): Typedefed if not HAVE_OTF.
678 (enum MFontOpenTypeTable): New enum.
679 (MFontCapability): New type.
680 (mfont__ft_drive_otf): Prototype adjusted.
681 (mfont__score): Extern deleted.
682 (mfont__merge): Extern it.
683 (mfont__has_char): Extern it.
684 (mfont__encode_char): Prototype adjusted.
685 (mfont__open): Extern it.
686 (mfont__set_spec): Prototype adjusted.
687 (mfont__get_capability): Extern it.
689 * font.c: Include "fontset.h".
690 (M_font_capability, M_font_list, M_font_list_len): New variables.
691 (font_score_priority): Change order of initial elements.
692 (font_score_shift_bits): Fix array size.
693 (common_weight): Add "thin", "semibold", and "heavy".
694 (common_stretch): Add "ultracondensed", "extracondensed",
695 "extraexpanded", and "utltraexpand".
696 (font_weight_regular, font_weight_normal, font_weight_medium): New
698 (gen_font_name): This function deleted.
699 (find_encoding): Set font->encoding.
700 (OTF_tag): New function.
701 (otf_script_list): New variable.
702 (load_otf_script_list): New function.
703 (find_script_from_otf_tag): New function.
704 (xlfd_parse_name): Set font->type and font->source.
705 (mfont__free_realized): Free chains rfonts.
706 (font_score): Renamed from mfont__score.
707 (Miso8859_1, Miso10646_1, Municode_bmp, Municode_full)
708 (Mapple_roman): New variables.
709 (mfont__init): Initilize new variables. Initalize
710 default_encoding.encoding_name and
711 default_encoding.encoding_charset to Municode_full and
712 mcharset__unicode. Use SAFE* macros for allocating filepath
714 (mfont__fini): Free otf_script_list.
715 (mfont__id): New function.
716 (mfont__match_p): Check also capability member of MFont.
717 (mfont__merge): New funciton.
718 (mfont__set_spec_from_face): Set type and source members.
719 (mfont__set_spec_from_plist): Set capability and type members.
720 (mfont__select): Argument changed.
721 (mfont__available): New function.
722 (compare_font_score): New function.
723 (mfont__list): New function.
724 (mfont__open): Return a realized font.
725 (mfont__resize): Adjusted for the change of MFont.
726 (mfont__has_char): New function.
727 (mfont__encode_char): Argument changed.
728 (mfont__set_spec): Argument changed.
729 (free_font_capability): New function.
730 (mfont__get_capability): New function.
731 (MFontfile): New variable.
732 (mfont_get_prop): Adjusted for the change of MFont.
733 (mfont_put_prop): Likewise.
734 (mfont_set_selection_priority): Fix the way of setting
735 font_score_priority[].
736 (mfont_find): Use mfont__list instead of mfont__select.
737 (mfont_resize_ratio): Adjusted for the change of MFont.
738 (mfont_list): Use mfont__list.
739 (mfont_check): New function.
740 (font_score): Make it static.
742 * fontset.h (mfont__realize_fontset): Prototype adjusted.
743 (mfont__lookup_fontset): Likewise.
745 * fontset.c (struct MFontset): Delete member font_spec_list.
746 (struct MRealizedFontset): Type of member spec changed. New
748 (load_font_group): Arg spec_list deleted.
749 (load_fontset_contents): Adjusted for the change of fontset_def.
750 (free_fontset): Fix the way of freeing fontset elements.
751 (realize_fontset_elements): Argument changed.
752 (get_per_script): New function.
753 (free_realized_fontset_elements): Fix the way of feeing rfontset
755 (update_fontset_elements): Fix args to realize_fontset_elements.
756 (mfont__realize_fontset): New arg spec.
757 (try_font_list): New function.
758 (try_font_group): New arg request. Use try_font_list.
759 (mfont__lookup_fontset): New arg ignore_fallback. Fix arg to
761 (mfontset): Adjusted for the change of MFontset.
762 (mfontset_copy): Likewise. Don't share plists.
763 (mfontset_modify_entry): Adjusted for the change of MFontset.
764 (mfontset_lookup): Call get_per_script.
765 (mdebug_dump_fontset): Print also the address of fonts.
767 * input.c (shift_state): Don't reset ic_info->vars.
768 (take_action_list): Call MDEBUG_PRINT fore calling
771 * internal-gui.h (MFontDriver): Don't typedef it here.
773 * m17n-X.c: Include <fontconfig/fcfreetype.h> if HAVE_XFT2.
774 (MXFont): This type deleted.
776 (struct _MFontX): New struct.
777 (SET_SIZE, HAVE_SIZE): Adjusted for the change of arg FONTX.
778 (MDisplayInfo): Member base_font_list deleted.
779 (DEFAULT_FONT): Definition changed.
780 (FALLBACK_FONT): This maclr deleted.
781 (free_display_info): Adjusted for the change of MDisplayInfo.
782 (free_device): Argument to mfont__free_realized changed.
783 (xfont_driver): Adjusted for the change of MFontDriver.
784 (xfont_registry_list): Use MFontX instead of MXFont.
785 (MRealizedFontX): Renamed from MXFontInfo.
786 (xfont_select): Return the font found first.
787 (close_xfont): Change MXFontInfo to MRealizedFontX.
788 (xfont_open): Return the realized font.
789 (xfont_find_metric): Get xfont from rfont->fontp.
790 (xfont_has_char): New function.
791 (xfont_encode_char): Adjusted for the argument change.
792 (xfont_render): Get xfont from rfont->fontp.
793 (xfont_list): Adjusted for the argument change.
794 (MRealizedFontXft): Renamed from MXftFontInfo.
795 (xft_driver): Ajusted for the change of MFontDriver.
796 (close_xft): Change MXtfFontInfo to MRealizedFontXft
797 (xft_open_font): Argument changed.
798 (xft_open): Argument changed. Return the realized font.
799 (xft_find_metric): Get xft_font from rfont->fontp.
800 (xft_has_char, xft_encode_char): New functions.
801 (xft_render): Change MXftFontInfo to MRealizedFontXft. Open a
802 font if not yet opened.
803 (device_open): Don't set frame->font.
805 * m17n-gd.c (gd_font_driver): Adjusted for the change of
807 (gd_font_open): New function.
808 (gd_render): Don't use the local variable ft_info.
809 (device_init): Adjusted for the change of gd_font_driver.
811 * textprop.c (mtext__prop_init): Initialize text_property_table.
812 Call M17N_OBJECT_ADD_ARRAY.
813 (mtext__prop_fini): Don't call mdebug__report_object.
815 * plist.c (mplist__init): Initialize plist_table.
816 (mplist__init): Call M17N_OBJECT_ADD_ARRAY.
817 (mplist__fini): Don't call mdebug__report_object.
819 * mtext.c (mtext__init): Call M17N_OBJECT_ADD_ARRAY.
820 (mtext__fini): Don't call mdebug__report_object.
821 (MTEXT_FORMAT_UTF_16): Correct type.
822 (mtext_data): New function.
823 (mtext_text): Fix calculation of limit and args to
826 * language.c: Include "plist.h".
827 (M_script_lang_list): New variable.
828 (mlang__init): Read languages and their information from m17n
830 (mlanguage__list): New function.
831 (Miso639_1, Miso639_2): New variables.
833 * language.h (mlanguage__list): Extern it.
835 * database.c (get_database_stream): Use SAFE_* macros for
836 allocating and freeing path.
837 (mdatabase__init): Likewise.
839 * symbol.c (msymbol__fini): Don't free symbols here.
840 (msymbol__free_table): New function.
841 (msymbol_is_managing_key): New function.
843 * symbol.h (msymbol__free_table): Extern it.
844 (msymbol__list): Extern it.
846 * internal.h (MFATAL, USE_SAFE_ALLOCA, SAFE_ALLOCA, SAFE_FREE):
848 (M17N_OBJECT_UNREF): Change "if ... else ..." structure.
849 (struct _M17NObjectArray): New member name and next.
850 (mdebug__add_object_array): Extern it.
851 (M17N_OBJECT_ADD_ARRAY): New macro.
852 (mdebug__report_object): Don't extern it.
854 * m17n-misc.h (enum MErrorCode): New element MERROR_FONT_X.
856 * m17n-gui.c (free_frame): Don't free frame->font.
857 (null_device_fini): Fix code for freeing
858 null_device.realized_font_list.
859 (m17n_fini_win): Free interface.
860 (mframe): Cast the return value of dlsym. Set frame->font here.
861 (mframe_get_prop): Check frame->rface->rfont before accessing the
864 * m17n-gui.h (Mfontfile): Extern it.
865 (mfont_check): Extern it.
866 (mface_equal): Extern it.
868 * m17n-core.c: Include "symbol.h".
869 (report_header_printed): This variable deleted.
870 (object_array_root): New variable.
871 (report_object_array): New function.
872 (mdebug__report_object): This function deleted.
873 (mdebug__add_object_array): New function.
874 (m17n_init_core): Call mchartable_init () before mtext_init ().
875 (m17n_fini_core): Call report_object_array (if necessary) and
876 msymbol__free_atable at the end.
878 * m17n-core.h (msymbol_is_managing_key): Extern it.
879 (mtext_data): Extern it.
880 (MTEXT_FORMAT_UTF_16): Correct type.
881 (M17NLIB_MINOR_VERSION): Changed to 3.
882 (M17NLIB_VERSION_NAME): Changed to "1.3.0".
884 * chartab.c (mchartable__init): Initalize chartable_table.count.
885 (mchartable__fini): Use N17N_OBJECT_ADD_ARRAY instead of
886 mdebug__report_object.
888 2005-05-26 Kenichi Handa <handa@m17n.org>
890 * m17n.h (Miso639_1, Miso639_2): Extern them.
892 * symbol.h (msymbol__list): Extern it.
894 * symbol.c (msymbol__list): New function.
896 2005-05-19 Kenichi Handa <handa@m17n.org>
898 * input-gui.c (minput__win_init): Don't change the value of
901 2005-05-16 Kenichi Handa <handa@m17n.org>
903 * m17n-core.c (m17n_object): Be sure to initialize all members.
905 * font-ft.c (fc_decode_prop): Fix args to msymbol.
907 2005-05-09 Kenichi Handa <handa@m17n.org>
909 * m17n-X.c (mwin__close_device): Fix arg to M17N_OBJECT_UNREF.
911 2005-04-27 Kenichi Handa <handa@m17n.org>
913 * language.c (mlang__init): Add "an" (Aragonese).
915 * word-thai.c: Add support for libthai.
916 (mtext__word_thai_init): Initialize wordseg library conditionaly.
917 (mtext__word_thai_fini): Finalize wordseg library conditionaly.
919 * mtext.c: Include "word-thai.h" conditionaly.
920 (mtext__init): Call mtext__word_thai_init conditionaly.
921 (mtext__fini): Call mtext__word_thai_fini conditionaly.
923 * Makefile.am (libm17n_core_la_LIBADD): Add THAI_WORDSEG_LD_FLAGS,
924 not WORDCUT_LD_FLAGS.
926 2005-04-19 Kenichi Handa <handa@m17n.org>
928 * word-thai.c (wordseg_propertize): Always unref the attached
930 (thai_wordseg): Don't unref the property.
932 2005-04-18 Kenichi Handa <handa@m17n.org>
934 * word-thai.c: Include stdlib.h.
935 (wordseg_propertize): Add dummy function for the case that wordcut
936 library doesn't exist.
937 (wordseg_propertize): Fix for old wordcut library.
939 2005-04-16 Kenichi Handa <handa@m17n.org>
941 * word-thai.c: Include <stdio.h>.
943 2005-04-15 Kenichi Handa <handa@m17n.org>
945 * draw.c: Include mtext.h.
946 (linebreak_table, M_break_at_space, M_break_at_word)
947 (M_break_at_any, M_kinsoku_bol, M_kinsoku_eol): New variables.
948 (compose_glyph_string): Check POS before getting Mface text
950 (truncate_gstring): Give correct TO arg to line_break function.
951 (GET_LB_TYPE): New macro.
952 (find_break_backward, find_break_forward): New functions.
953 (mdraw__init): Initialize the above new variables.
954 (mdraw__fini): Free linebreak_table.
955 (mdraw_default_line_break): Use find_break_backward and
958 * word-thai.c: New file.
960 * word-thai.h: New file.
962 * mtext.c: Include word-thai.h.
963 (wordseg_func_table): New variable.
964 (mtext__init): Initialize wordseg_func_table and call
965 mtext__word_thai_init.
966 (mtext__fini): Call mtext__word_thai_fini, free
968 (MTextWordsegFunc): New type.
969 (mtext__word_segment): New function.
971 * mtext.h (wordseg_func_table): Extern it.
972 (mtext__word_segment): Extern it.
974 * m17n.c (m17n_init): Fix typo (== -> =).
976 * Makefile.am (libm17n_core_la_SOURCES): Include word-thai.[ch].
977 (libm17n_core_la_LIBADD): Add @WORDCUT_LD_FLAGS@.
979 * textprop.h (MTEXTPROP_START, MTEXTPROP_END, MTEXTPROP_KEY)
980 (MTEXTPROP_VAL): New macros.
982 * input.c (DLOPEN_SHLIB_EXT): Don't define it.
984 2005-04-07 Kenichi Handa <handa@m17n.org>
986 * database.c (load_chartable): Fix pursing of symbol name.
988 2005-03-24 Kenichi Handa <handa@m17n.org>
990 * m17n.c (m17n_init): Fix typo (== -> =).
992 2005-03-11 Kenichi Handa <handa@m17n.org>
994 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE at first.
996 * m17n.c (m17n_init): Set merror_code to MERROR_NONE at first.
998 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE at
1001 2005-03-09 handa <handa@m17n.org>
1003 * m17n-gui.c (m17n_init_win): Set merror_code to MERROR_NONE before
1004 calling m17n_init ().
1006 * m17n.c (m17n_init): Set merror_code to MERROR_NONE before
1007 calling m17n_init_core ().
1009 2005-02-28 Kenichi Handa <handa@m17n.org>
1011 * font-flt.c (mfont__flt_run): Add resulting code sequence in
1014 2005-02-17 Kenichi Handa <handa@m17n.org>
1016 * input.c: Include <sys/types.h>, <dirent.h>, and "database.h".
1017 (M_description, M_command, M_variable): New variables.
1018 (load_im_info_keys): New variables.
1019 (load_im_info, check_command_keyseq, get_description_advance)
1020 (parse_command_list, get_command_list, parse_variable_list)
1021 (get_variable_list, input_method_hook): New functions.
1022 (command_list, variable_list): New variables.
1023 (minput__init): Put input_method_hook to Minput_method.
1024 Initialize M_description, M_command, M_variable, Mdetail_text,
1025 load_im_info_keys, command_list, variable_list.
1026 (minput__fini): Unref command_list, variable_list, load_im_info_keys.
1027 (Mdetail_text): New variable.
1028 (minput_get_description, minput_get_commands)
1029 (minput_assign_command_keys, minput_get_variables)
1030 (minput_set_variable): New functions.
1032 * m17n.h (Mdetail_text, minput_get_description, minput_get_commands)
1033 (minput_assign_command_keys, minput_get_variables)
1034 (minput_set_variable): Extern them.
1036 * plist.c (UNGETC): Just decrement st->p.
1037 (read_mtext_element): New arg skip.
1038 (read_integer_element): Likewise.
1039 (read_symbol_element): Likewise.
1040 (read_element): New arg KEYS.
1041 (mplist__from_plist): Don't increment ref-count of NULL object.
1042 (mplist__from_file): New arg KEYS.
1043 (mplist_put): Don't increment ref-count of NULL object.
1044 (mplist_add): Likewise.
1045 (mplist_push): Likewise.
1046 (mplist_set): Likewise. Call M17N_OBJECT_UNREF unconditionally.
1048 * plist.h (mplist__from_file): Prototype adjusted.
1050 * database.c (mdatabase__dir_list): Renamed from mdb_dir_list.
1051 (get_database_stream): New function.
1052 (load_database): Use get_database_stream.
1053 (M_database_hook): New variable
1054 (mdatabase__init): Initialize M_database_hook.
1055 (mdatabase__load_for_keys): New function.
1056 (mdatabase_find, mdatabase_list, mdatabase_define): Check hook
1058 (mdatabase_define): Free mdb->extra_info if necessary.
1060 * database.h (mdatabase__dir_list, M_database_hook)
1061 (mdatabase__load_for_keys): Extern them.
1062 (MDatabaseHookFunc): New type.
1064 * internal.h (M17N_OBJECT_UNREF): When freed, set OBJECT to NULL.
1066 2004-12-27 Kenichi Handa <handa@m17n.org>
1068 * Version 1.2.0 released.
1070 2004-12-27 Kenichi Handa <handa@m17n.org>
1072 * input.c (minput_filter): Don't reset ic->xxx_changed.
1074 * mtext.c (mtext_from_data): Fix documentation.
1076 2004-12-25 Kenichi Handa <handa@m17n.org>
1078 * m17n-core.h (M17NLIB_MINOR_VERSION): Update to 2.
1079 (M17NLIB_VERSION_NAME): Update to "1.2.".
1081 2004-12-24 Kenichi Handa <handa@m17n.org>
1083 * input.c (reset_ic): Set key_unhandled to 0.
1085 2004-12-21 Kenichi Handa <handa@m17n.org>
1087 * m17n-gui.h (mfont_from_spec): Delete extern.
1089 * input-gui.c (win_callback): Handle Minput_reset.
1090 (minput__win_init): Register reset_ic as a callback for
1093 * input.c (reset_ic): New arg IGNORE which is ignored. Caller
1094 changed. At first, shift to the initial state.
1095 (minput__init): Initialize Minput_reset. Register reset_ic as a
1096 callback for Minput_reset.
1097 (Minput_reset): New variable.
1098 (minput_filter): Always set ic->xxx_changed to 0.
1099 (minput_reset_ic): New function.
1100 (integer_value): Fix typo ('>' -> '<') and calculation of length
1103 * m17n-core.c (merror_code): Change type to `int'.
1105 * m17n-misc.h (merror_code): Adjust type.
1107 * m17n.h (Minput_reset, minput_reset_ic): Extern them.
1109 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Adjust types.
1110 (mtext_change_prop): Delete extern.
1112 * mtext.c (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Change types
1113 to `int'. Move the documents to m17n-core.h.
1115 2004-12-13 Kenichi Handa <handa@m17n.org>
1117 * m17n-core.h (m17n_object): Rename extern from m17n_object_setup.
1118 (MTextProperty): Document it.
1120 2004-12-09 Kenichi Handa <handa@m17n.org>
1122 * m17n-core.h: Fix typo (MTextStatus -> M17NStatus).
1124 2004-12-03 Kenichi Handa <handa@m17n.org>
1126 * internal.h (m17n__core_initialized, m17n__shell_initialized,
1127 m17n__gui_initialized): New externs.
1129 * m17n-core.h (enum M17NStatus): New enum.
1130 (m17n_status): Extern it.
1132 * m17n-core.c (core_initialized): Delete this variable.
1133 (m17n__core_initialized, m17n__shell_initialized,
1134 m17n__gui_initialized): New variables.
1135 (m17n_init_core, m17n_fini_core): Check m17n__core_initialized
1136 instead of core_initialized.
1137 (m17n_status): New function.
1139 * m17n.c (shell_initialized): Delete this variable.
1140 (m17n_init, m17n_fini): Check m17n__shell_initialized instead of
1143 * m17n-gui.h (m17n_init_win): Adjust the prototype.
1145 * m17n-gui.c (win_initialized): Delete this variable.
1146 (m17n_init_win, m17n_fini_win): Check m17n__gui_initialized
1147 instead of gui_initialized.
1149 2004-11-19 Kenichi Handa <handa@m17n.org>
1151 * input.c (reset_ic): Check if ic_info->state is NULL.
1152 (filter): If ic_info->state is NULL, return 0.
1153 (load_input_method): Don't unref `maps' it it's not created.
1155 2004-11-15 Kenichi Handa <handa@m17n.org>
1157 * input.c (find_candidates_group): If INDEX is -1, find the last
1159 (take_action_list): If the previous of the first candidate is
1160 requested, select the last candidate.
1162 2004-11-08 Kenichi Handa <handa@m17n.org>
1164 * m17n-X.c (device_open): Try at most 32 fonts to find a
1165 non-autoscaled font.
1167 * font.c (xlfd_parse_name): Fix previous change.
1169 2004-11-05 Kenichi Handa <handa@m17n.org>
1171 * font.c: (commont_style): Include dummy elements "slanted" and
1172 "rslanted" to prefer "o" to "r" if "i" is requested.
1174 * font-ft.c (ft_to_prop): Fix "oblique" entry.
1176 2004-10-29 Kenichi Handa <handa@m17n.org>
1178 * font.c (xlfd_parse_name): If avgwidth is 0, set the size to 0.
1180 * m17n-X.c (MXFont): Change type of the member `sizes' to int.
1181 New members smallest and larger.
1182 (SET_SIZE, HAVE_SIZE): Adjusted for the above change.
1183 (xfont_registry_list): Likewise.
1184 (xfont_select): Likewise.
1187 2004-10-28 Kenichi Handa <handa@m17n.org>
1189 * m17n-X.c (xfont_registry_list): Include '-' before PIXEL_SIZE in
1190 font name comparison.
1191 (xfont_select): Fix logic for selecting a larger size font.
1193 2004-10-25 Kenichi Handa <handa@m17n.org>
1195 * input.c (take_action_list): Initialize `ret' to 0 for "=", "<",
1198 2004-10-22 Kenichi Handa <handa@m17n.org>
1200 * input.c (update_candidate): Renamed from udpate_candidate.
1201 (take_action_list): Show more debugging info on arithmetic commands.
1203 * m17n-X.c (device_open): Fix previous change.
1205 * draw.c (compose_glyph_string): Don't get face property at the
1208 2004-10-21 Kenichi Handa <handa@m17n.org>
1210 * draw.c (compose_glyph_string): Fix for the case of category
1213 2004-10-19 Kenichi Handa <handa@m17n.org>
1215 * input.c (mdebug_mask): New variable.
1216 (shift_state): Print debug information.
1217 (take_action_list): Likewise.
1218 (handle_key): Likewise.
1220 2004-10-14 Kenichi Handa <handa@m17n.org>
1222 * m17n-X.c (device_open): Accept Mxft as the value of key Mfont.
1224 2004-10-13 Kenichi Handa <handa@m17n.org>
1226 * m17n-X.c (device_open): Be sure to register at least one font
1229 * font-ft.c: Include <freetype/ftbdf.h> conditionally. Check
1230 HAVE_FTBDF_H before calling FT_Get_BDF_Property.
1232 2004-10-12 Kenichi Handa <handa@m17n.org>
1234 * draw.c (alloc_gstring): Fix previous change.
1236 * font-ft.c (ft_list_generic): Fix for the case of not
1239 * m17n-X.c (mwin__parse_event): Fix for non-ASCII keys.
1241 * font.c (mfont_list): If no font is found, return NULL.
1242 (load_font_encoding_table): Put entries of nil registry first.
1243 (find_encoding): Adjust for the above change.
1245 2004-10-11 Kenichi Handa <handa@m17n.org>
1247 * m17n-gui.h (mfont_list): Adjust prototype.
1249 * m17n-X.c (xfont_list): New arg maxnum.
1251 * font.h (struct MFontDriver): Change prototype of <list>.
1253 * font-ft.c (fc_generic_family_list): Delete it.
1254 (Mserif, Msans_serif, Mmonospace): Delete them.
1255 (M_generic_family_info): New variable.
1256 (enum GenericFamilyType): New enum.
1257 (struct GenericFamilyInfo): New struct.
1258 (generic_family_table): New variable.
1259 (set_font_info): New arg style. Don't check 0xA0..0xBF to decide
1261 (add_font_info): Get style here.
1262 (ft_list_family): Don't initialize fc_config here. Don't list
1264 (ft_list_generic): New function.
1265 (ft_select): Pay attention to generic familes here.
1266 (ft_open): Fix calculation of ascent and descent.
1267 (ft_list): Pay attention to generic families.
1268 (mfont__ft_init): Initialize M_generic_family_info,
1269 generic_family_table, and fc_config..
1270 (mfont__ft_fini): Finalize generic_family_table.
1272 * draw.c (compose_glyph_string): Use more constant font for
1273 glyphs. Adjust for the member change in MGlyph.
1274 (layout_glyph_string): Adjust for the member change in MGlyph.
1275 (alloc_gstring): Intilize scracth_glyph to avoid
1276 compose_glyph_string on it.
1277 (get_gstring): Don't call compose_glyph_string on scracth_glyph.
1278 (mdraw_coordinates_position): Fix previous change.
1280 * internal-gui.h (glyph_category): New enum.
1281 (MGlyph): Change type of <category> to enum glyph_category.
1283 * face.c (mface__realize): Delete args langauge and charset.
1284 (mface__for_chars): Fix for the case that glyphs have different
1286 (mface__update_frame_face): Adjust for mface__realize change.
1288 * face.h (mface__realize): Adjust prototype.
1290 2004-10-05 Kenichi Handa <handa@m17n.org>
1292 * language.c (mlang__init): Add Akan.
1294 2004-10-04 Kenichi Handa <handa@m17n.org>
1296 * font-ft.c (add_font_info): Add instead of push the element.
1297 (ft_list_family): For generic fonts, try all
1298 substituted. families.
1300 * font-flt.c (UPDATE_CLUSTER_RANGE): New macro.
1301 (run_rule): Don't update cluster range here.
1302 (run_command): Update cluster range on appending a glyph.
1303 (run_otf): Update cluster range for glyphs generated by OTF.
1305 2004-10-02 Kenichi Handa <handa@m17n.org>
1307 * m17n-X.c (device_open): Handle Mfont key in PLIST.
1309 2004-09-30 Kenichi Handa <handa@m17n.org>
1311 * font-ft.c (ft_select): Ignore family on calling mfont__score.
1313 2004-09-30 Kenichi Handa <handa@m17n.org>
1315 * font.h: Include <fontconfig/fontconfig.h>.
1316 (MFTInfo): New member langset.
1317 (mfont__encoding_list): Extern it.
1319 * font.c (mfont__encoding_list): New function.
1320 (mdebug_dump_font_list): New function.
1322 * font-ft.c: Don't include <fontconfig/fontconfig.h> here.
1323 (Mserif, Msans_serif, Mmonospace, Mmedium, Mr, Mnull): New
1325 (ft_family_list): New variable.
1326 (set_font_info): New arg basep. Callers changed.
1327 (fc_list): Check the return value of FcPatternGetString.
1328 (add_font_info): New arg plist. Callers changed. Update
1330 (ft_list_family): New function (merged fc_list and ft_list_all).
1331 (ft_select): Use ft_list_family.
1332 (ft_list): Likewise. If FONT is not NULL, check all fonts. Fix
1334 (mfont__ft_init): Initialize above new variables.
1335 (mfont__ft_fini): Free ft_family_list.
1336 (STRDUP_LOWER): New macro.
1337 (set_font_info): Use STRDUP_LOWER.
1338 (ft_list_family): Avoid duplicate addition of font path. Use
1340 (fc_decode_prop): Fix typo.
1342 * m17n-X.c (MDisplayInfo): New member all_fonts_scaned.
1343 (xfont_registry_list): Change argument disp_info to frame.
1345 (xfont_list_all): New function.
1346 (xfont_list): If FONT is not NULL, check all fonts.
1348 2004-09-28 Kenichi Handa <handa@m17n.org>
1350 * m17n-X.c (MXFont, MXFontList): New types.
1351 (MDisplayInfo): Delete members font_registry_list,
1352 iso8859_1_family_list, iso10646_1_family_list, new members
1353 font_list, base_font_list.
1354 (free_display_info): Adusted for the change of MDisplayInfo.
1355 (xfont_driver): Initialize with xfont_list.
1356 (font_compare): New function.
1357 (build_font_list): Deleted.
1358 (xfont_registry_list): New function.
1359 (xfont_select): Use xfont_registry_list.
1360 (xfont_list): New function.
1361 (device_open): Adusted for the change of MDisplayInfo.
1363 * font-ft.c (add_font_info): New arg languages. Callers changed.
1364 (fc_list): Get languages from fonts..
1365 (ft_list_all): Renamed from ft_list. Callers changed.
1366 (ft_list): New function.
1367 (mfont__ft_driver): Initalize with ft_list.
1369 * font.c (mfont_list): New function.
1371 * font.h (struct MFontDriver): New member `list'.
1372 (MFTInfo): New member languages.
1374 * m17n-gui.h (mfont_list): Extern it.
1376 2004-09-27 Kenichi Handa <handa@m17n.org>
1378 * internal-gui.h (struct MGlyphString): Delete members mt,
1379 sub_width, sub_lbrearing, sub_rbearing, and region.
1381 * draw.c (MSubTextExtents): New type.
1382 (layout_glyphs): New arg extents. Set its members.
1383 (layout_glyph_string): Adjusted for the above change.
1384 (alloc_gstring): Don't set gstring->mt.
1385 (truncate_gstring): Call line_break function with mt instead of
1388 2004-09-22 Kenichi Handa <handa@m17n.org>
1390 * mtext.c (count_utf_16_chars): Count each code of invalid
1393 2004-09-19 Kenichi Handa <handa@m17n.org>
1395 * mtext.c (default_utf_16, default_utf_32): Rename them to
1396 MTEXT_FORMAT_UTF_16 and MTEXT_FORMAT_UTF_32 respectively. Caller
1399 * m17n-core.h (MTEXT_FORMAT_UTF_16, MTEXT_FORMAT_UTF_32): Extern
1402 2004-09-13 Kenichi Handa <handa@m17n.org>
1404 * draw.c (Mlatin): Don't declare it here.
1405 (visual_order): Fix reordering of combining characters.
1406 (compose_glyph_string): Fix detection of script.
1407 (layout_glyphs): Don't fix reordering of combining characters
1409 (layout_glyph_string): Pay attention to
1410 control->disable_overlapping_adjustment.
1411 (truncate_gstring): Include at least on character in a line.
1412 (get_gstring): Always scan one full line.
1413 (mdraw__init): Don't initialize Mlatin here.
1414 (mdraw_text_per_char_extents): Fix iteration. If a glyph doesn't
1415 have a font, use ascent/descent of an ASCII font. Allow
1416 ink_array_return and logical_array_return to be NULL.
1417 (mdraw_coordinates_position): Fix iteration.
1419 * font-ft.c (MFTtoProp): Member completely changed.
1420 (ft_to_prop): Adjusted for the above change.
1421 (ft_to_prop_size): Likewise.
1422 (set_font_info): Adjusted for the change of MFTtoProp.
1423 (fc_generic_family_list): New variable.
1424 (fc_list): Add special handling of generic font names.
1425 (mfont__ft_init): Adjusted for the change of MFTtoProp.
1426 Initialize fc_generic_family_list.
1427 (mfont__ft_fini): Don't free ft_to_prop. Free
1428 fc_generic_family_list.
1429 (FC_vs_M17N_font_prop): New type.
1430 (fc_weight_table, fc_slant_table, fc_width_table): New variables.
1431 (fc_decode_prop, fc_encode_prop): New functions.
1432 (mfont__ft_parse_name): Use fc_decode_prop.
1433 (mfont__ft_unparse_name): Use fc_encode_prop.
1435 * m17n-X.c (MDisplayInfo): Delete member realized_font_list.
1436 (MWDevice): Add member realized_font_list.
1437 (free_display_info): Don't free disp_info->realized_font_list.
1438 (free_device): Free device->realized_fontset_list.
1439 (xft_find_metric): Use gstring->frame instead of rfont->frame.
1440 (device_open): Don't initialize disp_info->realized_font_list.
1441 (device_open): Initialize device->realized_font_list and set it to
1442 frame->realized_font_list.
1444 * fontset.c (try_font_group): New function.
1445 (mfont__lookup_fontset): Use try_font_group.
1447 * font.c (common_weight): Change the order of "regular".
1449 * face.c (Mlatin): Don't make it static.
1450 (mface__realize): Be sure to set work_gstring.frame.
1451 (mface__for_chars): Likewise.
1453 * mtext.c (mdebug_dump_mtext): Fix for the case of mt->format >
1456 * internal-gui.h (Mlatin): Extern it.
1458 * m17n-gui.h (MDrawControl): New member
1459 disable_overlapping_adjustment.
1461 2004-09-06 Kenichi Handa <handa@m17n.org>
1463 * font-flt.c (run_otf): Fix typo ('}'->']').
1465 * internal-gui.h (MAKE_PRECOMPUTED_COMBINDING_CODE)
1466 (COMBINING_PRECOMPUTED_P): New macros.
1468 * draw.c (layout_glyphs): Handle precomputed combining code.
1470 * font-ft.c (mfont__ft_drive_otf): Set g->combining_code to a
1471 precomupted combining code.
1473 2004-09-03 Kenichi Handa <handa@m17n.org>
1475 * font-ft.c (mfont__ft_drive_otf): Use malloc and free for
1478 2004-08-27 Kenichi Handa <handa@m17n.org>
1480 * face.c (mface_put_prop): If the new value is the same as the
1481 current one, don't increment frame->tick.
1483 2004-08-25 Kenichi Handa <handa@m17n.org>
1485 * fontset.c (mfontset): Initialize font_spec_list member.
1486 (mfontset_copy): Load fontset if necessary.
1488 * m17n-gui.h (MDrawGlyphInfo): Change the member name 'this' to
1489 'metrics' to for C++.
1491 * draw.c (mdraw_glyph_info): Adjusted for the member name change
1494 2004-08-16 Kenichi Handa <handa@m17n.org>
1496 * Version 1.1.0 released.
1498 2004-08-13 Kenichi Handa <handa@m17n.org>
1500 * language.c (mlang__init): Add Dhivehi.
1502 * m17n-gui.c (Mx, Mfreetype): Delete it.
1503 (m17n_init_win): Don't initialize Mx and Mfreetype here.
1505 * m17n-gui.h (Mfreetype, Mxft): Extern them.
1506 (mfont_resize_ratio): Extern it.
1507 (MDrawGlyphInfo): New member logical_width;
1508 (MDrawGlyph): New type.
1509 (mdraw_glyph_list): Prototype adjusted.
1511 * m17n-X.c (xfont_open): Set type and fontp members.
1512 (xft_open): Likewise.
1514 * internal-gui.h (Mx, Mfreetype): Delete extern.
1516 * font.h (struct MRealizedFont): New member type and fontp.
1518 * font.c (mfont__init): Initialize Mx, Mfreetype, and Mxft.
1519 (Mx, Mfreetype): Declare here.
1520 (Mxft): New variable.
1521 (mfont_resize_ratio): New function.
1523 * font-ft.c (ft_open): Set type and fontp members.
1525 * draw.c (mdraw_glyph_list): Argument type changed. Don't set
1528 2004-08-11 Kenichi Handa <handa@m17n.org>
1530 * font-ft.c (ft_find_metric): Call FT_Load_Glyph with
1533 2004-08-06 Kenichi Handa <handa@m17n.org>
1535 * font-ft.c (mfont__ft_drive_otf): Fix for the case that no GSUB
1538 * font-flt.c (run_otf): Print debugging information if necessary.
1540 2004-08-05 Kenichi Handa <handa@m17n.org>
1542 * font-ft.c (mfont__ft_drive_otf): Fix sign of g->yoff. Support
1543 positioning_type 5 and 6. Switch simplified.
1545 2004-08-04 Kenichi Handa <handa@m17n.org>
1547 * font-ft.c (mfont__ft_drive_otf): Call OTF_drive_gdef.
1549 2004-08-02 Kenichi Handa <handa@m17n.org>
1551 * font.c (mfont__score): If prop is MFONT_FOUNDRY or MFONT_FAMILY,
1552 set val to 1 even if it is greater than 1.
1554 * fontset.c (mfontset_modify_entry): Fix handling of the arg `how'.
1556 2004-07-29 Kenichi Handa <handa@m17n.org>
1558 * font-flt.c (run_rule, run_command, mfont__flt_run): Print more
1559 debugging information.
1561 * internal.h (MDEBUG_PRINT5): New macro.
1563 * draw.c (layout_glyphs): Don't combine a zero width glyph with
1564 the previous one if the zero width glyph has left or right
1567 2004-07-26 Kenichi Handa <handa@m17n.org>
1569 * m17n-X.c (xft_render): Pay attention to members left_padding and
1570 right_padding of MGlyph.
1572 * draw.c (visual_order): Allocate one more elements for arrays as
1573 a workaround of fribidi bug.
1574 (layout_glyphs): Fix previous change. Check MGlyph->combining_code
1575 instead of MGlyph->bidi_sensitive.
1576 (layout_glyph_string): Pay attentinon to
1577 control->orientation_reversed when padding at the head or tail.
1578 Fix adjustment of space glyph width.
1579 (get_gstring): If cursor_width or cursor_bidi is changed, don't
1582 * font-ft.c (mfont__ft_drive_otf): Set MGlyph->combining_code
1583 instead of MGlyph->bidi_sensitive.
1585 * internal-gui.h (MGlyph): Delete member bidi_sensitive.
1587 2004-07-26 Kenichi Handa <handa@m17n.org>
1589 * draw.c (visual_order): Don't treat combined glyphs specially.
1590 (layout_glyphs): Don't get metrics glyphs that are already ready.
1591 Pay attention to MGlyph->bidi_sensitive. Combine a glyph of zero
1592 width with the previous one.
1593 (draw_background): Fix bar cursor position on a r2l glyph.
1595 * font-flt.c (FontLayoutCmdOTF): Move back from internal-gui.h.
1596 (run_rule): Fix place of updating cluster_begin_pos and
1597 cluster_end_pos here.
1598 (run_otf): Don't set left_padding.
1600 * font-ft.c (adjust_anchor): Type of argument `code' changed.
1602 (mfont__ft_drive_otf): Renamed back from mfont__ft_drive_gsub.
1603 Fix handling of GPOS.
1604 (mfont__ft_drive_gpos): Delete this function.
1606 * font.h (mfont__ft_drive_otf): Renamed back from
1607 mfont__ft_drive_gsub.
1608 (mfont__ft_drive_gpos): Delete extern.
1610 * internal-gui.h (FontLayoutCmdOTF): Move back to font-flt.c.
1611 (MGlyph): Delete member otf_cmd, add member bidi_sensitive.
1613 2004-07-23 Kenichi Handa <handa@m17n.org>
1615 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos with glyphs of
1616 the same bidi level.
1618 * font-ft.c (mfont__ft_drive_gpos): Check bidi-level.
1620 2004-07-22 Kenichi Handa <handa@m17n.org>
1622 * font-flt.c (load_flt): Treat the symbol Mend as end-of-file.
1624 2004-07-20 Kenichi Handa <handa@m17n.org>
1626 * draw.c (render_glyphs): Fix checking of g->code validity.
1628 * face.c (mface__realize): Set g.type.
1630 2004-07-18 Kenichi Handa <handa@m17n.org>
1632 * Makefile.am: Prepend ${top_srcdir} to all *.la in
1635 * m17n-gui.c (mframe): Print error message give by dlopen to
1638 2004-07-16 Kenichi Handa <handa@m17n.org>
1640 * draw.c (compose_glyph_string): Improve the way of deciding a
1641 script. For a character that doesn't have script property, use
1642 the last non-latin script.
1644 * font-ft.c (fc_list): Cancel previous change.
1645 (mfont__ft_init): Add more entries in ft_to_prop_name.
1647 2004-07-15 Kenichi Handa <handa@m17n.org>
1649 * draw.c (mdraw_glyph_list): Add the width of padding glyphs to
1650 previous or next character glyphs.
1652 2004-07-14 Kenichi Handa <handa@m17n.org>
1654 * draw.c (compose_glyph_string): Be sure to set codes for glyphs
1655 of type GLYPH_SPACE.
1657 * fontset.c (mfont__lookup_fontset): If glyph type is
1658 GLYPH_SPACE, get codes for SPACE.
1660 * internal-gui.h (Mfont): Delete extern.
1662 * m17n-gui.h (Mfont): Delete duplicated extern.
1664 2004-07-13 Kenichi Handa <handa@m17n.org>
1666 * font-ft.c (DEVICE_DELTA): New macro.
1667 (adjust_anchor): New function.
1668 (mfont__ft_drive_gsub): Renamed from mfont__ft_drive_otf. Drive
1670 (mfont__ft_drive_gpos): New function.
1672 * font-flt.c (FontLayoutCmdOTF): Moved to internal-gui.h.
1673 (FontLayoutContext): Delete member `rfont'.
1674 (run_otf): Set g->otf_cmd. Call
1675 (mfont__flt_run): Don't set ctx.rfont. Call mfont__ft_decode_otf
1676 only whne HAVE_OTF is defined.
1678 * fontset.c: Include "config.h".
1680 * internal-gui.h (FontLayoutCmdOTF): Moved from font-flt.c.
1681 (MGlyph): New member otf_cmd.
1683 * font.h (mfont__ft_drive_gsub): Changed from mfont__ft_drive_otf.
1684 (mfont__ft_drive_gpos): Extern it.
1686 * face.c: Include "config.h".
1688 * draw.c (layout_glyphs): Call mfont__ft_drive_gpos.
1690 * input-gui.c: Include "config.h".
1692 * plist.c: Include "config.h".
1694 2004-07-06 Kenichi Handa <handa@m17n.org>
1696 * m17n-gui.c, m17n-gui.h, m17n-gd.c, m17n-X.h, m17n-X.c,
1697 internal-gui.h: Cancel previous changes.
1699 * m17n-gd.h: Delete it.
1701 * Makefile.am (libm17n_core_la_LIBADD): New variable.
1702 (libm17n_core_la_LDFLAGS): Add -export-dynamic, move
1703 @XML2_LD_FLAGS@ to above.
1704 (libm17n_la_LIBADD): Add -ldl.
1705 (libm17n_la_LDFLAGS): Add -export-dynamic.
1706 (X_LD_FLAGS): Fix the order of linking.
1707 (libm17n_gui_la_LIBADD): Add ${OPTIONAL_LD_FLAGS}.
1708 (libm17n_gui_la_LDFLAGS): Add -export-dynamic, delete above.
1709 (libm17n_X_la_LDFLAGS): Add -module.
1710 (libm17n_gd_la_SOURCES): Delete m17n-gd.h.
1711 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
1712 (libm17n_gd_la_LDFLAGS): Add -module.
1713 (include_HEADERS): Delete m17n-gd.h.
1715 2004-06-30 Kenichi Handa <handa@m17n.org>
1717 * m17n-gui.c: Adjusted for the change of struct MDeviceDriver.
1718 (MDeviceLibraryInterface): Delete it.
1719 (register_device_library): Delete it.
1720 (m17n__device_library_list): Renamed from device_library_list.
1722 * m17n-gui.h (M17N_INIT_X, M17N_INIT_GD): New macros.
1723 (m17n_init_win): Adjust prototype.
1725 * m17n-gd.c: Adjusted for the change of struct MDeviceDriver.
1726 (m17n_init_gd): New function.
1728 * m17n-gd.h: New file.
1730 * m17n-X.h: Include <m17n-gui.h>.
1731 (m17n_init_X): Extern it.
1732 (M17N_INIT): Redefine it.
1734 * m17n-X.c: Adjusted for the change of struct MDeviceDriver.
1735 (m17n_init_X): New function.
1737 * internal-gui.h (m17n__device_library_list): Extern it.
1738 (struct MDeviceDriver): New members initialized, init, and fini.
1740 * Makefile.am (libm17n_X_la_LIBADD): Add ${X_LD_FLAGS} and
1742 (libm17n_X_la_LIBADD): Delete aboves.
1743 (libm17n_gd_la_SOURCES): Add m17n-gd.h.
1744 (libm17n_gd_la_LIBADD): Add @GD_LD_FLAGS@.
1745 (libm17n_gd_la_LDFLAGS): Delete it.
1746 (include_HEADERS): Add m17n-gd.h.
1748 2004-06-25 Kenichi Handa <handa@m17n.org>
1750 * Makefile.am (libm17n_X_la_LDFLAGS): Cancel previous change.
1751 (libm17n_gd_la_LDFLAGS): Cancel previous change.
1753 * m17n-gd.c (gd_render): Don't call FT_Get_Char_Index.
1755 * font-ft.c (fc_list): If FcFontList finds no font, try
1758 * draw.c (compose_glyph_string): Terminate the last loop after
1759 doing default combining if necessary.
1761 2004-06-24 Kenichi Handa <handa@m17n.org>
1763 * draw.c (mdraw_glyph_list): Unref gstring->top at the tail.
1765 * character.c (mchar_define_property): Add const to an arg.
1767 * charset.c (mchar_define_charset): Add const to an arg.
1769 * coding.c (MCodingSystem): Add const to an arg or decoder.
1770 (finish_decoding): Add const to an arg.
1771 (decode_coding_charset, decode_coding_utf_8)
1772 (decode_coding_utf_16, decode_coding_utf_32)
1773 (decode_coding_iso_2022, decode_coding_sjis)
1774 (mconv_define_coding): Likewise.
1776 * m17n-X.c (xft_find_metric): Delete unused variable.
1778 * m17n-core.h (mchar_define_property, mtext_from_data): Adjust
1781 * m17n.h (mchar_define_charset, mconv_define_coding): Adjust
1784 * mtext.c (count_utf_8_chars, count_utf_16_chars)
1785 (mtext__from_data, mtext_from_data): Add `const' to an arg.
1787 * mtext.h (mtext__from_data): Ajust prototype.
1789 2004-06-23 Kenichi Handa <handa@m17n.org>
1791 * draw.c (compose_glyph_string): Always get glyph codes by
1793 (mdraw_glyph_info): Set info->glyph_code and info->logical_width.
1794 (mdraw_glyph_list): New function.
1796 * font-flt.c (mfont__flt_run): Be sure to call
1797 rfont->driver->encode_char.
1799 * font-ft.c (ft_find_metric): Don't call FT_Get_Char_Index.
1800 (ft_encode_char): Delete arg C.
1801 (ft_render): Don't call FT_Get_Char_Index.
1803 * font.c (mfont__encodable_p): Delete it.
1804 (mfont__encode_char): Be sure to call rfont->driver->encode_char.
1806 * font.h (struct MFontDriver): Delete arg C of encode_char.
1807 (mfont__encodable_p): Delete extern.
1809 * m17n-X.c (xfont_encode_char): Delete arg C.
1810 (xft_find_metric): Don't cal FT_Get_Char_Index.
1811 (xft_render): Likewise.
1813 * m17n-gui.h (MDrawGlyphInfo): New members glyph_code and
1815 (mdraw_glyph_list): Extern it.
1817 * Makefile.am (libm17n_X_la_LDFLAGS): Don't include ${X_LD_FLAGS}.
1819 2004-06-22 Kenichi Handa <handa@m17n.org>
1821 * m17n-gui.h (mfontset_lookup): Extern it.
1823 * m17n-gui.c (m17n_init_win): Delete unnecessary printing.
1825 * fontset.c (realize_fontset_elements)
1826 (free_realized_fontset_elements, update_fontset_elements): New
1828 (mfont__realize_fontset): Call realize_fontset_elements.
1829 (mfont__free_realized_fontset): Call free_realized_fontset_elements.
1830 (mfont__lookup_fontset): If a fontset was modified, update
1831 the realized fontset.
1832 (mfontset_modify_entry): Increment fontset->tick.
1833 (mfontset_lookup): New function.
1835 2004-06-21 Kenichi Handa <handa@m17n.org>
1837 * font-ft.c (mfont__ft_parse_name): Cast the arg to FcNameParse.
1839 * mtext.c (mtext_dup, mtext_cat, mtext_ncat, mtext_cpy)
1840 (mtext_ncpy, mtext_duplicate): Pay attention to the case that the
1841 length of source text 0.
1843 2004-06-21 Kenichi Handa <handa@m17n.org>
1845 * mtext.c (INC_POSITION): Use CHAR_UNITS_BY_HEAD_UTF16.
1846 (compare): Pay attention to format other than utf-8.
1847 (copy): Delete this function.
1848 (count_by_utf_8, count_by_utf_16, insert): New functions.
1849 (count_utf_16_chars): Fix handling of a surrogate pair.
1850 (find_char_forward, find_char_backward): Likewise.
1851 (mtext__from_data): Delete unnecessary check. Fix number of
1853 (mtext_from_data): Don't count items.
1854 (mtext_ref_char): Optimize the code.
1855 (mtext_set_char): Pay attention to format other than utf-8.
1856 (mtext_cat_char): Likewise.
1857 (mtext_dup): Don't call copy, instead do allocation here.
1858 (mtext_cat): Call insert instead of copy.
1859 (mtext_ncat): Likewise.
1860 (mtext_cpy): Delete character at first and call insert instead of
1862 (mtext_ncpy): Likewise.
1863 (mtext_copy): Likewise.
1864 (mtext_duplicate): Call insert instead of copy.
1865 (mtext_del): Pay attention to format other than utf-8.
1866 (mtext_ins): Simply call insert.
1867 (mtext_ins_char): Pay attention to format other than utf-8.
1868 (mtext_tok): Call insert instead of copy.
1869 (mtext_text): Call UNIT_BYTES.
1871 * textprop.c (mtext__adjust_plist_for_change): New function.
1873 * character.h (USHORT_SIZE, UINT_SIZE, UNIT_BYTES): New macros.
1874 (CHAR_UNITS_UTF16, CHAR_UNITS): Simplified.
1875 (CHAR_UNITS_AT): Fix typo.
1876 (CHAR_UNITS_BY_HEAD): Fix typo.
1877 (STRING_CHAR_AND_UNITS): Fix typo.
1879 * internal.h (MTEXT_READ_ONLY_P): New macro.
1881 * mtext.h (mtext__replace): Delete the extern.
1882 (mtext__adjust_foramt): Adjust prototype.
1884 * plist.c (mplist_deserialize): Adjust the format of MT to utf-8
1885 if possible. Otherwise make a copy of mmt.
1887 * coding.c (mconv_decode, mconv_gets): Adjust the format of MT to
1890 2004-06-18 Kenichi Handa <handa@m17n.org>
1892 * character.h (CHAR_STRING_UTF16): Fix syntax.
1894 2004-06-16 Kenichi Handa <handa@m17n.org>
1896 * Makefile.am (libm17n_gd_la_LIBADD): Delete it.
1897 (libm17n_X_la_LIBADD): Delete it.
1898 (libm17n_gd_la_LDFLAGS): Don't include @GD_LD_FLAGS@.
1900 * m17n-X.c (device_open): Add parens in `if' condition.
1902 * mtext.c (INC_POSITION): Handle format other than utf8 and utf16.
1903 (DEC_POSITION): Likewise.
1904 (compare): Fix case that mt1->format is MTEXT_FORMAT_UTF_8.
1906 2004-06-15 Kenichi Handa <handa@m17n.org>
1908 * fontset.c (mfont__lookup_fontset): Fix selection of font groups
1911 * draw.c (compose_glyph_string): If langauge is specified, call
1912 mface__for_chars even if a text is all latin. Fix condition for
1913 setting non_ascii_found.
1915 * m17n-X.c (xft_find_metric): Fix setting of g->lbrearing.
1917 * m17n.h (minput_char_to_key): Delete extern.
1919 * m17n-gui.h (minput_event_to_key): Cancel previous change.
1921 * m17n-gui.c (null_device_open): Set several members of frame.
1923 2004-06-14 Kenichi Handa <handa@m17n.org>
1925 * m17n-gui.h (minput_event_to_key): Delete extern.
1927 * symbol.h (struct MSymbolStruct): Renamed from MSymbol.
1929 * m17n-core.h (MSymbol): Defined as "struct MSymbolStruct *".
1931 * Makefile.am (AM_CPPFLAGS): Refer to @M17NDIR@.
1933 2004-06-08 Kenichi Handa <handa@m17n.org>
1935 * character.c (mchar_put_prop): Don't increment the ref-count of
1938 2004-06-04 Kenichi Handa <handa@m17n.org>
1940 * m17n-core.c (mdebug__register_object): New function.
1941 (mdebug__unregister_object): Likewise.
1943 * internal.h (mdebug__register_object, mdebug__unregister_object):
1945 (M17N_OBJECT_REGISTER, M17N_OBJECT_UNREGISTER): Call them
1948 * charset.c (mcharset__load_from_database): Don't call
1949 mconv__register_charset_coding here.
1951 * coding.c (find_coding): Get a real name from an element of
1952 coding_definition_list.
1953 (mconv__register_charset_coding): Set the real name at the top of
1955 (mcoding__load_from_database): Likewise.
1956 (mconv_list_codings): Adjusted for the above change.
1958 2004-06-03 Kenichi Handa <handa@m17n.org>
1960 * coding.c (find_coding): Find by canonicalized name. Don't have
1961 to modify the element of coding_definition_list by
1963 (mconv__define_coding_from_charset): Delete it.
1964 (mconv__register_charset_coding): Canonicalize sym.
1965 (mcoding__load_from_database): Register plist modified by
1968 * coding.h (mconv__define_coding_from_charset): Don't extern it.
1970 * font-ft.c (ft_open): Fix setting of rfont->descent.
1972 2004-06-02 Kenichi Handa <handa@m17n.org>
1974 * font.c (enum xlfd_field_idx): Moved from m17n-X.c.
1975 (xlfd_parse_name): Merge split_font_name and xfont_parse_name.
1976 (xlfd_unparse_name): Renamed from xfont_build_name.
1977 (mfont__init): Initialized Mfontconfig.
1978 (mfont__free_realized): Unconditionally unref rfont->info.
1979 (mfont__select): Free `this' if it's not best.
1980 (mfont__open): Don't check frame->realized_font_list.
1981 (mfont__parse_name_into_font): New function.
1982 (Mfontconfig): New variable.
1983 (mfont_from_name): Call mfont_parse_name.
1984 (mfont_name): Call mfont_unparse_name.
1985 (mdebug_dump_font): Likewise.
1987 * font.h (struct MFontDriver): Delete members parse_name and
1989 (mfont__ft_parse_name, mfont__ft_unparse_name): Extern them.
1990 (mfont__parse_name_into_font): Extern it.
1992 * font-ft.c: Include "symbol.h".
1993 (close_ft): Unconditionally free filename and charmap_list of
1995 (ft_open): Duplicate base->filename. Increment ref-count of
1996 ft_info->charmap_list. Free ft_info->charmap_list and
1997 ft_info->filename on error.
1998 (mfont__ft_parse_name, mfont__ft_unparse_name): New functions.
2000 * m17n-X.c (xfont_driver): Don't include xfont_parse_name and
2002 (enum xlfd_field_idx): Moved to font.c.
2003 (split_font_name, build_font_name): Likewise.
2004 (build_font_list): Call mfont__parse_name_info_font.
2005 (xfont_open): Call mfont__unparse_name. Free name.
2006 (xfont_parse_name, xfont_build_name): Moved to font.c
2007 (xft_select): Prototype deleted.
2008 (device_open): Check HAVE_FREETYPE on using mfont__ft_driver.
2009 Call mfont_pase_name.
2011 * m17n-gui.c (free_frame): Unref frame->font_driver_list.
2012 (m17n_fini_win): Add check HAVE_FREETYPE on using null_interface.
2015 * m17n-gui.h (mfont_parse_name, mfont_unparse_name, Mfontconfig):
2018 * Makefile.am (linkgui_LDADD): Add libm17n-X.la and libm17n-gd.la.
2020 2004-06-01 Kenichi Handa <handa@m17n.org>
2022 * fontset.c (mfontset_modify_entry): Pay attention to the case
2023 that fontset->font_spec_list is NULL.
2025 2004-05-31 Kenichi Handa <handa@m17n.org>
2027 * m17n-gui.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
2029 * input.c: Include <dlfcn.h> only when HAVE_DLFCN_H is defined.
2031 * font.c (mfont__select): Print score the a font for debugging.
2033 * Makefile.am (libm17n_la_LIBADD): Delete -ldl.
2035 * coding.c (reset_coding_sjis): Check kanji and kana instead of
2036 kanji_sym and kana_sym.
2038 2004-05-28 Kenichi Handa <handa@m17n.org>
2040 * Makefile.am (VINFO): New variable.
2041 (libm17n_core_la_LDFLAGS, libm17n_la_LDFLAGS)
2042 (libm17n_gd_la_LDFLAGS): Include ${VINFO}.
2044 2004-05-27 Kenichi Handa <handa@m17n.org>
2046 The following chanages are to make device dependent functions
2047 accessible only from MDeviceDriver structure, and to add GD and
2048 null device drivers. Font drivers get also device dependent.
2050 * m17n.c (m17n_init): Increament shell_initialized.
2051 (m17n_fini): Decremented shell_initialized.
2053 * m17n-misc.h (enum MErrorCode): New element MERROR_GD.
2055 * m17n-gui.h (Mdevice, Mdisplay, Mscreen, Mdrawable, Mdepth)
2056 (Mwidget, Mcolormap, Mx): Extern them.
2058 * m17n-gui.c: Include <dlfcn.h> and "config.h".
2059 (free_frame): Call frame->driver->close instead of
2061 (DLOPEN_SHLIB_EXT): New macro.
2062 (MDeviceLibraryInterface): New type.
2063 (device_library_list): New variable.
2064 (register_device_library): New function.
2065 (null_device): New variable.
2066 (null_device_close, null_device_get_prop)
2067 (null_device_realize_face, null_device_free_realized_face): New
2069 (null_driver): New variable.
2070 (null_device_init, null_device_fini, null_device_open): New
2072 (null_interface): New variable.
2073 (Mfreetype, Mdevice): Declare them.
2074 (m17n_init_win): Increment win_initialized. Initialize Mx, Mgd,
2075 Mfreetype, Mdevice, Mdisplay, Mscreen, Mdrawable, Mdevice, and
2076 Mwin__Close_Device. Register drivers for Mx and Mgd.
2077 (m17n_fini_win): Decremented win_initialized. Call "fini"
2078 function of all opened devices. Don't call mwin__fini.
2079 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap):
2081 (mframe): Handle Mdevice key of PLIST.
2082 (mframe_get_prop): Call frame->device->get_prop instead of
2083 mwin__device_get_prop.
2085 * m17n-gd.c: New file.
2087 * m17n-core.h (M17NLIB_MAJOR_VERSION, M17NLIB_MINOR_VERSION)
2088 (M17NLIB_PATCH_LEVEL, M17NLIB_VERSION_NAME): Updated to 1.1.0.
2090 * m17n-core.c (m17n_init_core): Increate core_initialized.
2091 (m17n_fini_core): Decremented core_initialized.
2093 * m17n-X.h (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget)
2094 (Mcolormap): Don't extern them here.
2096 * m17n-X.c (FRAME_DEVICE): New macro.
2097 (FRAME_DISPLAY, FRAME_SCREEN, FRAME_CMAP): Use FRAME_DEVICE.
2098 (free_display_info): Use MPLIST_DO.
2099 (free_device): Free rface->info.
2100 (xft_close): Delete it.
2101 (device_init): Renamed from mwin__init.
2102 (device_fini): Renamed from mwin__fini.
2103 (device_open): Renamed from mwin__open_device.
2104 (x_driver): New variable.
2105 (MXFontInfo): Delete member frame, add member display.
2106 (Mdisplay, Mscreen, Mdrawable, Mdepth, Mwidget, Mcolormap, Mxim):
2107 Don't declare them here.
2109 * internal-gui.h (MDeviceType): New enum.
2110 (MWDefice): Delete it.
2111 (struct MFrame): Change type of device to void *. New members
2112 device_type, driver, font_driver_list.
2113 (M_CHECK_WRITABLE, M_CHECK_READABLE): New macros.
2114 (MDeviceDriver): New type.
2115 (Mx, Mgd, Mfreetype): Extern them.
2116 (mwin__XXX): Delete all of them.
2118 * input-gui.c (win_create_ic): Call frame->driver->XXX instead of
2120 (win_destroy_ic): Likewise.
2121 (adjust_window_and_draw): Likewise.
2122 (win_callback): Likewise.
2123 (Mxim): Declare it here.
2124 (minput_event_to_key): Call M_CHECK_READABLE.
2126 * fontset.c (mfont__lookup_fontset): Delete local variable
2129 * font.h (struct MFontDriver): Delete member close, add members
2130 parse_name and build_name.
2131 (mfont__driver_list): Delete extern.
2132 (mfont__close): Delete extern.
2134 * font.c (mfont__init): Don't set mfont__driver_list.
2135 (mfont__fini): Don't unref mfont__driver_list.
2136 (mfont__select): Try font drivers in frame->font_driver_list. Set
2137 driver member of a realized font.
2138 (mfont__close): Delete it.
2139 (mfont_from_name, mfont_name, mdebug_dump_font): Call driver
2140 functions of the default frame.
2142 * font-ft.c (close_ft): Check ft_info->ft_face and work
2144 (add_font_info): Allocate ft_info by M17N_OBJECT.
2145 (ft_close): Delete it.
2146 (mfont__ft_driver): Don't set ft_close.
2147 (ft_select): Increment ref-count of best_font.
2148 (ft_open): Decremented ref-count of base. On error, call
2149 FT_Done_Face and free ft_info.
2150 (ft_find_metric): Always use XXX_MONO in load_flags.
2151 (ft_render): Fix setting of width. Call
2152 frame->driver->draw_points instead of mwin__draw_points.
2153 (ft_to_prop): Don't set mfont__driver_list.
2154 (mfont__ft_fini): Just unref ft_info.
2156 * face.c (mface__init): Exchange foreground and background of
2157 mface__default. Call mface_put_prop to set hline of
2159 (mface__realize): Call frame->driver->XXX instead of mwin__XXX.
2160 (mface__free_realized): Don't call mwin__free_realized_face.
2162 * draw.c (Mdepth): Don't declare it here.
2163 (draw_background): Call frame->driver->XXX instead of mwin__XXX.
2164 (render_glyphs, render_glyph_string): Likewise.
2165 (mdraw__init): Don't set Mdepth.
2166 (mdraw_text, mdraw_image_text, mdraw_text_with_control): Call
2168 (mdraw_text_per_char_extents): Return 0 on success and -1 on
2170 (mdraw_text_items): Check FRAME is writable.
2171 (mdraw_per_char_extents): Implement body.
2173 * Makefile.am (lib_LTLIBRARIES): Include libm17n-gui.la and
2175 (OPTIONAL_LD_FLAGS): Include @FONTCONFIG_LD_FLAGS@.
2176 (GUI_SOURCES): Delete it.
2177 (libm17n_X_la_SOURCES): Don't include ${GUI_SOURCES}.
2178 (libm17n_gui_la_SOURCES, libm17n_gui_la_LIBADD)
2179 (libm17n_gui_la_LDFLAGS, libm17n_gd_la_SOURCES)
2180 (libm17n_gd_la_LIBADD, libm17n_gd_la_LDFLAGS): New targets.
2181 (linkgui_LDADD): Set to libm17n-gui.la
2182 (linkgui_LDFLAGS): New target.
2183 (SRC): Include ${libm17n_gui_la_SOURCES} and
2184 ${libm17n_gd_la_SOURCES}.
2186 2004-05-24 Kenichi Handa <handa@m17n.org>
2188 * draw.c (draw_background): Don't draw background even if
2189 rface->face.property[MFACE_BACKGROUND] is not Mnil.
2191 2004-05-22 Kenichi Handa <handa@m17n.org>
2193 * m17n-X.c (xft_open_font): Fix anti_alias setting.
2195 2004-05-20 Kenichi Handa <handa@m17n.org>
2197 * m17n-gui.h (MFaceHookFunc): Change this function type to void.
2199 * m17n-gui.c: Include "plist.h".
2200 (mframe): If PLIST is NULL, initialize it to emply plist.
2202 * m17n-X.c (build_font_list): Don't set property[MFONT_TYPE].
2203 (xft_driver): New variable.
2204 (xft_select, close_xft, xft_open_font, xft_open, xft_close)
2205 (xft_find_metric, xft_render): New function.
2206 (mwin__init): Adjusted for the new mfont__driver_list.
2207 (mwin__open_device): Assume arg PARAM is not NULL. Push a newly
2208 generated face to PARAM.
2209 (mwin__realize_face): Fix setting of box colors. Don't call hook
2211 (mwin__draw_hline): New function.
2212 (mwin__xft_close, mwin__xft_open, mwin__xft_get_metric)
2213 (mwin__xft_render): Delete these function.
2215 * internal-gui.h (struct MFrame): New member tick.
2216 (struct MGlyphString): New member tick.
2217 (mwin__draw_rect, mwin__draw_empty_boxes): Extern them.
2218 (mwin__xft_open, mwin__xft_close, mwin__xft_get_metric)
2219 (mwin__xft_render): Delete extern.
2221 * fontset.c (mfont__lookup_fontset): Make the code simpler.
2222 (mfontset): Always increment the reference count of returned
2225 * font-ft.c (mfont__ft_fini): Don't include <otf.h> here.
2226 (MFTInfo): Moved to font.h.
2227 (ft_iso8859_1_font_list): Delete this variable.
2228 (set_font_info): Don't set font->property[MFONT_TYPE].
2229 (set_font_info): Don't udpate ft_iso8859_1_font_list.
2230 (add_font_info): Change type to void.
2231 (fc_list): Change anme from xft_list. Caller changed. Include
2232 FC_FOUNDRY and FC_PIXEL_SIZE in FcObjectSet.
2233 (mfont__ft_driver): Change name from ft_driver. Caller changed.
2234 (ft_select): Check HAVE_FONTCONFIG instead of HAVE_XFT2.
2235 (close_ft): Don't call mwin__xft_close. Unref
2236 ft_info->extra_info.
2237 (ft_open): Don't setup ft_info->fontname. Don't call
2239 (ft_find_metric): Don't call mwin__xft_get_metric.
2240 (ft_encode_char): Call rfont->driver->open instead of ft_open.
2241 (ft_render): Don't check HAVE_XFT2. Don't call mwin__xft_render.
2242 (mfont__ft_init): Adjusted for new mfont__driver_list.
2243 (mfont__ft_fini): Don't unref ft_iso8859_1_font_list.
2245 * font.c (mfont__driver_list): Make it MPlist.
2246 (mfont__init): Adjust initialization of mfont__driver_list.
2247 (mfont__fini): Free mfont__driver_list.
2248 (mfont__set_spec_from_face): Don't set spec->property[MFONT_TYPE].
2249 (mfont__select): Adjusted for the new mfont__driver_list.
2251 * font.h (enum MFontProperty): Delete MFONT_TYPE.
2252 (mfont__drirver_list): Adjust prototype.
2253 (MFTInfo): Move to here from fron.c. Deleve member fontname.
2255 * face.h (struct MFace): Delete member realized_face_list, add
2257 (struct MRealizedFace): Delete member need_update
2258 andnofont_rface, add member non_ascii_list.
2259 (mface__update_frame_face): Extern it.
2261 * face.c (hline_prop_list, box_prop_list, noop_hook): New
2263 (get_hline_create, get_box_create): New functions.
2264 (find_realized_face): Cancel previous change. Arg RFONT deleted.
2266 (free_face): Cancep previous change. Free face->frame_list.
2267 (serialize_hline): Do nothing if hline->width is zero.
2268 (serialize_box): Do nothing if box->width is zero.
2269 (mface__init): Setup all properties of mface__default.
2270 (mface__fini): Free hline_prop_list and box_prop_list.
2271 (mface__realize): Cancel previous change. Update
2272 face->frame_list. Setup rface->non_ascii_list.
2273 (mface__for_chars): Update rface->non_ascii_list.
2274 (mface__free_realized): Free rface->non_ascii_list.
2275 (mface__update_frame_face): New function.
2276 (mface): Initialize face->frame_list.
2277 (mface_copy): Likewise. Just copy MFACE_HLINE and MFACE_BOX
2279 (mface_merge): Likewise.
2280 (mface_put_prop): If key is Mhline or Mbox, get value by
2281 get_hline_create or get_box_create respectively.
2282 (mface_put_prop): Update frame->tick and call
2283 mface__update_frame_face if necessary.
2284 (mface_update): Do nothing if func is noop_hook.
2286 * draw.c (render_glyphs): If a font is not found, use
2287 mwin__draw_empty_boxes.
2288 (alloc_gstring): Initialize gstring->tick.
2289 (get_gstring): Check gstring->tick.
2291 2004-05-17 Kenichi Handa <handa@m17n.org>
2293 * face.c (find_realized_face): Return value changed. If RFONT is
2294 NULL, avoid unnecessary checking.
2295 (free_face): Free face->realized_face_list.
2296 (mface__realize): Adjusted for the change of find_realized_face.
2297 If it returns a realized face that needs update, free it and
2298 realize a new one. Push a new realized face to
2299 frame->realized_face_list instead of appending.
2300 (mface__for_chars): Adjusted for the change of find_realized_face.
2301 Short cut if the required font is in rface->ascii_rface.
2302 (mface_put_prop): Free old value if necessary. Set need_update
2303 member of realized faces to 1.
2305 * face.h (struct MFace): Delete member tick, add member
2307 (struct MRealizedFace): Delete member tick, add member
2310 2004-05-13 Kenichi Handa <handa@m17n.org>
2312 * m17n-X.c (mwin__xft_open): Destroy unnecessary patterns.
2314 2004-05-12 Kenichi Handa <handa@m17n.org>
2316 * internal-gui.h (mwin__xft_open): Arguemnt name changed.
2318 * m17n-X.c (mwin__xft_open): Argument changed to fontname and
2319 parse it XftNameParse.
2321 * font-ft.c (MFTInfo) [HAVE_XFT2]: New member fontname.
2322 (all_fonts_scaned): New variable.
2323 (set_font_info): FAMILY may be Mnil.
2324 (add_font_info): Argument changed.
2325 (xft_list): Call add_font_info in it.
2326 (ft_list): Likewise.
2327 (ft_select): Make it work in the case family is Mnil.
2328 (ft_open) [HAVE_XFT2]: Setup ft_info->fontname.
2329 (mfont__ft_fini): Set all_fonts_scaned to 0.
2331 * fontset.c (mfont__lookup_fontset): Don't repeatedly try a font
2332 that is failed to open.
2334 2004-05-10 Kenichi Handa <handa@m17n.org>
2336 * m17n-X.c (mwin__xft_render): Don't use anti-alias if the
2337 device's depth is 1 (i.e. monochrome).
2339 * Makefile.am (OPTIONAL_LD_FLAGS): Change the order of elements
2340 to work around the problem of libtool.
2342 * font-ft.c: Include <freetype/ftbdf.h>.
2343 (Municode_bmp, Municode_full, Miso10646_1, Miso8859_1): New
2345 (mfont__ft_init): Initialize them.
2346 (ft_iso8859_1_font_list): New variable.
2347 (set_font_info): Detect a font containing iso8859-1 glyphs and
2348 register it in ft_iso8859_1_font_list. If the font is not
2349 scalable, assume it as BDF or PCF font and setup SIZE and RESY
2350 properties of the font from its properties.
2351 (add_font_list): If the font is not scalable, check if it is BDF
2352 or PCF font. If not, ignore it.
2353 (ft_select): If FAMILY is Mnil, return NULL only if the requested
2354 registry is not iso8859-1.
2355 (ft_select) [not HAVE_XFT2]: If FAMILY is Mnil, select one from
2356 ft_iso8859_1_font_list.
2357 (ft_find_metric): If the font is not scalable, assume it as BDF
2358 or PCF, and get a metric from its properties.
2359 (mfont__ft_fini): Free ft_iso8859_1_font_list.
2361 2004-05-07 Kenichi Handa <handa@redhat.m17n.org>
2363 * Makefile.am (libm17n_la_LIBADD): Include -ldl.
2364 (libm17n_la_LDFLAGS): Delete it.
2365 (noinst_PROGRAMS): Renamed from bin_PROGRAMS.
2366 (install-binPROGRAMS, uninstall-binPROGRAMS): Delete them.
2368 2004-05-06 Kenichi Handa <handa@m17n.org>
2370 * draw.c (compose_glyph_string): Fix previous change.
2372 2004-04-30 Kenichi Handa <handa@m17n.org>
2374 * font-ft.c (ft_list): Delete unused variable `result'.
2375 (ft_render): Fix for the case that bitmap.pitch < bitmap.width.
2377 2004-04-27 Kenichi Handa <handa@m17n.org>
2379 * m17n-X.c: Include config.h
2380 [HAVE_XFT2]: Include <X11/Xft/Xft.h>.
2381 (GCInfo) [HAVE_XFT2]: New member xft_color_fore, xft_color_back.
2382 (MWDevice) [HAVE_XFT2]: New member xft_draw.
2383 (FRAME_CMAP, FRAME_VISUAL): New macros.
2384 (free_device) [HAVE_XFT2]: Destroy device->xft_draw.
2385 (xfont_driver): Make it static.
2386 (mwin__open_device) [HAVE_XFT2]: Setup device->xft_draw.
2387 (mwin__realize_face) [HAVE_XFT2]: Setup info->xft_color_fore and
2388 info->xft_color_back.
2389 (MXftFontInfo) [HAVE_XFT2]: New type.
2390 (mwin__xft_close) [HAVE_XFT2]: New function.
2391 (mwin__xft_open) [HAVE_XFT2]: New function.
2392 (mwin__xft_get_metric) [HAVE_XFT2]: New function.
2393 (mwin__xft_render) [HAVE_XFT2]: New function.
2395 * internal-gui.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
2396 (mwin__xft_open, mwin__xft_close) [HAVE_FREETYPE]: New externs.
2397 (mwin__xft_get_metric, mwin__xft_render) [HAVE_FREETYPE]: New
2400 * font.h [HAVE_FREETYPE]: Include FT_FREETYPE_H.
2402 * font-ft.c: Don't include FT_FREETYPE_H here.
2403 [HAVE_XFT2]: Include <fontconfig/fontconfig.h>.
2404 (fontconfig_initialized, fc_config) [HAVE_XFT2]: New variables.
2405 (MFTInfo): New member charmap_index.
2406 (MFTInfo) [HAVE_XFT2]: New member xft_info.
2407 (check_otf_filename): Renamed from check_filename. Return value
2409 (ft_set_property): This function deleted.
2410 (set_font_info): New function.
2411 (add_font_list): Argument changed. Add multiple fonts.
2412 (xft_list) [HAVE_XFT2]: New function.
2413 (ft_list) [not HAVE_XFT2]: New function.
2414 (ft_select): Add code for Xft.
2415 (close_ft): Likewise.
2416 (ft_open): Likewise.
2417 (ft_find_metric): Likewise.
2418 (ft_encode_char): Likewise.
2419 (ft_render): Likewise.
2421 * makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@.
2423 2004-04-26 Kenichi Handa <handa@m17n.org>
2425 * textprop.c (mtext_attach_property): Declare the return type as
2428 2004-04-21 Kenichi Handa <handa@m17n.org>
2430 * Makefile.am (OPTIONAL_LD_FLAGS): Include @XFT2_LD_FLAGS@
2432 2004-04-09 Kenichi Handa <handa@m17n.org>
2434 * font-flt.c (struct): New members seq_beg, seq_end, seq_from,
2436 (load_command): Setup above members.
2438 2004-04-05 Kenichi Handa <handa@m17n.org>
2440 * m17n-X.c (xfont_encode_char): Fix checking of byte1 and byte2.
2442 2004-03-30 Kenichi Handa <handa@m17n.org>
2444 * m17n-X.c (xfont_encode_char): Return MCHAR_INVALID_CODE if code
2447 * m17n-core.h (M17NLIB_PATCH_LEVEL): Changed to 2.
2448 (M17NLIB_VERSION_NAME): Changed to 1.0.2.
2450 2004-03-29 Kenichi Handa <handa@m17n.org>
2452 * Version 1.0 Patch Level 2 released.
2454 2004-03-29 Kenichi Handa <handa@m17n.org>
2456 * charset.c (make_charset): Set charset->fully_loaded and
2457 charset->simple correctly. Don't try to get charset->min_char and
2458 charset->max_char for a charset of method subset and superset.
2459 Don't load a mapping file here.
2460 (mcharset__init): Set unified_max.
2461 (mcharset__load_from_database): Free a working plist.
2463 * coding.c (mcoding__fini): Free all malloced data.
2465 * input-gui.c (win_create_ic): Set control.as_image for preediting
2468 * internal.h (M17N_OBJECT_REGISTER): Check the member `used' (not
2469 `count') to initialize the array.
2471 * locale.c (mlocale_set): Fix the order of M17N_OBJECT_REF and
2474 * m17n-X.c (xfont_render): If rface->rfont is null, draw a
2476 (mwin__create_window): Fix bug of setting a background pixel of a
2478 (mwin__adjust_window): Clear the window before drawing.
2480 * m17n-core.c (mdebug__report_object): Free array->objectes if
2482 (m17n_init_core): Don't set report_header_printed to 0 here.
2483 Fix debugging information.
2484 (m17n_fini_core): Set report_header_printed to 0 here.
2486 * m17n-core.h (mplist_deserialize): Extern it.
2488 * m17n-gui.c (m17n_fini_win): Fix debugging information.
2490 * m17n.c (m17n_fini): Fix debugging information.
2492 * mtext.c (mtext__adjust_foramt): New function.
2494 * mtext.h (mtext__adjust_foramt): Extern it.
2496 * plist.c (mplist_deserialize): Renamed from mplist__deserialize.
2498 * plist.h (mplist__deserialize): Don't extern it.
2500 * symbol.c (msymbol__fini): Set freed_symbols to 0. Set all
2501 elements of symbol_table to NULL. Report about created and freed
2502 symbols if MDEBUG_FINI is set.
2504 2004-03-22 Kenichi Handa <handa@m17n.org>
2506 * m17n-core.c (m17n_init_core): Set merror_code to MERROR_NONE.
2508 * m17n.c (m17n_init): Fix the way of checking merror_code.
2510 * m17n-gui.c (m17n_init_win): Fix the way of checking merror_code.
2512 2004-03-22 Kenichi Handa <handa@m17n.org>
2514 * fontset.c (realize_font_group): Adjust the font size by
2515 mfont__resize before selecting a font.
2517 * font-ft.c (mfont__ft_init): Add oblique and boldoblique.
2519 2004-03-19 Kenichi Handa <handa@m17n.org>
2521 * Version 1.0 Patch Level 1 released.
2523 2004-03-19 Kenichi Handa <handa@m17n.org>
2525 * m17n-core.h (M17NLIB_PATCH_LEVEL): New macro.
2527 * m17n-core.c (M17NLIB_PATCH_LEVEL): Describe it.
2529 2004-03-19 Kenichi Handa <handa@m17n.org>
2531 Re-apply the changes forgotten in the released version.
2533 * charset.c (mcharset__load_from_database): Call
2534 mchar_define_charset.
2536 * coding.c (encode_unsupporeted_char): Put Mcoding text property.
2537 (mconv_encode_range): Put Mcoding text property.
2539 2004-03-18 Kenichi Handa <handa@m17n.org>
2541 * draw.c (Mdepth): New variable.
2542 (visual_order): Delete unused local var `pos'.
2543 (compose_glyph_string): Fix for the case that gstring->glyphs is
2544 realloced. Stop generating glyphs at TO. Fix handling of
2546 (layout_glyphs): Get metrics of all glyphs in advance. Set
2547 lbearing and rbearing of base of composition glyph correctly.
2548 Handle left-overhang glyphs correctly.
2549 (alloc_gstring): New arg frame. Set gstring->anti_alias. Caller
2551 (dump_combining_code): Change the defualt off_x character to ".".
2552 (mdraw__init): Initialize Mdepth.
2554 * face.c (work_gstring): New variable
2555 (mface__init): Initialize work_gstring.
2556 (mface__fini): Free work_gstring.glyphs.
2557 (mface__realize): Don't handle videomode property here. Adjusted
2558 for the change of mfont__get_metric.
2559 (mface__for_chars): Adjusted for the change of mfont__get_metric.
2561 * face.h (enum face_gc): Moved to m17n-X.c.
2563 * font.h (struct MFontDriver): Arguments of find_metric changed.
2564 (mfont__select): Prototype adjusted.
2565 (mfont__get_metric): Likewise.
2566 (mfont__ft_drive_otf): Likewise.
2567 (mfont__flt_run): Likewise.
2569 * font.c (mfont__select): New argument layouter. If layouter is
2570 different in the registered font, make a new copy of realized
2572 (mfont__get_metric): Argument changed. Get metrics of multiple
2574 (mfont_find): Call mfont__select with layouter as Mnil.
2576 * font-flt.c (FontLayoutContext): New member rfont.
2577 (run_otf): Adjusted for the change of mfont__ft_drive_otf.
2578 (mfont__flt_run): Argument changed. Initialize ctx.rfont.
2580 * font-ft.c (ft_find_metric): Arguments changed. Get metrics of
2582 (NUM_POINTS): New macro.
2583 (MPointTable): New type.
2584 (ft_render): Use mwin__draw_points instead of mwin__draw_bitmap.
2585 (mfont__ft_drive_otf): New argument rfont.
2587 * fontset.c (realize_font_group): Adjusted for the changed of
2589 (check_fontset_element): This function deleted.
2591 * input-gui.c (adjust_window_and_draw): Locate a preedit window
2592 off the parent window if the preedit text is zero length.
2594 * internal-gui.h (struct MFrame): New members foreground,
2595 background, videomode, font.
2596 (struct MGlyphString): New member anti_alias.
2597 (MDrawPoint): New type.
2598 (mwin__draw_bitmap): Prototype deleted.
2599 (mwin__draw_points): Prototype added.
2601 * m17n-gui.h (MDrawControl): New member anti_alias.
2603 * m17n-gui.c (free_frame): Free frame->font.
2604 (mframe): Set the fontset of frame->face to the default fontset.
2606 * m17n-X.c (RGB_GC): New type.
2607 (enum gc_index): Renamed from enum face_gc. Member names changed.
2609 (struct MWDevice): Members foreground and background deleted. New
2610 member scratch_gc, gc_list.
2611 (DEFAULT_FONT, FALLBACK_FONT): New macros.
2612 (free_device): Free GCs in device->gc_list.
2613 (get_rgb_gc): New function.
2614 (get_gc): Renamed and argument changed from get_color.
2615 (get_gc_for_anti_alias): New function.
2616 (xfont_find_metric): Arguments changed. Get metrics of multiple
2618 (set_region): Argument changed. Caller changed.
2619 (xfont_render): Allways set a font in gc.
2620 (x_error_handler, x_io_error_handler): Define only if
2621 X_SET_ERROR_HANDLER is defined.
2622 (mwin__open_device): Create device->scratch_gc. Set members
2623 foreground, background, and videomode of frame. Call
2624 XSetErrorHandler and XSetIOErrorHandler only if
2625 X_SET_ERROR_HANDLER is defined.
2626 (struct gc_list): Deleted.
2627 (REGISTER_GC, UNREGISTER_GC): These macros deleted.
2628 (mwin__realize_face): Adjusted for the change of the format of
2629 rface->info and the charge of set_region.
2630 (mwin__free_realized_face, mwin__fill_space, mwin__draw_hline)
2631 (mwin__draw_box): Likewise.
2632 (mwin__draw_bitmap): This function deleted.
2633 (mwin__draw_points): New function.
2634 (mwin__verify_region): Adjusted for the change of the format of
2635 rface->info and the charge of set_region.
2636 (mwin__create_window): Inherit backgound pixel from parent.
2637 (mwin__dump_gc): Adjusted for the change of the format of
2640 2004-03-16 Kenichi Handa <handa@m17n.org>
2642 * m17n-X.c (mwin__parse_event): Fix handling of modifier keys.
2644 * input.c (M_key_alias): New variable.
2645 (handle_key): Try M_key_alias property of a key too.
2646 (minput__init): Initialize M_key_alias. Give that property to
2647 symbols in one_char_symbol. Fix bug of initializing
2650 * draw.c (compose_glyph_string): Don't handle
2651 ignore_formatting_char here. Include formatting characters in the
2652 range processed by a FTL.
2653 (layout_glyph_string): Handle ignore_formatting_char here.
2655 2004-03-12 Kenichi Handa <handa@m17n.org>
2657 * input-gui.c (win_create_ic): Enable bidi in status control.
2659 * draw.c (visual_order): Avoid re-ordering of combining glyphs only.
2661 2004-03-09 Kenichi Handa <handa@m17n.org>
2663 * input.c (load_input_method): If title is not specified, use the
2664 input method name as title.
2666 * m17n-X.c (get_color): Make it static.
2667 (xim_create_ic, xim_destroy_ic, x_error_handler)
2668 (x_io_error_handler): Likewise.
2670 2004-03-01 Kenichi Handa <handa@m17n.org>
2672 * Version 1.0 released.
2675 Copyright (C) 2003, 2004
2676 National Institute of Advanced Industrial Science and Technology (AIST)
2677 Registration Number H15PRO112
2679 This file is part of the m17n library.
2681 The m17n library is free software; you can redistribute it and/or
2682 modify it under the terms of the GNU Lesser General Public License
2683 as published by the Free Software Foundation; either version 2.1 of
2684 the License, or (at your option) any later version.
2686 The m17n library is distributed in the hope that it will be useful,
2687 but WITHOUT ANY WARRANTY; without even the implied warranty of
2688 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2689 Lesser General Public License for more details.
2691 You should have received a copy of the GNU Lesser General Public
2692 License along with the m17n library; if not, write to the Free
2693 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA