http://www.perlmonks.org?node_id=1200280


in reply to Tiny font

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.