I have a requirement for accurate measurement of text to generate a layout in one part of a work flow, and the rendering of the text in a later part of the workflow, using the same fonts. For example, I layout text to be rendered later in PDF.
For this to work, I need to know that the font I specify for the layout will be the same font used for the rendering. I have to avoid font substitutions or aggregations that cannot be expected to occur in the renderers. Some random observations: I can get an array of Font[] from the GraphicsEnvironment, but that is time-consuming, especially if this occurs on a document by document basis. Can I get a single font that is the same as a particular element of the array returned by getAllFonts(), by using the fontName returned from one of the array fonts, via the decode method? As I understand it, the fonts returned from gatAllFonts may include composite fonts. hasUniformLineMetrics will tell me about some aspects of the consistency of the font If susbstiution have occurred which happen to share the same height (for LR/RL scripts) characteristics, I as but will it notify me only about variations in the height (for LR/RL scripts)? I can createFont from a font file to which I have access. If I try to register that font, I may have a name clash with an existing system font. In fact, if I am picking up a font file from a "known" location, that is guaranteed, isn't it? Can I use such an instance of a created font in an attribute map to getFont(Map)? Can I further use such a Font instance in deriveFont methods? What's the best approach? Thanks 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".
