WingDings, ttf and glyph

Discussion in 'Java' started by bigbinc, Feb 25, 2004.

  1. bigbinc

    bigbinc Guest

    Is there any reason why the wingding glyph cant be loaded runtime.


    File _file = new File("fonts/WINGDNG3.TTF");
    FileInputStream fis = new FileInputStream(_file);

    font = java.awt.Font.createFont(java.awt.Font.TRUETYPE_FONT, fis);

    System.out.println(font.getName());
    System.out.println("" + font.isBold());
    System.out.println("" + font.isPlain());

    char nb = (char)0;
    for (int z = 0; z < 255; z++) {

    System.out.println(nb + " " + font.canDisplay(nb));
    nb++;

    } // end of


    I get false all the way down...
     
    bigbinc, Feb 25, 2004
    #1
    1. Advertising

  2. bigbinc

    Berlin Brown Guest

    bigbinc wrote:
    > Is there any reason why the wingding glyph cant be loaded runtime.
    >
    >
    > File _file = new File("fonts/WINGDNG3.TTF");
    > FileInputStream fis = new FileInputStream(_file);
    >
    > font = java.awt.Font.createFont(java.awt.Font.TRUETYPE_FONT, fis);
    >
    > System.out.println(font.getName());
    > System.out.println("" + font.isBold());
    > System.out.println("" + font.isPlain());
    >
    > char nb = (char)0;
    > for (int z = 0; z < 255; z++) {
    >
    > System.out.println(nb + " " + font.canDisplay(nb));
    > nb++;
    >
    > } // end of
    >
    >
    > I get false all the way down...


    figured it out, it is not a standard ansi charset character, you have to
    use glyphvector.
     
    Berlin Brown, Feb 25, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Veerle
    Replies:
    0
    Views:
    1,108
    Veerle
    Apr 7, 2005
  2. Charlie

    Obtaining glyph width in Python

    Charlie, Jul 4, 2005, in forum: Python
    Replies:
    1
    Views:
    404
    Andreas Lobinger
    Jul 4, 2005
  3. swiftset
    Replies:
    2
    Views:
    426
    Mike C. Fletcher
    Mar 22, 2007
  4. Laszlo Nagy
    Replies:
    1
    Views:
    660
    David Boddie
    Sep 19, 2009
  5. Replies:
    5
    Views:
    106
Loading...

Share This Page