Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Multiple font sizes in the text of a shapenode. (Read 1761 times)
Mindfusion User
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 11
Joined: Apr 26th, 2022
Multiple font sizes in the text of a shapenode.
Jun 7th, 2022 at 1:05pm
Print Post  
Hi,

Can we apply multiple font sizes to different words in the text of a ShapeNode?

With the font property of a node, we can specify a distinct font for each node. But we need to specify multiple font sizes to the text of one node.

With the property "ShapeNode.enableStyledText", we can enable styled text and thus apply 'italic/bold/underlined/text color/subscript/superscript/..." to parts of the ShapeNode text.

Our current solution is to use the tag "subscript" of "enableStyledText" for text words that need a smaller font size.

Is there a better way to do this?

Kinds regards,
Mindfusion user.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3152
Joined: Oct 19th, 2005
Re: Multiple font sizes in the text of a shapenode.
Reply #1 - Jun 7th, 2022 at 1:54pm
Print Post  
Hi,

We'll try to add styled-text <size> tag for next release. If you don't need the differently-sized words arranged in same text flow, you could try using NodeLabel objects instead, but will have to position them yourself.

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Mindfusion User
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 11
Joined: Apr 26th, 2022
Re: Multiple font sizes in the text of a shapenode.
Reply #2 - Jun 8th, 2022 at 12:05pm
Print Post  
Hi,

Thank you for the information.

Kind regards,
M.U.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3152
Joined: Oct 19th, 2005
Re: Multiple font sizes in the text of a shapenode.
Reply #3 - Jul 26th, 2022 at 12:51pm
Print Post  
Hi,

Scripts here add support for size element -
https://mindfusion.eu/_beta/jsdiag423.zip

Code
Select All
function onNodeCreated(sender, e)
{
	e.node.enableStyledText = true;
	e.node.font = new Font("Arial", 16, false, false);
	e.node.text = "test <size=12>test</size> <size=8>test</size>";
} 



Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Mindfusion User
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 11
Joined: Apr 26th, 2022
Re: Multiple font sizes in the text of a shapenode.
Reply #4 - Aug 19th, 2022 at 7:06am
Print Post  
Thanks, this is much better!! Smiley
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint