Hello,
I want to create a FreeText annotation by JavaScript. I Need to create this annotation with a monospaced font. My script is working - but the annotation is always drawn in font.Helv(?) and not in font.Cour.
How can I change this to the needed behaviour?
Greetings
Hans-Peter
Script:
var annot = this.addAnnot
({
type: "FreeText",
page: 0,
textFont: font.Cour,
textSize: 12,
rect: [235.4114,631.2243,308.9114,644.7243],
width: 0,
fillColor: color.transparent,
strokeColor: ["RGB", 0.00,0.00,0.00],
alignment: 0,
opacity: 1,
rotate: 0,
contents: "_iMi_"
});
Set font of a FreeText annotation
Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
-
- User
- Posts: 49
- Joined: Tue Dec 28, 2004 9:49 am
- Tracker Supp-Stefan
- Site Admin
- Posts: 17941
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Set font of a FreeText annotation
Hello prosozial_schmitt,
Your code worked for me in the stand alone portable Viewer, though the font used for the annotation was CourierPS.
Please try changing the following line:And see if using the non post script uniform font will work better for your needs?
Also please make sure that you have the latest version of the dlls to make sure this is not an issue with an older build.
Regards,
Stefan
Your code worked for me in the stand alone portable Viewer, though the font used for the annotation was CourierPS.
Please try changing the following line:
Code: Select all
textFont: "Courier New",
Also please make sure that you have the latest version of the dlls to make sure this is not an issue with an older build.
Regards,
Stefan
-
- User
- Posts: 49
- Joined: Tue Dec 28, 2004 9:49 am
Re: Set font of a FreeText annotation
Hi Stefan,
I've tried it with textFont: "Courier New" and it works. Using "Arbitrary font" font.Cour seems not to work - but this is now not a real problem for me.
Great
Thank you very much
Hans-Peter
I've tried it with textFont: "Courier New" and it works. Using "Arbitrary font" font.Cour seems not to work - but this is now not a real problem for me.
Great
Thank you very much
Hans-Peter
- Tracker Supp-Stefan
- Site Admin
- Posts: 17941
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Set font of a FreeText annotation
Glad I could assist Hans-Peter!
Cheers,
Stefan
Cheers,
Stefan