NormalAutoFit Class
Normal AutoFit.When the object is serialized out as xml, its qualified name is a:normAutofit.
Inheritance Hierarchy
System.Object
DocumentFormat.OpenXml.OpenXmlElement
DocumentFormat.OpenXml.OpenXmlLeafElement
DocumentFormat.OpenXml.Drawing.NormalAutoFit
Namespace: DocumentFormat.OpenXml.Drawing
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)
Syntax
'Declaration
Public Class NormalAutoFit _
Inherits OpenXmlLeafElement
'Usage
Dim instance As NormalAutoFit
public class NormalAutoFit : OpenXmlLeafElement
Remarks
[ISO/IEC 29500-1 1st Edition]
21.1.2.1.3 normAutofit (Normal AutoFit)
This element specifies that text within the text body should be normally auto-fit to the bounding box. Auto-fitting is when text within a text box is scaled in order to remain inside the text box. If this element is omitted, then noAutofit or auto-fit off is implied.
[Example: Consider the situation where a user is building a diagram and needs to have the text for each shape that they are using stay within the bounds of the shape. An easy way this might be done is by using normAutofit. The following DrawingML illustrates how this might be accomplished.
<p:sp> <p:txBody> <a:bodyPr rtlCol="0" anchor="ctr"> <a:normAutofit fontScale="92.000%" lnSpcReduction="20.000%"/> </a:bodyPr> … <a:p> … <a:t>Diagram Object 1</a:t> … </a:p> </p:txBody> </p:sp> <p:sp> <p:txBody> <a:bodyPr rtlCol="0" anchor="ctr"> <a:normAutofit fontScale="92.000%" lnSpcReduction="20.000%"/> </a:bodyPr> … <a:p> … <a:t>Diagram Object 2</a:t> … </a:p> </p:txBody> </p:sp>
In the above example there are two shapes that have normAutofit turned on so that when the user types more text within the shape that the text actually resizes to accommodate the new data. For the application to know how and to what degree the text should be resized two attributes are set for the auto-fit resize logic. end example]
Parent Elements |
---|
bodyPr (§21.1.2.1.1) |
Attributes |
Description |
---|---|
fontScale (Font Scale) |
Specifies the percentage of the original font size to which each run in the text body is scaled. In order to auto-fit text within a bounding box it is sometimes necessary to decrease the font size by a certain percentage. Using this attribute the font within a text box can be scaled based on the value provided. A value of 100% scales the text to 100%, while a value of 1% scales the text to 1%. If this attribute is omitted, then a value of 100% is implied. The possible values for this attribute are defined by the ST_TextFontScalePercentOrPercentString simple type (§20.1.10.67). |
lnSpcReduction (Line Space Reduction) |
Specifies the percentage amount by which the line spacing of each paragraph in the text body is reduced. The reduction is applied by subtracting it from the original line spacing value. Using this attribute the vertical spacing between the lines of text can be scaled by a percent amount. A value of 100% reduces the line spacing by 100%, while a value of 1% reduces the line spacing by one percent. If this attribute is omitted, then a value of 0% is implied. [Note: This attribute applies only to paragraphs with percentage line spacing. end note] The possible values for this attribute are defined by the ST_TextSpacingPercentOrPercentString simple type (§20.1.10.77). |
[Note: The W3C XML Schema definition of this element’s content model (CT_TextNormalAutofit) is located in §A.4.1. end note]
© ISO/IEC29500: 2008.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.