script to make font as a grid in plain text?

T

T

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 ?
 
R

RedGrittyBrick

T said:
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. :)
 
J

Josef Moellers

RedGrittyBrick said:
T said:
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.
 
T

T

[email protected]:

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.
 

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

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top