RTF is not printed correctly when mixing normal and symbol

Knowledge exchange related to the VPE Report Engine and PDF Library

Moderator: IDEAL Software Support

RTF is not printed correctly when mixing normal and symbol

Postby wriedmann » Wed Nov 28, 2012 11:02 am

Hello,

when mixing normal fonts and symbol fonts in RTF text, VPE seems to loose the correct character spacing on the normal parts.

This code works perfectly:

VpeWriteRTF ( hDoc , 200, 200 , VFREE , VFREE, "{{\fonttbl{\f1 Arial;}{\f2 Symbol;}}\f1Hello, this is normal text in \f1 Arial.}" )

whereas with with this code the result is not as exepcted:

VpeWriteRTF( hDoc, 200, 200, VFREE, VFREE, "{{\fonttbl{\f1 Arial;}{\f2 Symbol;}}\f1Hello, this is normal text in \f2 Symbol.}" )

In the first case the text is perfectly readable, in the second case the Arial characters are printed with a negative character-to-character space, resulting in partially overwritten characters.

I had this issue because a customer needed greek characters in a normal text.

Thank you in advance!

Wolfgang
wriedmann
 
Posts: 26
Joined: Sun Feb 06, 2011 10:11 pm

Re: RTF is not printed correctly when mixing normal and symb

Postby IDEAL Software Support » Wed Nov 28, 2012 2:14 pm

For symbol fonts used in RTF you need to specify the Symbol Charset with \fcharset2 in the font table.

Example:
VpeWriteRTF(hDoc, 2, 2, -17, VFREE, "{{\fonttbl{\f1 Arial;}{\f2 Symbol;\fcharset2}}\f1Hello \f2 Symbol.}")
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm

Re: RTF is not printed correctly when mixing normal and symb

Postby wriedmann » Wed Nov 28, 2012 3:40 pm

Thank you very much!

Please include this in the help for the next version if possible.

Wolfgang
wriedmann
 
Posts: 26
Joined: Sun Feb 06, 2011 10:11 pm


Return to VPE Open Forum

Who is online

Users browsing this forum: No registered users and 8 guests