Printing small caps

Knowledge exchange related to the VPE Report Engine and PDF Library

Moderator: IDEAL Software Support

Printing small caps

Postby Bengt » Sat Jan 27, 2007 9:48 pm

Is it possible to print small caps with VPE? It ought to
be an option in VpeSetFontAttr like italic, bold etc., but at least in my
3.2 version, it is not there.

/Bengt
Bengt
 
Posts: 89
Joined: Fri Jan 27, 2006 5:29 pm

Postby IDEAL Software Support » Mon Jan 29, 2007 5:05 pm

I think you mean superscript or subscript? This will be possible in the next version of VPE - using the Rich Text Object.

If you mean to output text with a smaller font size within one run, then this is possible using the Rich Text Object (requires VPE Professional Edition or higher).

Regards
Thorsten Radde
IDEAL Software GmbH
IDEAL Software Support
 
Posts: 1622
Joined: Thu Nov 18, 2004 4:03 pm

Printing small caps

Postby Bengt » Tue Jan 30, 2007 12:13 am

Small caps can for instance be used in MS word (2003). It is one of the options under Formate/Fonts/Effects. Superscript and subscript are other options under that headline. Small caps means that the upper-case letters should be like normal capitlals, but the lower-case letters look like smaller capital letters.

It is important in my application because according to an newly adopted European standard, certain parts of plant names shall be printed in small caps. For instans, the full name of the rose Allotria should be
Rosa ALLOTRIA ('Tanal')
where the first A in Allotria shall be like a normal upper-case A, and the other letters shall be smaller capital letters.

My idea was to first print Rosa, change to small caps, print ALLOTRIA and then change back to normal letters. Can that be done with Rich text objects?

Regards,
Bengt

IDEAL Software Support wrote:I think you mean superscript or subscript? This will be possible in the next version of VPE - using the Rich Text Object.

If you mean to output text with a smaller font size within one run, then this is possible using the Rich Text Object (requires VPE Professional Edition or higher).

Regards
Thorsten Radde
IDEAL Software GmbH
Bengt
 
Posts: 89
Joined: Fri Jan 27, 2006 5:29 pm

Postby IDEAL Software Support » Tue Jan 30, 2007 5:31 pm

Thank you for your explanation.

This can be achieved using the Rich Text Object. It does not understand the SmallCaps RTF-instruction, but it is simple to synthesize by just setting the font size lower and using uppercase letters.

Example:
Code: Select all
VPE.WriteRTF(100, 100, -500, VFREE, "\fs24 H\fs18 ELLO \fs24 World!")


Would write the word "Hello" in small caps.

Hint: If using C or C++, substitute each "\" with "\\".

Regards
Thorsten Radde
IDEAL Software GmbH
IDEAL Software Support
 
Posts: 1622
Joined: Thu Nov 18, 2004 4:03 pm

Small caps

Postby Bengt » Wed Jan 31, 2007 9:59 am

Thank you for your help,

in fact I have also succeded to print what I need without using the Rich Text object. Some programming had to be done, but it looks as I want to.

Regards,
Bengt
Bengt
 
Posts: 89
Joined: Fri Jan 27, 2006 5:29 pm

Postby IDEAL Software Support » Wed Jan 31, 2007 3:01 pm

Your solution will work for a specific font at a specific font size. But if you change any of those parameters, the horizontal alignment might be incorrect. With RTF this can not happen, because text is oriented at the baseline (whilst normal text is oriented at the top position).

Regards
Thorsten Radde
IDEAL Software GmbH
IDEAL Software Support
 
Posts: 1622
Joined: Thu Nov 18, 2004 4:03 pm


Return to VPE Open Forum

Who is online

Users browsing this forum: No registered users and 82 guests