Page 1 of 1

calculating row height for specific font

Posted: Thu Jun 07, 2012 6:16 pm
by bwolfsohn
Roger, etal,

I'm working on a report using dcprint, with a standard grid of 60x80.

One of the items i'm printing is using a small font 7.Arial or 8.Arial.

I'd like to move down a partial row (xx:=xx+.nn) instead of an entire row (xx++) when printing an entire paragraph in this small font.

How do i calculate the specific row height (.nn) in terms of xx for a given font ?

Brian

Re: calculating row height for specific font

Posted: Thu Jun 07, 2012 7:21 pm
by RDalzell
Hi Brian,

Have a look at Roger's PageSize example in \Samples\Printer

Best regards,
Rick

Re: calculating row height for specific font

Posted: Thu Jun 07, 2012 8:16 pm
by rdonnay
Brian -

Look at the function DC_GraQueryTextBox().
It returns an array based on the text and font.

Roger

Re: calculating row height for specific font

Posted: Fri Jun 08, 2012 12:30 am
by skiman
Hi Brian,

I'm using the following:

Code: Select all

oPrinter:SetFont(aFont[x])
oFont := oPrinter:GetFontObject() 
nHeight := oFont:height 
Hope this helps.