BalanceSingleByteDoubleByteWidth class

Office 2013 and later

Balance Single Byte and Double Byte Characters. When the object is serialized out as xml, its qualified name is w:balanceSingleByteDoubleByteWidth.


Namespace:  DocumentFormat.OpenXml.Wordprocessing
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

public class BalanceSingleByteDoubleByteWidth : OnOffType

[ISO/IEC 29500-1 1st Edition]

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:balanceSingleByteDoubleByteWidth />

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 (§

This element’s content model is defined by the common boolean property definition in §17.17.4.

© ISO/IEC29500: 2008.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.