Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Unicode Characters on Screen

Reply
Thread Tools

Unicode Characters on Screen

 
 
Jon A. Cruz
Guest
Posts: n/a
 
      07-26-2003
Phillip Lord wrote:
> 1) Do any of the standard defined fonts for java have these glyphs?


Depends on the system they are on.



> 2) If not can I install new fonts into Java, that will have these
> glyphs?


Yes.



> 3) If I can how do I install such fonts? Can I do it programmatically?


Kinda.



See java.awt.Font.createFont(int fontFormat,InputStream fontStream)
(Since JDK 1.3)


> 4) Can any one suggest a good set of fonts with these characters in?


Might check if the Vera fonts have them. Otherwise walk all fonts on the
runtime to find one.

This method will be *very* helpful in a programmatic search:

java.awt.Font.canDisplay(char c)

and find them with

java.awt.GraphicsEnvironment.getAllFonts()

 
Reply With Quote
 
 
 
 
Dale King
Guest
Posts: n/a
 
      07-28-2003
In article <(E-Mail Removed)>, http://www.velocityreviews.com/forums/(E-Mail Removed)
says...
> >>>>> "David" == David Zimmerman <(E-Mail Removed)> writes:

>
> David> Phillip Lord wrote:
> >> I'm a little confused over unicode support within java. If I do
> >> something like....

>
> >> JLabel label = new JLabel();

>
> >> label.setText( "0" + (char)0x2800 + 1 + (char)0x2801 + 2 +
> >> (char)0x2802 ); which I expect to put the three characters "0 1
> >> 2" onto screen

>
> >> separated by the three characters which turn out to be the first
> >> three braille dot characters, in fact I get "0 1 2" separated by
> >> little boxes which in my experience tends to indicate "I don't
> >> know how to draw this character". Does anyone know how I get the
> >> actual characters to appear?

>
> >> Phil

>
>
> David> Does the font you're using have those glyphs?
>
>
> Okay, from the four identical responses that I got (use the right
> font) I realise that I have been remiss in asking the question.
>
> From the results I got, the font does not have those glyphs. Clearly
> such font's do exist.
>
> So the real questions are
>
> 1) Do any of the standard defined fonts for java have these glyphs?


Java is more flexible than that. It doesn't exactly have standard defined
fonts. You can change and extend the font definitions yourself by
changing the font'properties files. A logical font like dialog in Java
isn't even necessarily a single font. It can be a combination of fonts
over various ranges.

See:

http://java.sun.com/j2se/1.4.2/docs/.../fontprop.html

--
Dale King
 
Reply With Quote
 
 
 
 
Phillip Lord
Guest
Posts: n/a
 
      07-29-2003
>>>>> "Dale" == Dale King <(E-Mail Removed)> writes:

>> 1) Do any of the standard defined fonts for java have these
>> glyphs?


Dale> Java is more flexible than that. It doesn't exactly have
Dale> standard defined fonts. You can change and extend the font
Dale> definitions yourself by changing the font'properties files. A
Dale> logical font like dialog in Java isn't even necessarily a
Dale> single font. It can be a combination of fonts over various
Dale> ranges.



Okay, thanks for the information, and likewise all to all the other
people who have offered.

I am reaching the conclusion here that while it would be possible to
install fonts with support for the braille glyphs, its actually going
to be easier to just draw them by hand. I think I could probably get
them installed on my development machine, but is anyone else going to
do this?

Still the information is useful. Braille glyphs are easy to draw, but
this is not true in general. Were they more complex, then going to
route of existing fonts would clearly be the way.

Cheers

Phi

 
Reply With Quote
 
Jon A. Cruz
Guest
Posts: n/a
 
      07-30-2003
Phillip Lord wrote:
> I am reaching the conclusion here that while it would be possible to
> install fonts with support for the braille glyphs, its actually going
> to be easier to just draw them by hand. I think I could probably get
> them installed on my development machine, but is anyone else going to
> do this?



Given that Braille fonts are relatively small (small number of
characters, etc), dynamically loading the font via
java.awt.Font.createFont() could be the way to go.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Python unicode utf-8 characters and MySQL unicode utf-8 characters Grzegorz Śliwiński Python 2 01-19-2011 07:31 AM
Re: convert unicode characters to visibly similar ascii characters Laszlo Nagy Python 6 07-02-2008 04:42 PM
Re: convert unicode characters to visibly similar ascii characters M.-A. Lemburg Python 0 07-02-2008 08:39 AM
Re: convert unicode characters to visibly similar ascii characters Terry Reedy Python 0 07-01-2008 07:46 PM
Unicode + jsp + mysql + tomcat = unicode still not displaying Robert Mark Bram Java 0 09-28-2003 05:37 AM



Advertisments