Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Hello oha,

I present not a solution but maybe a workaround or better a last resort: I used it some times ago writing small little files, each one consisting of only one char, using Gimp2 and exporting them as pixmaps: obviously they are not text but images but you can play with little or very little font size and use Gimp2's antialiasing.

Below an example of a pixmap 32x32 (for sake of readability here) with the text:

,

using Sans with 10 pixel and antialiasing on. The image is grayscale. Gimp2's export -> pixmap gives you someting usable (the example is a ~3Kb image).

my $pixmap = <<'EOFFONT'; /* XPM */ static char * Icon_xpm[] = { "32 32 68 1", " g None", ". g #FFFFFF", "+ g #6A6A6A", "@ g #0A0A0A", "# g #191919", "$ g #B4B4B4", "% g #1B1B1B", "& g #C9C9C9", "* g #000000", "= g #CECECE", "- g #989898", "; g #797979", "> g #313131", ", g #7A7A7A", "' g #323232", ") g #BABABA", "! g #F4F4F4", "~ g #DFDFDF", "{ g #F5F5F5", "] g #CBCBCB", "^ g #222222", "/ g #FEFEFE", "( g #939393", "_ g #5D5D5D", ": g #949494", "< g #656565", "[ g #858585", "} g #FDFDFD", "| g #232323", "1 g #F2F2F2", "2 g #0C0C0C", "3 g #ACACAC", "4 g #393939", "5 g #ADADAD", "6 g #525252", "7 g #B8B8B8", "8 g #F8F8F8", "9 g #F7F7F7", "0 g #6D6D6D", "a g #161616", "b g #1E1E1E", "c g #9D9D9D", "d g #535353", "e g #787878", "f g #444444", "g g #E3E3E3", "h g #E2E2E2", "i g #181818", "j g #1F1F1F", "k g #D5D5D5", "l g #838383", "m g #929292", "n g #090909", "o g #F9F9F9", "p g #A1A1A1", "q g #A0A0A0", "r g #303030", "s g #999999", "t g #D3D3D3", "u g #202020", "v g #E4E4E4", "w g #424242", "x g #FCFCFC", "y g #545454", "z g #9C9C9C", "A g #1D1D1D", "B g #151515", "C g #6C6C6C", "................................", "................................", "................................", "................................", "................................", "......+@+.......................", "......#$%.......................", "......&*=..........-******......", "......;>,..........')*..........", ".....!%~%{........]^/*..........", ".....(_._:........<[.*****......", "....}^***|}......12***..........", "....34...45......-6..*..........", "....45...54.*....'7..*****......", "............*...................", "................................", "................................", "................8...............", "...........90abcd/..............", "...........efghi(...............", "...........jk.lm'...............", "...........nopq9@...............", "...........rsl.tu...............", "...........(#vgw,...............", "..........xyzABC9...............", "................................", "................................", "................................", "................................", "................................", "................................", "................................"}; EOFFONT

Please note that gimp2 normally use a full path to the file like:

static char * /path/to/small_fonts2_xpm[] = {

as second line of the file.

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

In reply to Re: Tiny font -- pixmap by Discipulus
in thread Tiny font by oha

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2022-05-24 20:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (84 votes). Check out past polls.

    Notices?