[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CUPS in Action!
- To: developer at arabeyes dot org
- Subject: CUPS in Action!
- From: "ahmad khalifa" <ahmadkhalifa at hotmail dot com>
- Date: Tue, 27 Apr 2004 20:24:58 +0000
it seems that cups-dev at easysw.com is just a mirror to the
newsgroup, so i've been talking with someone there through
the newsgroup.
They do accept patches, and they seem very willing to accept
a Shaping/Bidi patch.
here is a log of the newsgroup posts, for archiving reasons, in case
i die :-(
===================
Start Log
===================
ahmadkhalifa - at - hotmail.com
Are there any plans to support the Arabic Language in CUPS' texttops filter
?
thats where i think the problem is, or thats where it should be dealt with.
if there arent any near plans to do so, we at Arabeyes.org would be happy to
supply a patch. and if so, would you be willing to accept the patch and
include
it in your next releases, so we can get Arabic support out-of-the-box ?
printing UTF-8 files containing arabic text needs several text preparations,
like
Shaping and Bidirectionality. the flag "rtol" in the file /charsets/utf-8 is
not
sufficient to perform the Unicode Biderectional Algorithm (UAX #9), would
you
be willing to support libraries that perform line Reordering, like FriBidi
(which is
already included in many distros) or IBM's ICU ??
UAX#9 is here...
http://www.unicode.org/reports/tr9/
i have previously posted this same message to cups-dev at easysw.com
but didnt get a reply, or my own post.
ak.
===================
From: mike - at - easysw.com
Ahmad Khalifa wrote:
Are there any plans to support the Arabic Language in CUPS' texttops
filter ? thats where i think the problem is, or thats where it
should be dealt with.
if there arent any near plans to do so, we at Arabeyes.org would be happy
to supply a patch. and if so, would you be willing to accept
the patch and include it in your next releases, so we can get Arabic
support out-of-the-box ?
We would welcome any patches, and in particular any freely
redistributable Arabic fonts that we could include with CUPS.
printing UTF-8 files containing arabic text needs several text
preparations, like Shaping and Bidirectionality. the flag "rtol" in
the file /charsets/utf-8 is not sufficient to perform the Unicode
Biderectional Algorithm (UAX #9), would you be willing to support
libraries that perform line Reordering, like FriBidi (which is already
included in many distros) or IBM's ICU ??
...
The CUPS 1.2 code has a completely new I18N module for better UTF-8
support, as well as adding support for different multibyte encodings.
Text directionality is handled differently, however we have not added
any rewriting code yet (it is also needed for other languages...)
In general, we do not want to add the overhead of things like ICU,
which are larger than CUPS itself! In addition, we sublicense CUPS
so we have to retain ownership of the core CUPS code... Any code
you contribute will need to be signed over to us to be included in
CUPS.
--
______________________________________________________________________
Michael Sweet, Easy Software Products
Printing Software for UNI
==================
From: ahmadkhalifa - at - hotmail.com
Michael Sweet wrote:
Ahmad Khalifa wrote:
Are there any plans to support the Arabic Language in CUPS' texttops
filter ? thats where i think the problem is, or thats where it
should be dealt with.
if there arent any near plans to do so, we at Arabeyes.org would be happy
to supply a patch. and if so, would you be willing to accept
the patch and include it in your next releases, so we can get Arabic
support out-of-the-box ?
We would welcome any patches, and in particular any freely
redistributable Arabic fonts that we could include with CUPS.
Great news, a patch to 1.2.x might be accepted.
regarding arabic fonts, arabeyes' Khotot project has some
GPL fonts, that i could be included in CUPS without issues.
will check the font issue with Khotot's maintainer.
http://www.arabeyes.org/project.php?proj=Khotot
printing UTF-8 files containing arabic text needs several text
preparations, like Shaping and Bidirectionality. the flag "rtol" in
the file /charsets/utf-8 is not sufficient to perform the Unicode
Biderectional Algorithm (UAX #9), would you be willing to support
libraries that perform line Reordering, like FriBidi (which is already
included in many distros) or IBM's ICU ??
> ...
The CUPS 1.2 code has a completely new I18N module for better UTF-8
support, as well as adding support for different multibyte encodings.
Text directionality is handled differently, however we have not added
any rewriting code yet (it is also needed for other languages...)
In general, we do not want to add the overhead of things like ICU,
which are larger than CUPS itself! In addition, we sublicense CUPS
so we have to retain ownership of the core CUPS code... Any code
you contribute will need to be signed over to us to be included in
CUPS.
Yeah, Reordering is also needed in other languages.
instead of ICU there is "minibidi" (also available from arabeyes) which
also performs arabic shaping, would be suitable for CUPS, as its licence
is MIT, which means you can relicense it and/or sell it or do whatever
you want with it..
minibidi is on arabeyes' CVS here...
http://cvs.arabeyes.org/viewcvs/projects/adawat/minibidi/
I do have one problem though, with CUPS 1.2.x the cups server crashes
on the first operation that talks to the server, e.g on the first lpstat
or first lp/lpr...
last thing, i identified the need for these changes in order to
support Arabic:
- Add arabic font
- Add line to utf-8 file, 0600-06FF and FE70-FEFF
- Changes to texttops.c, WriteLine, WriteString, WriteEpilogue,
WritePrologue
any other changes need to be done ? is there a more suitable place
for adding Reordering/Shaping than texttops.c ??
ak.
===================
From: mike - at - easysw.com
Ahmad Khalifa wrote:
...
Great news, a patch to 1.2.x might be accepted.
regarding arabic fonts, arabeyes' Khotot project has some
GPL fonts, that i could be included in CUPS without issues.
will check the font issue with Khotot's maintainer.
http://www.arabeyes.org/project.php?proj=Khotot
Thanks for the link, looking into it...
...
Yeah, Reordering is also needed in other languages.
instead of ICU there is "minibidi" (also available from arabeyes) which
also performs arabic shaping, would be suitable for CUPS, as its licence
is MIT, which means you can relicense it and/or sell it or do whatever
you want with it..
minibidi is on arabeyes' CVS here...
http://cvs.arabeyes.org/viewcvs/projects/adawat/minibidi/
Thanks, looking at it now...
I do have one problem though, with CUPS 1.2.x the cups server crashes
on the first operation that talks to the server, e.g on the first lpstat
or first lp/lpr...
1.2 CVS has some issues right now; I've been busy with other stuff
the last month or so (mainly the DDK and prep for 1.1.21rc1) but
will be bug hunting in 1.2 again shortly.
last thing, i identified the need for these changes in order to
support Arabic:
- Add arabic font
- Add line to utf-8 file, 0600-06FF and FE70-FEFF
- Changes to texttops.c, WriteLine, WriteString, WriteEpilogue,
WritePrologue
any other changes need to be done ? is there a more suitable place
for adding Reordering/Shaping than texttops.c ??
Actually, we'd probably want to do it in textcommon.c, since it
can be used by other text modules (PDF, PCL, etc.) to render the
formatted text. That simplifies the implementation of text
filters significantly...
--
______________________________________________________________________
Michael Sweet, Easy Software Products
Printing Software for UNIX http://www.easysw.com
=====================
From: mike - at - easysw.com
Ahmad Khalifa wrote:
...
Great news, a patch to 1.2.x might be accepted.
regarding arabic fonts, arabeyes' Khotot project has some
GPL fonts, that i could be included in CUPS without issues.
will check the font issue with Khotot's maintainer.
http://www.arabeyes.org/project.php?proj=Khotot
Regarding these fonts, which one(s) would correspond to a monospaced
font? The text filter needs a monospaced font and the "hacks" we
use for symbols and the like probably won't look right with a joined
script like Arabic...
--
______________________________________________________________________
Michael Sweet, Easy Software Products
Printing Software for UNIX http://www.easysw.com
==================
From: ahmadkhalifa - at - hotmail.com
Michael Sweet wrote:
http://www.arabeyes.org/project.php?proj=Khotot
Regarding these fonts, which one(s) would correspond to a monospaced
font? The text filter needs a monospaced font and the "hacks" we
use for symbols and the like probably won't look right with a joined
script like Arabic...
i will check with the Khotot project's maintainer, they do have to
be Type-1, right ?
and also, would you require it to be a separate font file, or to be
augmented in your Courier font ?
as you said, the textcommon.c looks more suitable. i think Shaping/Bidi
should be applied in line 758, which is the case of 0x0A of the input
file, mainly because Shaping/Bidi should be applied Line by Line.
any other suggestions ?
also, how do you debug the code ? is there a development branch on CVS
or something similar ?
ak.
==================
From: ahmadkhalifa - at - hotmail.com
Ahmad Khalifa wrote:
as you said, the textcommon.c looks more suitable. i think Shaping/Bidi
should be applied in line 758, which is the case of 0x0A of the input
file, mainly because Shaping/Bidi should be applied Line by Line.
forgot to mention, Shaping/Bidi will be applied to a temp Buffer
extracted from Page[line][i].ch and then inserted back into it.
ak.
==================
From: mike - at - easysw.com
Ahmad Khalifa wrote:
...
i will check with the Khotot project's maintainer, they do have to
be Type-1, right ?
Yes.
and also, would you require it to be a separate font file, or to be
augmented in your Courier font ?
A separate file would be best.
as you said, the textcommon.c looks more suitable. i think Shaping/Bidi
should be applied in line 758, which is the case of 0x0A of the input
file, mainly because Shaping/Bidi should be applied Line by Line.
any other suggestions ?
also, how do you debug the code ? is there a development branch on CVS
or something similar ?
The v1_2_devel branch is used for development of 1.2.x right now;
once it is ready we'll make a v1_1_patches branch and move 1.2 to
HEAD. (we'll be making the patches branch for 1.2 when 1.2.0 is
released in the future, so that 1.3.x development can begin more
quickly...)
Debugging of filters typically involves running the filter with
the necessary arguments and looking at the generated output, e.g.:
./texttops 123 user title 1 "options" test.txt >test.ps
--
______________________________________________________________________
Michael Sweet, Easy Software Products
Printing Software for UNIX http://www.easysw.com
_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail