Using IBM i? Need to create Excel, CSV, HTML, JSON, PDF, SPOOL reports? Learn more about the fastest and least expensive tool for the job: SQL iQuery.
So, I'm charged with making the font 'a little smaller' on a form we print out. This old pgm uses QSYSPRT and has an OVRPRTF command, so I thought I'd be able to change the cpi, or pitch, or something on it to get the desired effect, but no. I've changed font in external printer files with font code and pitch:
A STUNM1 28A 5 37FONT(2308 (*POINTSIZE 8))
So I tried using those values in the OVRPRTF. That, and anything else I try gives me a change - a much larger font that I can't change the size of - and no matter what font or size I try, I always get the same one.
No idea what the 'default' font is - the one I get if no font is specified on the OVRPRTF, and no idea how to know. Looks like courier.
Is there an easy way, or any way, to just make the existing font 'a little smaller'?
Looks like 2308 is Times New Roman, TrueType. Been awhile since I had to look for this, but I think it's in the joblog of either the printer driver job or the actual writer, ...maybe QSYSOPR. There may be messages about font substitution. If the font is not installed, or not available on the printer, then the system will substitute something that's close. If that's happening, it's possible that the font that's substituted may not react to the change in point size.
Font size is based on the Unit of Measure being Inches, regardless of what the UOM parameter indicates.
Setting the CPI to CPI(13.3) will generally work for 8pt fonts. I believe the minimum is CPI(5) but that's going in the opposite direction for an 8pt font.
Also, look at the Page Size. if the page size UOM is *ROWCOL, then the number of columns should be (at least):
If PAGESIZE(Y X *UOM) Columns per row = (pageWidth - pageMargin) * CPI; ELSEIF PAGESIZE(Y XY *ROWCOL) Inches per row = (pageWidthCol - PageMarginCol) / CPI; endif;