pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From calathus <calat...@gmail.com>
Subject Re: [pivot]how to display Japanese Fonts using only Java class?
Date Tue, 11 Jan 2011 01:58:16 GMT
Thanks for reply.

I set fonts at beginning of the startup method, but still it does not show
Japanese fonts.
What is wrong here? Should we use fontFamily as font name???

    public void startup(Display display, Map<String, String> properties)
throws Exception {
     GraphicsEnvironment ge =
     String []fontFamilies = ge.getAvailableFontFamilyNames();
     for (String fontFamily: fontFamilies) {
     System.out.println("fontFamily: "+fontFamily);
     } // ==> this shows "Sazanami Gothic", "Sazanami Mincho"

     //Font font = new Font("Sazanami Gothic", Font.TRUETYPE_FONT, 12);
     for (final String fontFamily: new String[]{"Sazanami Gothic", "Sazanami
Mincho"}) {
                // do we need to put all these size???
     for(int i=12; i<=30; i++) {
     final Font font = new Font(fontFamily, Font.PLAIN, i);
     //final Font font = new Font(fontFamily, Font.TRUETYPE_FONT, i);

On Mon, Jan 10, 2011 at 4:39 AM, Greg Brown <gk_brown@verizon.net> wrote:

> > Is it possible to use Japanese fonts in Pivot ??
> Yes, but the default font (Verdana) does not include Japanese characters.
> When your app starts up, you just need to set a font that does include
> Japanese characters. You set the theme font via Theme.getTheme().setFont().
> G


View raw message