calculating row height for specific font

This forum is for eXpress++ general support.
Post Reply
Message
Author
bwolfsohn
Posts: 648
Joined: Thu Jan 28, 2010 7:07 am
Location: Alachua, Florida USA
Contact:

calculating row height for specific font

#1 Post 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
Brian Wolfsohn
Retired and traveling around the country to music festivals in my RV.
OOPS.. Corona Virus, so NOT traveling right now...
http://www.breadmanrises.com
FB travel group: The Breadman Rises

User avatar
RDalzell
Posts: 205
Joined: Thu Jan 28, 2010 6:57 am
Location: Alsip, Illinois USA

Re: calculating row height for specific font

#2 Post by RDalzell »

Hi Brian,

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

Best regards,
Rick

User avatar
rdonnay
Site Admin
Posts: 4729
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: calculating row height for specific font

#3 Post by rdonnay »

Brian -

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

Roger
The eXpress train is coming - and it has more cars.

skiman
Posts: 1185
Joined: Thu Jan 28, 2010 1:22 am
Location: Sijsele, Belgium
Contact:

Re: calculating row height for specific font

#4 Post 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.
Best regards,

Chris.
www.aboservice.be

Post Reply