You could define the actual width of each number and potential symbol as constants, then evaluate each character in the field to determine that field’s actual print width. You would then use that value as a bias to adjust the horizontal part of the POSITION coding so as to make it psuedo-right-aligned.

That’s how it worked just now in my mind anyway… 😉 It’d be an interesting exercise, for sure. It also wouldn’t likely carry over very well between printers, due to subtle typographic differences.

I am afraid it had to be a best fit solution, not aligned exactly, very readable.

]]>By: philpl1jbhttp://itknowledgeexchange.techtarget.com/itanswers/typographicproportionally-spaced-fonts/#comment-97525
Thu, 06 Oct 2011 23:43:43 +0000#comment-97525Yes, WoodE I thought that would be the case. That’s why word provides left, right, and decimal alignment. With the suggestions on this page you can do left alignment of proportional print but decimal columns will only look good in fixed format.
Phil
]]>By: woodengineerhttp://itknowledgeexchange.techtarget.com/itanswers/typographicproportionally-spaced-fonts/#comment-97504
Thu, 06 Oct 2011 15:33:33 +0000#comment-97504Hello ITDavid,

I would be interested to hear if you were able to align the decimal numbers using proportional fonts. We gave this a serious try a few years ago but could never achieve decimal alignment.

IPDS is a protocol that you can write to directly from a print program – inserting the escape characters followed by whatever data. Been there – you don’t want ot do that.

HPGL – the printer driver language from HP seems to be pretty much the largest standard now, and on the device configuration you would need to specify the printer type or emulation (forget the precise bit of the command) to say that its a *HPxx – depends on the particular printer and which dialect / superset it will understand.

Getting hold of the real manual for the printer, and the IBM *DEV CFG details is a start point.

Ha – I like printers – many happy (!) hours sorting print issues.

Or – you use a product which does a post print passto create, say, a PDF, or otherwise manipulate the data ready for a printer. By adding images and rules (lines) you can print on demand for invoices, statements, or whatever.

remeber the adage

‘Dragons be here’

]]>By: philpl1jbhttp://itknowledgeexchange.techtarget.com/itanswers/typographicproportionally-spaced-fonts/#comment-97472
Thu, 06 Oct 2011 00:45:49 +0000#comment-97472Great, you guys sure taught me something.
it sounds like this is the way to go
– use POSITION
– compile as an AFPDS type file
does this require IPDS printer?

What about a numeric columns with decimal points?
Say one has value of
555,555.55
and the next
11.11
The column is aligned but the value doesn’t look aligned.

How are you specifying “start position” and how are columns positioned relative to a “start position”?

You can’t use anything relating to number of characters because, as Phil is saying, different characters have different widths in proportional fonts.

So, as WoodEngineer mentions, you have to use some fixed unit of measurement such as *INCH or *CM to say how far across a line a column should be.

That’s just how proportional fonts work in any columnar print formatting. It’s very difficult to determine how wide a given column will be. All you can be sure of is where a column ought to begin across a line. Then you let the printer put the value on the line beginning at that point.