Hi

I am creating headers of different width i.e. 1 to 8 columns wide, but am trying to scale the font to be wider as the columns get wider but can;t find anything online as to how this is done using postscript::simple, I have managed to manually manipulate a postscript file to do this but wondering where anyone knows how to do this using postscript::simple; Has anyone any ideas? Below is the main part of the perl

Thanks Dave

while ($counter <= $number_of_columns)
{#start counting columns
# Build up measure e.g. total width for 6-col is 6 x number of cols + 5 x gutters
$measure = ($column_width * $counter) + ($gutter * ($counter-1));
$center_point = $measure/2; # Used for centering lines of type
use PostScript::Simple;
# create a new PostScript object
$p = new PostScript::Simple(portrait => 1,
xsize => $measure,
ysize => $depth,
colour => 0,
reencode => undef,
eps => 0,
units => "pt");
# create a new page
$p->newpage;
# draw lines or other shapes
$p->setlinewidth( 1.00 );
$p->box(.25,.25, $measure,$depth);
$p->setcolour("black");
$p->box( {filled => 1},0,0,$measure,$depth);
$p->setlinewidth( 0 );
$p->box(.25,.25, $measure,$depth-1.75);
$p->setcolour("white");
$p->box( {filled => 1},.25,.25,$measure,$depth-2);
# add text
$p->setcolour("black");
$p->setfont("FlamaNewsMedium", 9);
#$p->setfont("FlamaNewsMedium", 15);
$p->text( {align => 'center'},$center_point,$depth/3, "$categories{$cat_number}");
# write the output to as many files as you need
$p->output("100\\in\\${cat_number}\-${counter}x${cm_depth}.ps");
$counter++;
}
}

In reply to postscript::simple scalefont by daviekiernan

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.