BalanceSingleByteDoubleByteWidth Class
Balance Single Byte and Double Byte Characters.When the object is serialized out as xml, its qualified name is w:balanceSingleByteDoubleByteWidth.
Inheritance Hierarchy
System.Object
DocumentFormat.OpenXml.OpenXmlElement
DocumentFormat.OpenXml.OpenXmlLeafElement
DocumentFormat.OpenXml.Wordprocessing.OnOffType
DocumentFormat.OpenXml.Wordprocessing.BalanceSingleByteDoubleByteWidth
Namespace: DocumentFormat.OpenXml.Wordprocessing
Assembly: DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)
Syntax
'Declaration
Public Class BalanceSingleByteDoubleByteWidth _
Inherits OnOffType
'Usage
Dim instance As BalanceSingleByteDoubleByteWidth
public class BalanceSingleByteDoubleByteWidth : OnOffType
Remarks
[ISO/IEC 29500-1 1st Edition]
17.15.3.3 balanceSingleByteDoubleByteWidth (Balance Single Byte and Double Byte Characters)
This element specifies whether applications shall balance the width of Single Byte Character Set characters and Double Byte Character Set characters when rendering WordprocessingML documents. Specifically, this element specifies to adjust the fixed pitch fonts’ half-width space character and full-width space character to attain a 1 to 2 ratio.
[Note: This element is used with East Asian content. Layout and line breaking for East Asian text is dependent on the character width. Half width characters (or Hankaku characters) are one half of an em wide, and full width characters (or Zenkaku characters) are one em wide. Legacy encoding often used a single byte to encode half-width characters and two bytes to encode full width characters. end note]
Typically, no adjustment is done on any character when it is displayed as part of a WordprocessingML document. This element, when present with a val attribute value of true (or equivalent), specifies that character sizes shall be adjusted as needed to meet the 1:2 ratio described above.
[Example: Consider a WordprocessingML document with both SBCS and DBCS characters. The default presentation would have the text displayed as follows:
However, if this compatibility setting is turned on:
<w:compat> <w:balanceSingleByteDoubleByteWidth /> </w:compat>
Then this character-level adjustment must be performed, resulting in the following output:
This adjustment is usually very minute in nature, therefore the result is better illustrated by showing how the characters after the English text were pushed out due to the width balancing of that text:
end example]
Parent Elements |
---|
compat (§17.15.1.21) |
This element’s content model is defined by the common boolean property definition in §17.17.4.
© 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.