Re: Possible Pango 1.4 ideas
- From: Andrew Dunbar <hippietrail yahoo com>
- To: gtk-i18n-list gnome org
- Subject: Re: Possible Pango 1.4 ideas
- Date: Tue, 21 Jan 2003 00:59:50 +0000 (GMT)
--- Owen Taylor <otaylor redhat com> wrote: >
> 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.
The main use for this would be to allow independent
scaling of the horizontal and vertical axes. Even if
nobody is asking for this now, it's obvious enough as
a text effect that somebody will want it sooner or
later.
If this was supported, combining it with rotations
might mean the best implementation would be to use
matrices rather than separate rotate, scale, etc
passes - but I'm very rust on this so it's likely I'm
quite wrong (:
> - Shears - Utterly useless
As a seperate pass I might agree though it is one way
to achieve italics and even reverse-sloping italics.
Again I may be wrong but if matrices are used you'd
get shearing for free anyway.
> I don't think you need anything but rotation for
> doing text along paths.
Unless seperate x-scaling and y-scaling is allowed.
> 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.
The only reason I thought it might be worthwhile is in
the case of very slow devices - perhaps some handhelds
still have much slower floating point than integer
operations and 90-degree rotation is possible with
logic only and no math at all.
Again I'm sure you know more about this than I do -
it's only a suggestion.
Andrew Dunbar.
> 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
=====
http://linguaphile.sourceforge.net/cgi-bin/translator.pl http://www.abisource.com
__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]