PPT negative font sizes 
Author Message
 PPT negative font sizes

I'm writing a little app to automatically resize Powerpoint slides.

If a font is chosen that is between one of the standard sizes, the
fontsize is reported as a negative number. For example, Arial at 15 has
a size of -2.

This is really messing with my program. Currently I don't resize if the
font size is negative, but I need a better ling-term solution.

Has anyone else seen this and succesfully dealt with it?



Mon, 27 Sep 2004 13:25:14 GMT  
 PPT negative font sizes

Quote:
> If a font is chosen that is between one of the standard sizes, the
> fontsize is reported as a negative number. For example, Arial at 15 has
> a size of -2.

PPT often uses -2 to mean "mixed"
It'll give you -2 if you do:

ActiveWindow.Selection.ShapeRange.TextFrame.TextRange

when the text in the box is of mixed sizes.

You may need to iterate through each character and deal with it
individually.



Mon, 27 Sep 2004 21:38:29 GMT  
 PPT negative font sizes
John,

In addition to what Steve said. When working with text boxes which have
multiple font formatting, make the most of the 'Runs' method. A run
represents a collection of sequential characters within a textrange which
share the same font attributes (font name, bold, italic etc).

--
Regards
Shyam Pillai

http://www.mvps.org/skp


Quote:
> I'm writing a little app to automatically resize Powerpoint slides.

> If a font is chosen that is between one of the standard sizes, the
> fontsize is reported as a negative number. For example, Arial at 15 has
> a size of -2.

> This is really messing with my program. Currently I don't resize if the
> font size is negative, but I need a better ling-term solution.

> Has anyone else seen this and succesfully dealt with it?



Tue, 28 Sep 2004 01:25:02 GMT  
 PPT negative font sizes
Yes, thanks for bringing that up, Shyam.  You could iterate through the runs
collection rather than muck around with it a character at a time.
Quote:
> In addition to what Steve said. When working with text boxes which have
> multiple font formatting, make the most of the 'Runs' method. A run
> represents a collection of sequential characters within a textrange which
> share the same font attributes (font name, bold, italic etc).

> --
> Regards
> Shyam Pillai

> http://www.mvps.org/skp



> > I'm writing a little app to automatically resize Powerpoint slides.

> > If a font is chosen that is between one of the standard sizes, the
> > fontsize is reported as a negative number. For example, Arial at 15 has
> > a size of -2.

> > This is really messing with my program. Currently I don't resize if the
> > font size is negative, but I need a better ling-term solution.

> > Has anyone else seen this and succesfully dealt with it?



Tue, 28 Sep 2004 07:12:29 GMT  
 PPT negative font sizes
Thanks everyone. I was able to get my project working with your help.

John



Thu, 30 Sep 2004 02:33:55 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Restore font size in scaled Graph (in PPT)

2. Windows Display Font Sizes Vs. Application Font Sizes

3. Printing a Bitmap with a specific font size On print Font size incorrect

4. Change size, font, and font size of input boxes

5. Negative Log device size and problem in restoring DB by applying Log

6. Open PPT - Run SlideShow - Close PPT

7. Get width of text in pixels (taking into account font, font size and style)

8. How to get font sizes for a font

9. FONTS: Need Raster font sizes.

10. REQ: Obtaining Font Sizes for specific Font

11. Changing font/font sizes in msgboxes

12. Printer.Font.Name and Printer.Font.Size problems with HP LaserJets

 

 
Powered by phpBB® Forum Software