I'm using Python and reportlab to generate PDFs. I would like to switch from the font CourierCondensed to Courier scaled by 90 %. However, I would like to scale the font width only, while keeping the font height the same.
This is how my paragraph style looks like:
scale_factor = 1.0
my_style= ParagraphStyle(
name=font_name,
parent=my_parent,
fontName=font_name_string,
fontSize=font_size*scale_factor,
leading=font_size)
This is the output if I use CourierCondensed:
This is the output if I use Courier scaled by 90 % (i.e. if the scale_factor is set to 0.9):
One can note that the second image shows a text with much smaller margins. Hence, I would like to keep the initial height of the font to avoid a very large change of the margins.
Any help or pointers would be highly appreciated.
Courier was designed well for dual vector/raster use without altering the Ratios, Here we can see when translated into screen pixels they are crisp at a nominal 12pt However Courier New and Courier Condensed do not fare so well. If you scale font metrics disproportionately at best you get poor screen placements or fuzzy letters.
It would be best to see if normal font scales can suffice rather than add potential distortion later.
If you really must rescale it may be better to do it using a programmable method on the whole file, (this should scale pixel containers by the same proportions) thus best way could be have pages that are 111.111% normal width, then run,
cpdf -scale-page "0.9 1.0" in.pdf -o out90%wide.pdf
However you can fit 152 characters at native scale in A3 sheet such that the quality is held for sub pixel rendering