Author Topic: Automatic font sizing  (Read 4494 times)

0 Members and 1 Guest are viewing this topic.

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3825
  • Ideas Visio-lized into solutions
Automatic font sizing
« on: June 21, 2012, 09:26:10 PM »
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

  • Hero Member
  • *****
  • Posts: 1517
Re: Automatic font sizing
« Reply #1 on: June 22, 2012, 07:04:08 AM »
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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3825
  • Ideas Visio-lized into solutions
Re: Automatic font sizing
« Reply #2 on: June 22, 2012, 09:40:09 AM »
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.
« Last Edit: June 22, 2012, 09:46:16 AM by wapperdude »
Visio 2019 Pro

vojo

  • Hero Member
  • *****
  • Posts: 1517
Re: Automatic font sizing
« Reply #3 on: June 23, 2012, 03:10:41 PM »
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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3825
  • Ideas Visio-lized into solutions
Re: Automatic font sizing
« Reply #4 on: June 23, 2012, 03:40:55 PM »
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