> Thanks! Modifying the position of each glyph in the GlyphVector works
> perfectly! At first I didn't though that this was practical, because the
> GlyphVector seems to encode positions as Point2D: it seemed to me that
> the final position of each glyph was already encoded in there. But I
> poked around and apparently the default layout is purely linear: the Y
> value is always 0.
>
> Best Regards,
> David Garnier

David:

GlyphVector.performDefaultLayout puts each glyph at the position + advance of
the previous glyph.  For fonts without rotation, the y advance is 0.  As long as
you are working with non-complex text (e.g. no reordering, combining marks, or
ligature formation) tweaking the positions will be fine.  You just need to
really know what kind of text you are working on.  For general text, you have to
go through the full bidi analysis and layout process that TextLayout can
perform, taking a shortcut through Font.createGlyphVector can produce
next-to-worthless text.

Tracking would be handy for some folks, file an RFE if you want this feature.
It would have to be filed pretty soon, and need some votes for it to get
attention in the right places and make the next major release.  RFE's are always
welcome in any case.

I'm not sure why the glyphs are 'too far apart', though.  FractionalMetrics
should help for some cases.  It might be the font you are using.  It might be
the framework you are using imposing its own tracking (from one email it sounded
like you were using Vincent Hardy's graphics framework, but I'm not familiar
with the implementation).  It might, um, even be a bug.  Without a test case its
difficult to tell.  If you think it might be a bug, please submit a bug report.

Doug

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to