Skip to main content
A newer version of this page is available. .

DXRichEditHtmlDocumentImporterOptions.FontScalingDpiValue Property

Gets or sets the DPI value that will be used to scale fonts on high DPI settings. This is a dependency property.

Namespace: DevExpress.Xpf.RichEdit

Assembly: DevExpress.Xpf.RichEdit.v20.2.dll

NuGet Packages: DevExpress.WindowsDesktop.Wpf.RichEdit, DevExpress.Wpf.RichEdit

Declaration

public int FontScalingDpiValue { get; set; }

Property Value

Type Description
Int32

A positive integer that is the DPI setting used to render text.

Property Paths

You can access this nested property as listed below:

Object Type Path to FontScalingDpiValue
DXRichEditDocumentImportOptions
.HtmlOptions .FontScalingDpiValue

Remarks

The font size specified in an HTML document can be expressed in pixels (PX) or points (PT). While PT units are interpreted in the same manner by all browsers regardless of the device resolution, PX unit interpretation may vary.

On low resolution devices, such as most displays, 1px is one device pixel (dot) of the display. For printers and high resolution screens, 1px implies multiple device pixels.

That is the reason for browsers to scale an HTML content whose font size is specified in PX units on high DPI devices.

The FontScalingDpiValue option allows you to adjust the scaling factor when importing HTML content whose font size is measured in PX units. By default, this property value is set to -1. Specify a valid positive setting to scale the font so it looks the same in RichEditControl and in the reference browser. Most likely, 96 is the best choice.

See Also