News:

BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

Automatic font sizing

Started by wapperdude, June 22, 2012, 02:26:10 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

wapperdude

There are times when the alloted area for text is fixed and limited, both in width and height.  It would be nice to take the Power Point feature that re-sizes the font based upon the text box height and width.

Wapperdude
Visio 2019 Pro

vojo

isnt this something that was shown 5+ years ago

user.scale  = <current textwidth or shapewidth> / <original textwidth or shapewidth>

font = <original font> * user.scale

This will scale font based on text or shape size

wapperdude

#2
Yep.  But, it doesn't go far enough...

1.)  It's not builtin, Power Point gives you a check box to activate the feature.
2.)  The formula is only width based and will not react to shape's height.
3.)  Plus, the formula had some issues as I recall...
      a.  Original width had to be hardcoded
      b.  or use the setatref function which is difficult to use.
      c.  alternate technique, which does recognize height:  http://blogs.msdn.com/b/visio/archive/2006/08/11/694681.aspx

Anyway, the point is to automate this.
Visio 2019 Pro

vojo

RE 1)   fair enough
RE 2)   Always can do sqrt of width ^2 + height^2
RE 3.A)  True...but since shape is in a stencil....it had to be created aprioiri
             I guess you could look at some VBA to do this
RE 3.B)  yep...hard to do
RE 3.C)  have not checked it out...maybe a better way

I dont think you will be able to automate.   Even if VBA triggers on event, you would still need to do this as a template or put the VBA in a stencil...so becomes custom anyway.

if you come up with a better way...congrats...look forward to seeing it.

Maybe this is another reason question why MS spent all that time on containers

Personally, I think it would be best of MS married the precision of visio with the comprehensive features of powerpoint into 1 tool.   I doubt they will ever do that
since it plays with the revenue model....but I can dream cant I ;-)

wapperdude

I agree that it would take some code in the background to do this, but, considering the functionality built into the Org chart and timelines, what can be so tough?

Merge Power Point and Visio?  Interesting concept.  Not in our lifetimes!

The link I gave is mostly interesting to explore scaling vs height.  It doesn't really autoscale in the sense of Power Point.

Visio 2019 Pro

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 207 (show)
Files included: 32 - 1207KB. (show)
Memory used: 1048KB.
Tokens: post-login.
Cache hits: 13: 0.00159s for 26,723 bytes (show)
Cache misses: 3: (show)
Queries used: 17.

[Show Queries]