Share via


DoNotRelyOnCSS Class

Do Not Rely on CSS for Font Face Formatting.When the object is serialized out as xml, its qualified name is w:doNotRelyOnCSS.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlLeafElement
      DocumentFormat.OpenXml.Wordprocessing.OnOffType
        DocumentFormat.OpenXml.Wordprocessing.DoNotRelyOnCSS

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

Syntax

'Declaration
Public Class DoNotRelyOnCSS _
    Inherits OnOffType
'Usage
Dim instance As DoNotRelyOnCSS
public class DoNotRelyOnCSS : OnOffType

Remarks

[ISO/IEC 29500-1 1st Edition]

17.15.2.11 doNotRelyOnCSS (Do Not Rely on CSS for Font Face Formatting)

This element specifies whether applications can rely on the CSS properties for font face (the font-family property) when saving this WordprocessingML document as a web page. If this element is utilized, then the HTML font element should be used either in place of or in concert with these CSS properties in order to specify the font face formatting for the resulting web page.

If this element is omitted, then applications can choose to rely on the CSS properties for font face as desired.

[Note: This setting is intended for applications to save web pages which can be supported by legacy web browsers which do not support the reading of these CSS properties when attempting to read and display the resulting web page, in order to maximize the fidelity of the resulting output. end note]

[Example: Consider a WordprocessingML document which contains the following content within the web settings part:

<w:webSettings>
<w:doNotRelyOnCSS w:val="true" />
</w:webSettings>

The doNotRelyOnCSS element has a val attribute value of true, which specifies that applications should include the HTML font element when saving this WordprocessingML document as a web page. For example, this output:

<span style='font-family:"Courier New"'>text</span>

This output would instead be saved as follows:

<font face="Courier New"><span style='font-family:"Courier New"'>text</span></font>

end example]

Parent Elements

webSettings (§17.15.2.46)

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.

See Also

Reference

DoNotRelyOnCSS Members

DocumentFormat.OpenXml.Wordprocessing Namespace