DXRichEditMhtDocumentImporterOptions.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.v24.2.dll
NuGet Package: DevExpress.Wpf.RichEdit
Declaration
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 |
|
Remarks
The font size specified in an MHT 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 MHT 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 MHT 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.