How are you generating that text? It looks like you are using an a Prompt with
a custom body. What does the source code for the body look like? What happens
if you place this text in the following hierarchy?
Window (maximized)/BoxPane (horizontal)/Label (using Chinese font)
FYI, you don't need to programmatically select a compatible font if you already
know of one that will work. In that case, you can just call Theme.setFont()
directly.
On Sep 21, 2010, at 3:43 PM, Roger Whitcomb wrote:
> I’m seeing a clipping problem with italic text when using a
> Chinese-compatible font. This is 1.5.2 (latest as of today) on Windows XP
> SP3:
> <image001.png>
>
> In my application, I basically copied the code for font selection from
> “Localization.java” in the Tutorials section:
> Theme theme = Theme.getTheme();
> Font font = theme.getFont();
>
> // Search for a font that can support the sample string
> String sampleResource = resources.getString("mainAppTitle");
> if (font.canDisplayUpTo(sampleResource) != -1) {
> Font[] fonts =
> GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts();
>
> for (int i = 0; i < fonts.length; i++) {
> if (fonts[i].canDisplayUpTo(sampleResource) == -1) {
> theme.setFont(fonts[i].deriveFont(Font.PLAIN, 12));
> break;
> }
> }
> }
>
> So, am I doing something wrong, or is this a bug?? Thanks.
>
>
> Roger Whitcomb
> Architect, Engineering
> Ingres Corporation
> [email protected]
>
> PHONE +1 650.587.5596
> FAX +1 650.587.5550
>
> www.ingres.com
>
> This transmission is confidential and intended solely for the use of the
> recipient named above. It may contain confidential, proprietary, or legally
> privileged information. If you are not the intended recipient, you are hereby
> notified that any unauthorized review, use, disclosure or distribution is
> strictly prohibited. If you have received this transmission in error, please
> contact the sender by reply e-mail and delete the original transmission and
> all copies from your system.
>