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

Re: bidi text printing



--- ahmad khalifa <ahmadkhalifa at hotmail dot com> wrote:
> >Did you try CUPS' "lp" and/or "lpr" and they worked fully for you ?
> >Were you able to do this from the command-line and get fully shaped
> >and bidi'ed print-outs ?  If so, can you give us details on what it
> >is that one needs to do or setup to get it to work properly.  We'll
> >augment our HOWTO docs with this info at a minimum :-)
> 
> well, im not sure that 'lp' and 'lpr' can print shaped text files, but
> they can print shaped .ps files, because .ps files contain fonts and
> the exact data to be printed... on my RH8.0 i dont have arabic Type1
> fonts, so my lp and lpr print out boxes instead of arabic (i think mainly
> because they lack the Type1 arabic fonts), anyway using gedit i can print
> Unshaped (separate letters) arabic but i think that is something wrong
> with my gedit and if gedit shaped ok, the printing would come out ok,
> because gedit send a .ps file to the printer (i mean CUPS)....

Hehehe - Ahmad the whole point of this 'CUPS' project was to get lp and
lpr to print from the command-line (that's why I mentioned 'enscript'
if lp/lpr already work).  Printing from an application is not something
we were after with this effort (that's left to the applications).

As you noted that you have some time on your hands, I highly encourage
you to look more deeply into what is required to get lp/lpr to print
Bidi Arabic UTF-8 text files without issue.

> anyway, for every file CUPS starts a chain of filters that ends with the
> Printer driver, redirecting each filter's stdout to the next one's stdin...

Then maybe we need to add our own filter to the process.  Keep in mind
that whatever we come up with MUST be in the context of a patch.  In
other words, we don't want to create something that the authors of CUPS
will not accept and/or reject.  So, like PuTTY, the need is there to
contact the authors of CUPS and tell them about our plans and see if
they have any suggestions/thoughts/directions.

It should now be ingrained in all our heads that everything we do MUST
be under the auspices of that work making it back to the main application.

> example: if your printing a text file, this is what i think happens
> the filter chain looks like this:
> txttops >> pstops >> pstohp
> something similar happens, im not sure exactly what...
> 
> anyway, the problem (if there is one) would be in the 'txttops'
> filter, that converts text files to .ps documents and prints it on
> stdout so pstohp can receive it on stdin and send it to some backchain
> driver or whatever...

Sounds like maybe 'txttops' needs to have Bidi and Shaping added to it
then :-)  You might want to take a very _quick_ peek at my addition of
Bidi and Shaping to txtbdf2ps (for the record I know NOTHING about ps),

  http://cvs.arabeyes.org/viewcvs/projects/external/txtbdf2ps/

> anyway, the reason i said that printing works is for 2 reasons
> 1- printing .ps files is OK...
> 2- there is an article on www.linux-egypt.com that talks about printing...
>   (i think it was a forum post, im not sure)

Again we are interested in,

 $ lpr my_arabic_utf8.txt

> this is what i remember... the next move is from someone who knows
> more about Linux than me, to try lp and lpr and read the article and
> do any necessary configuration and see if the problem exists or not...

Well, I thought you were looking for something to do while waiting
for PuTTY; I think you found it ;-)

Salam.

 - Nadim


__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com