list all characters available

C

clinisbut

Hi
I'm trying to write an app and don't know how to start.
I'll have a selector with a list of true type fonts.
Each font will represent a different set of chars. Example
*arial-font
*arabic-font
*russian-font
*cyrillic-font

When the user select one of them, I should list all chars available in
the font.

With ansi characterset it's easy, just loop from 0-255 and print the
char representation of an integer value, but I don't know how to
achieve this.

Any idea?
 
C

clinisbut

Sorry, True-Type fonts are off-topic.  You need to ask in the newsgroup
that deals with them, most likely your platform newsgroup, where the
API for working with fonts is available.

V

oops, sorry!
 
O

Obnoxious User

Hi
I'm trying to write an app and don't know how to start. I'll have a
selector with a list of true type fonts. Each font will represent a
different set of chars. Example *arial-font
*arabic-font
*russian-font
*cyrillic-font

When the user select one of them, I should list all chars available in
the font.

With ansi characterset it's easy, just loop from 0-255 and print the
char representation of an integer value, but I don't know how to achieve
this.

Any idea?

www.pango.org
 
J

James Kanze

I'm trying to write an app and don't know how to start.
I'll have a selector with a list of true type fonts.
Each font will represent a different set of chars. Example
*arial-font
*arabic-font
*russian-font
*cyrillic-font
When the user select one of them, I should list all chars
available in the font.
With ansi characterset it's easy, just loop from 0-255 and
print the char representation of an integer value, but I don't
know how to achieve this.

How to achieve what? As Victor has pointed out, anything to do
directly with fonts is platform dependent, and you'll have to
ask specifically in a newsgroup for that platform. This
includes the question of how the font is encoded (ISO 8859-n,
JIS, various Unicode formats, etc.). After that, it's just a
simple for loop from the smallest encoding to the largest,
skipping illegal encodings, and probably non-printable
characters. Except, of course, that the number of characters
can be quite large: Unicode defines over a million, and I think
most far eastern encodings (e.g. JIS) will have tens of
thousands. So I'm not sure how you're going to list them all.

And while I'm at it: with ASCII (not ANSI) characters, the range
is 0-127, not 0-255, and characters in the range 0-31,127 are
control characters, with no printable representation (and which,
depending on the display device, may cause some other behavior).
Also: Arial is a font, but Arabic, Russian and Cyrillic aren't.
Arabic and Cyrillic are alphabets, and Arabic and Russian are
languages (and Russian is a nationality, and ...). I think you
probably need to learn a bit more about the domain first, before
you start even thinking about how to program the problem.

Although it may be more than you need, the absolute reference
here is, I think, "Fonts and Encodings", by Yannis Haralambous,
O'Reilly, ISBN 0-596-10242-9 (or 2-84177-273-X for the original
French). At the very least, skim over the introduction, and
read the first chapter (which deals with the numerous
pre-Unicode font encodings). (On the Web, Roman Czyborra has
one of the most informative sites I've seen, but I often have
problems accessing it.)
 
C

clinisbut

And while I'm at it: with ASCII (not ANSI) characters, the range
is 0-127, not 0-255, and characters in the range 0-31,127 are
control characters, with no printable representation (and which,
depending on the display device, may cause some other behavior).

Yeah, that's my mistake

Also: Arial is a font, but Arabic, Russian and Cyrillic aren't.
Arabic and Cyrillic are alphabets, and Arabic and Russian are
languages (and Russian is a nationality, and ...).  

I know that arabic, cyrillic are alphabets, I just mean arabic and
cyrillic fonts.

I think you
probably need to learn a bit more about the domain first, before
you start even thinking about how to program the problem.

Maybe my bad english didn't expose clearly my problem.
I didn't realize that this topic it's more OS dependant than I though,
so I say sorry again.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top