[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[mgp-users-jp 01400] Re: wrong rendering with libm17n (Forward: Bug#302348: acknowledged by developer (Bug#302348: fixed in mgp 1.11b-2))



> Date: Tue, 26 Apr 2005 23:44:26 -0700
> From: Jeffery von Ronne <jronne@ics.uci.edu>
> To: 302348@bugs.debian.org
[...]
> On Tue, Apr 19, 2005 at 10:03:19AM -0700, Debian Bug Tracking System wrote:
>>  We believe that the bug you reported is fixed in the latest version of
>>  mgp, which is due to be installed in the Debian FTP archive:
[...]
>>  Changes: 
>>   mgp (1.11b-2) unstable; urgency=low
>>   .
>>     * build with --with-m17n-lib
>>       add build-depends: libm17n-dev
>>       closes: Bug#302348

> This does add working UTF-8 support but it also results in several
> serious regressions:
>   1. the xfont directives are being silently ignored and some
>      other font is being substituted instead
>   2. the quality of the font rendering is much worse
>   3. wrapping of multi-line paragraphs is broken
>      (a) centered paragraphs get left justified
>      (b) paragraphs spliced together with the %cont directive don't
>          wrap all the way to the left margin, but only to the location
> 	 of the %cont directive

> I'm attaching a sample test.mgp which illustrates these issues.

Thank you for the test file.  I'll attach a patch (against
the latest CVS) to fix those problems.

Nishida-san, could you please check the patch.  Here's a
brief changelog.  I added copyright notice for AIST only in
m17n.c because it seems that the changes to the other files
are quite trivial.


2005-05-13  Kenichi Handa  <handa@m17n.org>

	* configure.in: Don't include "-Wl,-rpath,$i/lib" in LIBS.  Set
	HAVE_FONTCONFIG_FONTCONFIG_H if we have fontconfig/fontconfig.h.

	* m17n.c: Widely modified.  Add copyright AIST.  Delete all codes
	for caching M-text, face, and etc.  Rename all static functions to
	M17N__xxx, and all non-static functions to M17N_xxx.
	(M17N_draw_string): Use cp->ct_flag as a flag to tell what is in
	cp->ctc_value.  If cp->ct_flag is zero, cp->ctc_value points to a
	non-decoded byte sequence.  In that case, generate an M-text from
	that byte sequence, store the M-text in cp->ctc_value, and set
	cp->ct_flag to 1.

	* draw.c (process_direc) [CTL_FORE]: Call M17N_set_color if
	m17n-lib is enabled.
	(process_direc) [CLT_XFONT2]: Call M17N_set_font if m17n-lib is
	enabled.
	(process_direc) [CTL_PREFIXPOS, CTL_TEXT]: Call M17N_draw_string
	if m17n-lib is enabled.
	(draw_line_start, draw_line_end): Don't make them static.
	(draw_line_output): Don't check m17n-lib because this function is
	never called when m17n-lib is enabled.
	(draw_fragment): Likewise.
	(obj_new_mtext): Arg added (from and to).  Increment ref-count of
	mt.

	* parse.c (thirdpass): Add m17n directives only when FL_NOM17N is
	not int mgp_flag.

	* mgp.h: Several function prototypes changed.
	(struct render_object): Change struct m17ntext (delete `len' and
	add `from' and `to').

---
Ken'ichi HANDA
handa@m17n.org

Attachment: mgp-m17n.diff.gz
Description: Binary data