Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > script to make font as a grid in plain text?

Reply
Thread Tools

script to make font as a grid in plain text?

 
 
T
Guest
Posts: n/a
 
      11-08-2007
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 ?


 
Reply With Quote
 
 
 
 
RedGrittyBrick
Guest
Posts: n/a
 
      11-08-2007
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.
 
Reply With Quote
 
 
 
 
Josef Moellers
Guest
Posts: n/a
 
      11-08-2007
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

 
Reply With Quote
 
T
Guest
Posts: n/a
 
      11-09-2007
RedGrittyBrick <(E-Mail Removed)> wrote in news:47332e6b$0
$21088$(E-Mail Removed):


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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Swing Font, it's Java Font? ot native? how install new font? mttc Java 2 07-03-2009 07:29 PM
How to get the text in html tag.like<div...><font...>Text</font></ =?Utf-8?B?Tmlja3k=?= ASP .Net 2 02-20-2005 03:03 PM
Font class, external font files question Karl Hungus ASP .Net 1 02-04-2004 04:26 PM
JavaRE 1.4.2 font alias in /lib/font.properties (Linux) Nick Spinel Java 0 07-25-2003 08:28 AM
physical font specified but true type font file not available Michael Glavitsch Java 1 07-15-2003 07:09 PM



Advertisments