Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / GUI / September 2003

Tip: Looking for answers? Try searching our database.

Using Unicode symbols

Thread view: 
Jim Simpson - 08 Sep 2003 18:47 GMT
I'm trying to use some of the "Miscellaneous Symbols" from the Unicode
character set in a program but getting absolutely nowhere. Can someone
please point me in the right direction for starters?

Thanks
Jim
Roedy Green - 08 Sep 2003 18:58 GMT
>I'm trying to use some of the "Miscellaneous Symbols" from the Unicode
>character set in a program but getting absolutely nowhere. Can someone
>please point me in the right direction for starters?

Your big problem is to find a font that supports them.

A task for someone is to start cataloging fonts with which subsets of
Unicode they support, or perhaps for difficult characters, what your
font choices are.

Try Tahoma.  You might look at the sizes of the various font files and
start looking in the fattest ones.

See http://mindprod.com/jgloss/font.html

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
Jim Simpson - 08 Sep 2003 20:05 GMT
Roedy, What I really want to do is put the 4 playing card symbols in a an
array to be used in several places.

I looked over all of your material (all I knew about) on the web before I
posted and found much useful and important info but not exactly what I
needed.

Jim

----- Original Message -----
From: "Roedy Green" <roedy@mindprod.com>
Newsgroups: comp.lang.java.gui
Sent: Monday, September 08, 2003 1:58 PM
Subject: Re: Using Unicode symbols

> >I'm trying to use some of the "Miscellaneous Symbols" from the Unicode
> >character set in a program but getting absolutely nowhere. Can someone
[quoted text clipped - 15 lines]
> Coaching, problem solving, economical contract programming.
> See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.

> >I'm trying to use some of the "Miscellaneous Symbols" from the Unicode
> >character set in a program but getting absolutely nowhere. Can someone
[quoted text clipped - 15 lines]
> Coaching, problem solving, economical contract programming.
> See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
Roedy Green - 08 Sep 2003 20:56 GMT
>Roedy, What I really want to do is put the 4 playing card symbols in a an
>array to be used in several places.
>
>I looked over all of your material (all I knew about) on the web before I
>posted and found much useful and important info but not exactly what I
>needed.

What we need is an Applet that will display any given unicode char in
all possible fonts supported on that machine.

The canDisplay method usually lies.  It counts displaying a blob as
displaying.  Fonts that tell the truth and return false can be
eliminated.  

It would take some doing to discover the blob character in each font,
and discard it as counting.  The blob char is not the same in every
font.

What it  could do is display a grid, and you mouse over likely
candidates.  It then tells you the name of the font used.

The easiest way to do this would be with a Canvas divided into grid
cells, and use drawString to place your symbols in there.

Alternatively you might use a JPanel in a JScrollPane just in case
there is too much to view at once. You could get around that also by
popping up an independent Window.

It is not that difficult a project.  Anyone up for it?

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
Roedy Green - 08 Sep 2003 22:06 GMT
>What we need is an Applet that will display any given unicode char in
>all possible fonts supported on that machine.
[quoted text clipped - 18 lines]
>
>It is not that difficult a project.  Anyone up for it?

A slightly simpler to write utility which would have other uses, just
lets you select the font from a list of all possible supported fonts,
the displays it in a TextField The quick brown fox jumps over the lazy
dog's back.  In addition you could use a NumberSpinner to select a
single unicode value that would displayed as well.

The makes the program useful in helping to decide what fonts you use.
However, it means much more work for the user to find a font that
supports some obscure character.

Perhaps you could combine the two modes.

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
Roedy Green - 09 Sep 2003 04:03 GMT
>A slightly simpler to write utility which would have other uses, just
>lets you select the font from a list of all possible supported fonts,
>the displays it in a TextField The quick brown fox jumps over the lazy
>dog's back.  In addition you could use a NumberSpinner to select a
>single unicode value that would displayed as well.

I have written the project up as a student project.  See
http://mindprod.com/projfontfinder.html for the spec.

--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
Jim Simpson - 09 Sep 2003 14:31 GMT
Thanks Roedy for all your efforts. I'll go to work on the problem but no
doubt it will take a while. I'm very slow writing code and very new at Java
so I may be back here from time to time looking for help. Maybe someone else
will give it a try and beat me to the finish line.

Jim

> >A slightly simpler to write utility which would have other uses, just
> >lets you select the font from a list of all possible supported fonts,
[quoted text clipped - 9 lines]
> Coaching, problem solving, economical contract programming.
> See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.