Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 23rd, 2024, 8:11 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Select font via DLL
PostPosted: January 22nd, 2009, 5:23 pm 
Offline

Joined: May 16th, 2008, 4:50 pm
Posts: 368
Location: Berghem The Netherlands
Opus: Opus Pro 9.75
OS: Windows 10
System: `HP
I learned a lot using the demofile "CallDLL demo" that comes with opus as a sample file.
Is there somewhere a DLL available to select and change fonts in a publication.
Like to hear from one of you.


Ad


Top
 Profile Visit website  
 
 Post subject: Why use a DLL?
PostPosted: January 25th, 2009, 8:46 pm 
Offline

Joined: March 8th, 2005, 9:40 pm
Posts: 63
Hi Ad,

Perhaps you could do this more easily using OpusScript?

See exerpt from the Opus Script manual (page 306):
Quote:
SetSelectionStyle
Syntax:
SetSelectionStyle( Style )
Parameters:
Style – Style is a reference to one property of an object that can be used to set one of the style formats of a Text object. For example, Style could make the text within a Text object bold, italic, underline, subscript or superscript. Or Style could change a Text objects, font, fontsize, fontaspect, colour, backgroundcolour or shadowcolour. For correct syntax, refer to the GetSelectionStyle function. This parameter is required.
Remarks:
This function allows you to set a new formatting style to a Text object. Only the properties specified are applied to the text.
Example:
For example, to set the Text object named myText to all bold use the following syntax:
myText.SetSelection(0,-1)
var newStyle = new Object()
newStyle.bold = true
myText.SetSelectionStyle(newStyle)


You can use a variable, that can be inputed from a txt box or even a txt or ini file, to allow the user to change the font size.

Hope this helps...
Sometimes the simpler the solution, the better it works.

_________________
Opus Pro V6
Dell Inspiron 9400
Intel Centrino Duo 2GHz
2 Gig Ram
XP SP2


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 47 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group