Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #24342

Re: Unicode >16 Bit JTextPane etc..

Path csiph.com!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail
From Jan Burse <janburse@fastmail.fm>
Newsgroups comp.lang.java.programmer
Subject Re: Unicode >16 Bit JTextPane etc..
Date Sun, 09 Jun 2013 09:35:08 +0200
Organization albasani.net
Lines 64
Message-ID <kp1b7c$466$1@news.albasani.net> (permalink)
References <kov4ho$ud7$1@news.albasani.net> <kov5bh$9n$1@news.albasani.net> <kovetc$qg5$1@dont-email.me> <kp0aeg$e29$1@news.albasani.net> <kp0adi$fqs$1@dont-email.me> <kp0b0l$f4u$1@news.albasani.net> <kp0j0h$k1f$1@dont-email.me> <WrKdnZwK9spbQC7MnZ2dnUVZ_vSdnZ2d@westnet.com.au> <kp0n19$nme$2@dont-email.me> <kp0q41$g4i$1@dont-email.me> <kp0v8m$3iv$1@dont-email.me> <kp1a7t$9bm$1@dont-email.me>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 7bit
X-Trace news.albasani.net PX6iJwaanf8mYX6gXXlw7rOCXc/989N40DmlLAoaXYPBKEH4v13xSGIxcnjEXU20zfN04eqPs4stvGePuBpiXA==
NNTP-Posting-Date Sun, 9 Jun 2013 07:35:09 +0000 (UTC)
Injection-Info news.albasani.net; logging-data="t4Rr12pTx7AkUsEzTvtu7maJzaflqAoLbqjrygirc2MQgdakW0wzLBaHLHI5sUvtg28MFqHPMxPo3g1p+zco2ICjqBIbC8C/kYqMfocSgBvxxN85J/XFfbxfWRbtoKRn"; mail-complaints-to="abuse@albasani.net"
User-Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:20.0) Gecko/20100101 Firefox/20.0 SeaMonkey/2.17.1
In-Reply-To <kp1a7t$9bm$1@dont-email.me>
Cancel-Lock sha1:uR7JqAIUwM3V3lNU/KwrJBUKxNI=
Xref csiph.com comp.lang.java.programmer:24342

Show key headers only | View raw


Thank you very much.
This is very interesting.
Didn't use canDisplay() so far.

markspace schrieb:
> On 6/8/2013 9:16 PM, Jeff Higgins wrote:
>>
>> textpane.setFont(new Font("Dialog", Font.PLAIN, 60));
>> textpane.setText("\uD835\uDCC0\uD835\uDC9C\uD835\uDC9E\uD835\uDC9F")
>
>
> This ends up printing Cambria Math for the font name on my system.
>
>
> class SmallDemo
> {
>
>     private JFrame frame = new JFrame( "A Small Demo" );
>     private JTextPane textpane = new JTextPane();
>     private static final String TEST =
>             "\uD835\uDCC0\uD835\uDC9C\uD835\uDC9E\uD835\uDC9F";
>
>     public SmallDemo()
>     {
>        try {
>           frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
>           Font[] allFonts =
> GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts();
>           Font usingFont = null;
>           for( Font font : allFonts ) {
>              if( font.canDisplay( 120000 ) ) {
>                 usingFont = new Font( font.getFontName(), Font.PLAIN, 30 );
>                 textpane.setFont( usingFont );
>                 break;
>              }
>           }
>           textpane.setText( TEST );
>           StyledDocument doc = textpane.getStyledDocument();
>           doc.insertString( doc.getLength(), usingFont.getFontName(),
> null);
>           frame.add( textpane );
>           frame.pack();
>           frame.setVisible( true );
>        } catch( BadLocationException ex ) {
>           Logger.getLogger( SmallDemo.class.getName() ).log(
> Level.SEVERE, null,
>                   ex );
>        }
>     }
>
>     public static void main( String[] args )
>     {
>        SwingUtilities.invokeLater( new Runnable()
>        {
>           @Override
>           public void run()
>           {
>              SmallDemo demo = new SmallDemo();
>           }
>        } );
>     }
> }
>

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Unicode >16 Bit JTextPane etc.. Jan Burse <janburse@fastmail.fm> - 2013-06-08 13:29 +0200
  Re: Unicode >16 Bit JTextPane etc.. Jan Burse <janburse@fastmail.fm> - 2013-06-08 13:42 +0200
    Re: Unicode >16 Bit JTextPane etc.. Jeff Higgins <jeff@invalid.invalid> - 2013-06-08 10:31 -0400
      Re: Unicode >16 Bit JTextPane etc.. Joerg Meier <joergmmeier@arcor.de> - 2013-06-08 20:35 +0200
        Re: Unicode >16 Bit JTextPane etc.. Jeff Higgins <jeff@invalid.invalid> - 2013-06-08 18:17 -0400
        Re: Unicode >16 Bit JTextPane etc.. Joshua Cranmer 🐧 <Pidgeot18@verizon.invalid> - 2013-06-08 23:12 -0500
      Re: Unicode >16 Bit JTextPane etc.. Jan Burse <janburse@fastmail.fm> - 2013-06-09 00:15 +0200
        Re: Unicode >16 Bit JTextPane etc.. Jeff Higgins <jeff@invalid.invalid> - 2013-06-08 18:20 -0400
          Re: Unicode >16 Bit JTextPane etc.. Jan Burse <janburse@fastmail.fm> - 2013-06-09 00:25 +0200
            Re: Unicode >16 Bit JTextPane etc.. Jeff Higgins <jeff@invalid.invalid> - 2013-06-08 20:47 -0400
              Re: Unicode >16 Bit JTextPane etc.. "Qu0ll" <Qu0llSixFour@gmail.com> - 2013-06-09 11:42 +1000
                Re: Unicode >16 Bit JTextPane etc.. Martin Gregorie <martin@address-in-sig.invalid> - 2013-06-09 01:50 +0000
                Re: Unicode >16 Bit JTextPane etc.. Jeff Higgins <jeff@invalid.invalid> - 2013-06-08 22:48 -0400
                Re: Unicode >16 Bit JTextPane etc.. Jeff Higgins <jeff@invalid.invalid> - 2013-06-09 00:16 -0400
                Re: Unicode >16 Bit JTextPane etc.. markspace <markspace@nospam.nospam> - 2013-06-09 00:23 -0700
                Re: Unicode >16 Bit JTextPane etc.. Jan Burse <janburse@fastmail.fm> - 2013-06-09 09:35 +0200
                Re: Unicode >16 Bit JTextPane etc.. Jan Burse <janburse@fastmail.fm> - 2013-06-09 09:51 +0200
                Re: Unicode >16 Bit JTextPane etc.. Martin Gregorie <martin@address-in-sig.invalid> - 2013-06-09 13:05 +0000
                Re: Unicode >16 Bit JTextPane etc.. Stanimir Stamenkov <s7an10@netscape.net> - 2013-06-09 17:37 +0300
                Re: Unicode >16 Bit JTextPane etc.. Stanimir Stamenkov <s7an10@netscape.net> - 2013-06-09 17:55 +0300
  Re: Unicode >16 Bit JTextPane etc.. Sven Köhler <remove-sven.koehler@gmail.com> - 2013-06-09 07:08 +0300

csiph-web