[gl2ps] text alignment for ps/pdf

Christophe Geuzaine geuzaine at acm.caltech.edu
Mon Jul 12 00:34:26 CEST 2004


Micha Bieber wrote:

> 
>>in PostScript as well in my development version. Does anyone know how to
>>do the same stuff in PDF?
> 
> 
> The problem is, you have to utilize the font metric to get the width
> information for strings in PDF. So anything besides left-aligned is
> non-trivial. But it is hope in the long run. I have to deal at this
> moment with fonts in PDF. It might be, that I can reuse some code in the
> future in gl2ps.
> 

Great! PDF *is* complicated :-(

> 
>>PS: Micha - do you use/need the color argument in gl2psTextOpt()?  Why
>>not simply set the color the usual way using OpenGL? (If we decide to 
>>make gl2psTextOpt() public, I would prefer to remove it...)
> 
> 
> I don't see any serious problem here. Yes, we could remove it.
> 

OK, I replaced it with "angle" (for a simple rotation of the text string).

I've uploaded a beta of version 1.2.1 with all these changes (+ support 
for imagemaps in PostScript) on http://geuz.org/gl2ps/src/.

Best,

C.

-- 
Christophe Geuzaine
Applied and Computational Mathematics, Caltech
geuzaine at acm.caltech.edu - http://geuz.org