FreeText Annotation TextStyle

766 views
Skip to first unread message

Siddharth Shah

unread,
Mar 5, 2015, 4:53:33 PM3/5/15
to pdfne...@googlegroups.com
Hi,
I am using FreeText Annotations, in android sdk. I want to set TextStyle as Bold/Italic/Normal. Please tell me what API to use. 

I think it's setDefaultAppreance, but I didn't get it. Please explain.

Cheers,
Siddharth

Ryan

unread,
Mar 9, 2015, 2:54:33 PM3/9/15
to pdfne...@googlegroups.com
You need to do this by setting a different bold/italic font, and you set the font by calling setDefaultAppearance. So I would call getDefaultAppearance, and look for the following entry.

"/op1 op2 Tf" and change op1 to a font, and the call the setting. Note the "/" forward slash character for op1, this is required for the Tf operator. op2 is the font size.

The following are the 14 built in fonts. I would use one of these, as picking an arbitrary font and making it work with the default appearance setting is more work to get right.

Times-Roman, Helvetica, Courier, Symbol, Times-Bold, Helvetica-Bold, Courier-Bold, ZapfDingbats, Times-Italic, HelveticaOblique, Courier-Oblique, Times-BoldItalic, Helvetica-BoldOblique, Courier-BoldOblique

We are looking to improve this interface but there is no concrete plan/timeline yet.


Reply all
Reply to author
Forward
0 new messages