Displaying decimals with arial font are not aligned

Knowledge exchange related to the VPE Report Engine and PDF Library

Moderator: IDEAL Software Support

Displaying decimals with arial font are not aligned

Postby thomasr » Thu Apr 24, 2008 12:52 am

Hi

I need to display a report in arial font but the decimals do not line up properly because arial is a proportional font. When displaying 1.11 and 11.11 underneath each other the decimal point is not in line because of the leading spaces not using the same width as numbers.
Is there a way around this problem.
I am using VPE 3.20

Thanks
Thomas Rothlisberger
thomasr
 
Posts: 15
Joined: Sun Dec 05, 2004 11:21 pm
Location: Brisbane

Postby IDEAL Software Support » Thu Apr 24, 2008 8:43 am

Digits are always monospaced, even in proportional fonts. To make the decimal point aligned, output the whole decimal numbers right-aligned, i.e. set the property TextAlignment = ALIGN_RIGHT.

It is also recommended to strip off all leading and trailing blanks around the decimal-numbers, before inserting them into the VPE document.

Hint: at least for Arial and Times New Roman there is also a second rule: two blanks have the equal width of a single digit.
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm


Return to VPE Open Forum

Who is online

Users browsing this forum: No registered users and 14 guests

cron