list all characters available

Discussion in 'C++' started by clinisbut, Apr 10, 2008.

  1. clinisbut

    clinisbut Guest

    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?
    clinisbut, Apr 10, 2008
    #1
    1. Advertising

  2. clinisbut

    clinisbut Guest

    On Apr 10, 2:00 pm, "Victor Bazarov" <> wrote:
    > clinisbut wrote:
    > > 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?

    >
    > 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
    > --
    > Please remove capital 'A's when replying by e-mail
    > I do not respond to top-posted replies, please don't ask


    oops, sorry!
    clinisbut, Apr 10, 2008
    #2
    1. Advertising

  3. On Thu, 10 Apr 2008 04:30:47 -0700, clinisbut wrote:

    > 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

    --
    OU
    Obnoxious User, Apr 10, 2008
    #3
  4. clinisbut

    James Kanze Guest

    On Apr 10, 1:30 pm, clinisbut <> wrote:

    > 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.)

    --
    James Kanze (GABI Software) email:
    Conseils en informatique orientée objet/
    Beratung in objektorientierter Datenverarbeitung
    9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
    James Kanze, Apr 11, 2008
    #4
  5. clinisbut

    clinisbut Guest

    > 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.
    clinisbut, Apr 11, 2008
    #5
    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. Natty Gur
    Replies:
    0
    Views:
    2,567
    Natty Gur
    Jun 6, 2004
  2. =?Utf-8?B?VHJldm9yIEJlbmVkaWN0IFI=?=
    Replies:
    0
    Views:
    2,382
    =?Utf-8?B?VHJldm9yIEJlbmVkaWN0IFI=?=
    Jun 7, 2004
  3. Benjamin Rutt

    getting list of all available modules

    Benjamin Rutt, Jun 21, 2005, in forum: Python
    Replies:
    2
    Views:
    368
    Peter Otten
    Jun 21, 2005
  4. Daniel Schüle
    Replies:
    6
    Views:
    94
    Gene Tani
    Dec 5, 2005
Loading...

Share This Page