You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by Vincent Hardy <vi...@eng.sun.com> on 2000/11/01 06:24:27 UTC

Commit: Gradients and Font stuff

Hello,

I just commited a couple things:

a. Linear and Radial Gradients. This turned out to require some new
   code to get the proper behavior on bounding box. Now, we pass the 
   BE tests on linear and gradient paints.

b. SVGTextElementBridge. I added initial loading of all system font
   (i.e., putting font-family names into the font map) so that all
   system fonts can now be used.

There is still something I do not understand in the text area. At small
font sizes, the layout is screwed up (and does not look good). I first
thought it was related to fractional metrics not being set (they are
now), but the problem persists. It does not seem to be coming from the
new font-size conversion routines... Any suggestions?
Thanks.
V.

Gradient and Text

Posted by Vincent Hardy <vi...@eng.sun.com>.
Ok, so I found why we do not pass the BE on text. Currently, the 
TextPainter is invoked after the transform has been modified in 
the TextNode's primitivePaint method. The net result is that the Paint
and the ACI are in different spaces which causes the problem. There 
is an easy way to correct this: the TextPainter should also be
passed the location at which the text should be drawn and use this
to paint the text at the appropriate location. This will keep the 
text and paint attributes in the same space and solve the problem.
It is quite late, so I am not going to do this just now, but I will
do it tomorow, unless someone objects.
Thanks.
V.

Vincent Hardy wrote:
> 
> Hello,
> 
> I just commited a couple things:
> 
> a. Linear and Radial Gradients. This turned out to require some new
>    code to get the proper behavior on bounding box. Now, we pass the
>    BE tests on linear and gradient paints.
> 
> b. SVGTextElementBridge. I added initial loading of all system font
>    (i.e., putting font-family names into the font map) so that all
>    system fonts can now be used.
> 
> There is still something I do not understand in the text area. At small
> font sizes, the layout is screwed up (and does not look good). I first
> thought it was related to fractional metrics not being set (they are
> now), but the problem persists. It does not seem to be coming from the
> new font-size conversion routines... Any suggestions?
> Thanks.
> V.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-dev-help@xml.apache.org

Re: Commit: Gradients and Font stuff

Posted by Vincent Hardy <vi...@eng.sun.com>.
I forgot to mention that there is a problem with RadialGradients on
text and I have not got a chance to debug that yet (see 
\gradPatt-radialGr-BE-04.svg, we only pass the test on shapes, not on
text). I will look into this in the coming days. 

FYI, other tests we pass:

+ gradPatt-radialGr-BE-05.svg
+ gradPatt-stop-BE-06.svg
+ gradPatt-stop-BE-10.svg
+ gradPatt-transfrm-BE-09.svg (if you comment out the pattern part).

V.

Vincent Hardy wrote:
> 
> Hello,
> 
> I just commited a couple things:
> 
> a. Linear and Radial Gradients. This turned out to require some new
>    code to get the proper behavior on bounding box. Now, we pass the
>    BE tests on linear and gradient paints.
> 
> b. SVGTextElementBridge. I added initial loading of all system font
>    (i.e., putting font-family names into the font map) so that all
>    system fonts can now be used.
> 
> There is still something I do not understand in the text area. At small
> font sizes, the layout is screwed up (and does not look good). I first
> thought it was related to fractional metrics not being set (they are
> now), but the problem persists. It does not seem to be coming from the
> new font-size conversion routines... Any suggestions?
> Thanks.
> V.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-dev-help@xml.apache.org