Re: Possible Pango 1.4 ideas



Andrew Dunbar <hippietrail yahoo com> writes:

> > > But I think you could still do text on a path
> > within an application.
> > > You could translate the coordinates returned by
> > Pango and render the
> > > text yourself.
> > 
> > Rotated baselines is very high on the Pango request
> > list:
> > 
> >  - It's needed to do vertical text the way I want to
> > do vertical text
> >  - It comes up in a lot of apps (gnumeric needs it,
> > for instance)
> 
> Wouldn't it make more sense to allow arbitrary 2D
> transformations of the character space?  This is
> surely
> going to be needed at some point anyway for paths.
> It will definitely be needed when we want to do both
> scaling and rotating of the same letter.

Well, if by "arbitrary 2D transformations" you mean affine
transformations like Postscript, that ends up being:

 - Rotations
 - Scales - It's not clear to me that having a scale
   factor separate from point size is a good idea;
   certainly adds more confusion.
 - Shears - Utterly useless

I don't think you need anything but rotation for doing text
along paths.

But allowing arbitrary affines would have the advantage of being
compatible with other rendering models that allow them.

As I recall, Windows only allows rotated baselines,
not arbitrary affines.
 
> I think vertical text is a special case which is
> probably better off with specific optimized code.

I'm not aware of any reason why this would be the case.  Special cases
are evil ... I don't imagine that horizontal case would be a special
case either, it would just be rotation through an angle of 0.

To expand a bit more, you actually do need to pay attention to the
fact that you are laying out text vertically -- to get Han characters
right way up when you rotate the baseline, you have to rotate them 90
degrees when laying them out so they get rotated back upright when you
rotate the baseline into position.

The reason you need rotated baseline support is so you don't need to
special case things all over PangoLayout.

Regards,
                                        Owen



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