On Fri, 2006-10-06 at 08:51 +0100, Peter B. West wrote: > How are sub- and super-scripts handled by TextMeasurer and TextLayout? > My requirement is to use Java2D to perform layout, then to render in, > for example, PDF. > > The first question would be: is sub/super handling performed. Does > Java2D rely on the font to handle sub and super? > First answer - RTFM. <q> Description Requests that the font display the characters with glyphs at a particular superscript level: 0 = none, 1 = superscript, 2 = superscript of superscript,...-1 = subscript, -2 = subscript of subscript,... Requests that the font display text using default superscript (or subscript) glyphs and/or scaling.
Fallback Use transform with translation of +/-1/2 and scale of 2/3, progressively for each level. That is, for the transform at level N (with N != 0): offset = sign(N)*1/2*(2/3)^(abs(N)-1) scale = (2/3)^abs(N) </q> This creates a problem of predictability. If I cannot find out what the layout process actually did, I cannot reproduce it in another rendering context. Hmmm. Peter =========================================================================== 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".
