From owner-freebsd-questions@FreeBSD.ORG Mon Jul 18 11:03:47 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 577F6106566B for ; Mon, 18 Jul 2011 11:03:47 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) by mx1.freebsd.org (Postfix) with ESMTP id 1CB108FC0A for ; Mon, 18 Jul 2011 11:03:46 +0000 (UTC) Received: from r55.edvax.de (port-92-195-103-124.dynamic.qsc.de [92.195.103.124]) by mx02.qsc.de (Postfix) with ESMTP id AA5201D8E4; Mon, 18 Jul 2011 13:03:45 +0200 (CEST) Received: from r55.edvax.de (localhost [127.0.0.1]) by r55.edvax.de (8.14.2/8.14.2) with SMTP id p6IB3iTM002220; Mon, 18 Jul 2011 13:03:45 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Mon, 18 Jul 2011 13:03:44 +0200 From: Polytropon To: Matthias Apitz Message-Id: <20110718130344.2cb188d0.freebsd@edvax.de> In-Reply-To: <20110718104939.GA32254@sh4-5.1blu.de> References: <20110718104939.GA32254@sh4-5.1blu.de> Organization: EDVAX X-Mailer: Sylpheed 2.4.7 (GTK+ 2.12.1; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: groff && UTF-8 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jul 2011 11:03:47 -0000 On Mon, 18 Jul 2011 12:49:39 +0200, Matthias Apitz wrote: > > > Hello, > > In the '90 I have used for a lot of my internal and external papers and > letter the groff suite (gtbl, groff, ...) with good results. > > I've now a project where it would fit really nicely. It's making > (Postscript or PCL) printout of some pages like this example one: > > http://www.unixarea.de/MagazinZettel.pdf > > in which most of the part is just plain text, printed in some fixed > font, a few big letters (big font) and some OCR-B on the page (like the > number 0000471110 in the mentioned page). > > The critical part seems to be: the text is UTF-8 and converting this > to ISO 8859-1 is not an option. It's a Library Management System we > just ported to Unicode, and we don't want to fall back in printing :-) > > I've checked groff 1.21 from the ports but it seems to understand > only making UTF-8 output with its driver -Tutf8. Is there a way to make > it understand UTF-8 as input and making PCL or Postscript of it > (like CUPS which has a filter 'texttops' which together with the > FreeFonts can make Postscript of UTF-8 text)? > > Any other ideas? > > OCR-B is another issue, perhaps. But it seems that there are at least > free fonts available for it in Postscript... Other idea. :-) One option is to use LaTeX which can understand UTF-8 in the input. I've used it primarily to incorporate chinese text into german papers. Basically the macro \usepackage[utf8]{inputenc} does the trick. You're outputting plain text mostly, so LaTeX would be considered "too heavy" at this point. I'm not sure if you can program PostScript directly... maybe it does understand UTF-8 as input text so you can write a simple output filter that outputs PS, given some data input. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...