Peter: Peter B. West wrote:
I have a related question about the font applying to these operations which I will post later, but I may I assume that setting the FONT attribute in the attributes map will be treated as described in the documentation on that attribute?
I'm not sure if Phil answered this part of your questions. All text layout and rendering operations treat the attributes as described in the TextAttribute docs (where the docs are correct :-)
In regards to FONT, setting a FONT attribute completely overrides certain other 'core' attributes in the map. In Java 5, Font can only hold a subset of the attributes (FAMILY, WEIGHT, WIDTH, POSTURE, SIZE, TRANSFORM, and SUPERSCRIPT). All of these override these attributes if they are also specified in the Map that contains the FONT attribute. In Java 6, Font can hold all the defined attributes, and new attributes are added for TRACKING and LIGATURES. To maintain compatibility, the override behavior of the FONT attribute is restricted to the same original attributes (plus the new TRACKING attribute). Basically, if you specify a FONT in any of the APIs that permit it (in AttributedString, in a Map used to create a TextLayout, in Font.deriveFont or getFont) that font will get used. By providing a FONT you are overriding our default selection of a font based on the attributes and text. 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".