script to make font as a grid in plain text?

Discussion in 'Perl Misc' started by T, Nov 8, 2007.

  1. T

    T Guest

    I need to generate, from a truetype (Unicode) font a
    pattern of the font in a certain size. Basically to get a
    "grid" of the font, best in a selected size.

    There are examples here
    http://czyborra.com/unifont/

    but how to use scripts are not fully clear to me.


    What I need is an outcome that is similar to

    4E21:
    ----------------
    ----------------
    -#############--
    -------#--------
    -------#--------
    --###########---
    --#----#----#---
    --#-#--#--#-#---
    --#-#--#--#-#---
    --#-#--#--#-#---
    --#-#--#--#-#---
    --#-#######-#---
    --#-#-----#-#---
    --#---------#---
    --#--------##---
    ----------------

    ... and to be able to generate this type of pattern for
    any range of unicode characters, such as
    0400 .. 04FF or similar.


    Is there a script / module somewhere to do such thing ?
     
    T, Nov 8, 2007
    #1
    1. Advertising

  2. T wrote:
    > I need to generate, from a truetype (Unicode) font a
    > [bitmap] pattern of the font in a certain size.


    >
    > Is there a script / module somewhere to do such thing ?
    >


    It seems unlikely to me. It looks like a rather rare and arcane sort of
    requirement. Wouldn't you have to pass the font data through a Truetype
    rendering engine so that the font's hinting algorithms are processed? If
    the rendering engine doesn't have a method that delivers bitmap data to
    a normal IO stream then I guess you'd have to display it and scrape the
    bitmap off the display. If I was doing this I wouldn't pick Perl.

    Just my two U+00A2 worth. Just because it seems unlikely to an ignorant
    oaf like me doesn't mean that such a script/module doesn't exist. :)
     
    RedGrittyBrick, Nov 8, 2007
    #2
    1. Advertising

  3. RedGrittyBrick wrote:
    > T wrote:
    >
    >> I need to generate, from a truetype (Unicode) font a
    >> [bitmap] pattern of the font in a certain size.

    >
    >
    >>
    >> Is there a script / module somewhere to do such thing ?
    >>

    >
    > It seems unlikely to me. It looks like a rather rare and arcane sort of
    > requirement. Wouldn't you have to pass the font data through a Truetype
    > rendering engine so that the font's hinting algorithms are processed? If
    > the rendering engine doesn't have a method that delivers bitmap data to
    > a normal IO stream then I guess you'd have to display it and scrape the
    > bitmap off the display. If I was doing this I wouldn't pick Perl.


    Untested:
    Maybe you could use the ImageMagik packages to render the character into
    an image that you then load and dump.

    --
    These are my personal views and not those of Fujitsu Siemens Computers!
    Josef Möllers (Pinguinpfleger bei FSC)
    If failure had no penalty success would not be a prize (T. Pratchett)
    Company Details: http://www.fujitsu-siemens.com/imprint.html
     
    Josef Moellers, Nov 8, 2007
    #3
  4. T

    T Guest

    RedGrittyBrick <> wrote in news:47332e6b$0
    $21088$:


    > It seems unlikely to me. It looks like a rather rare and arcane sort of
    > requirement. Wouldn't you have to pass the font data through a Truetype
    > rendering engine so that the font's hinting algorithms are processed?


    That may be another way. Where do I ask how it's done (as a simple
    example)?

    All I need to have "Font X" rendered in a certain size onto a grid,
    to be used in an ANSI C application.

    You are welcome to mail me personally, just remove numbers from the mail.

    Thank you.
     
    T, Nov 9, 2007
    #4
    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. =?Utf-8?B?Tmlja3k=?=
    Replies:
    2
    Views:
    734
    Matt Berther
    Feb 20, 2005
  2. gino
    Replies:
    3
    Views:
    4,070
    Mike Smith
    Jul 11, 2004
  3. A
    Replies:
    0
    Views:
    299
  4. BMA TRADING

    Re: CGI script is in plain text

    BMA TRADING, Jul 4, 2003, in forum: Python
    Replies:
    1
    Views:
    534
    Alan Kennedy
    Jul 4, 2003
  5. mttc
    Replies:
    2
    Views:
    2,466
    Roedy Green
    Jul 3, 2009
Loading...

Share This Page