IMPORTANT ANNOUNCEMENT

These forums were permanently set to read-only mode on July 20, 2022. From that day onwards, no new posting or comment is allowed on the site, but the historical content remains intact and searchable.

A new location for posting questions about PlanetPress Suite is now available:

OL Learn - PlanetPress Classic (opens in new tab)

Topic Options
#42719 - 03/14/13 12:37 PM Error - 'No current font in string width'
a.a.c Offline
OL Newbie

Registered: 03/08/12
Posts: 11
My PressTalk is not excepted and the error I get is 'No current font in string width'

what is the cause of this error?

here is the offending code:

&G_StringWidth := stringwidth(&G_Detail)
&G_Width := &G_Width + &G_StringWidth

MoveTo(&G_Width,&G_PositionOnPage)
%Margin(0.0000,0.0000)
BeginParagraph(0.0000,&G_Width,0.0000,'left',0.1667,False)
SetStyle(&Courier)
Show(&G_Detail)
EndParagraph()

Top
#42720 - 03/14/13 12:38 PM Re: Error - 'No current font in string width' [Re: a.a.c]
a.a.c Offline
OL Newbie

Registered: 03/08/12
Posts: 11
If you can help that would be great!

Thanks,
AAC

Top
#42721 - 03/14/13 12:48 PM Re: Error - 'No current font in string width' [Re: a.a.c]
Olivier J
Unregistered


Hi a.a.c,

You need the setstyle or setstyleext command before performing a stringwidth so that the system knows what to use to calculate the width. Using courier vs Arial would produce different results since one is a monospace font and the other a proportional font.

Try it out and let us know if you have further questions.
Regards,
Olivier

Top