Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Collapse]Rich Text Editor
   [Expand]Product Information
    Product Class Structure
   [Expand]Getting Started
   [Expand]RichEditControl Document
   [Expand]Fields
    Text Formatting
    Import and Export
   [Expand]Page Layout
    Printing
    Spell Checking
    AutoCorrect
    Mail Merge
    Restrictions and Protection
    Syntax Highlighting
    Traversing the Document
   [Expand]Visual Elements
    Services
    Events
    Commands
   [Expand]Member Tables
    Keyboard Shortcuts
    HTML Tag Interpretation
   [Collapse]Examples
    [Expand]Files
    [Expand]Text
    [Expand]Formatting
    [Expand]Styles
    [Expand]Lists
    [Expand]Pictures
    [Expand]Text Boxes
    [Expand]Tables
    [Collapse]Layout
      How to: Configure the Page Layout Programmatically
      How to: Create a Three-Column Layout with Uniform Columns
      How to: Insert Page Numbers in Header or Footer
      How To: Add Line Numbering
      How to: Set Background Color for the Line Number Column
      How to: Count the Lines in the Document
      How to: Improve the Display and Printout Appearance with the LayoutUnit Property
    [Expand]Automation
    [Expand]Search and Replace
    [Expand]Mail Merge
    [Expand]Spell Check
    [Expand]Export-Import
    [Expand]Printing
    [Expand]Protection
    [Expand]User Interface Customization
    [Expand]Miscellaneous
    [Expand]Commands
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

How to: Improve the Display and Printout Appearance with the LayoutUnit Property

The visual appearance of text characters, especially at small font sizes, is dependent on the units of measurement used for internal calculations when symbols are rendered. Rounding errors may lead to font artifacts, irregular font spacing and other minor glitches.

To improve the look of documents, you can adjust the rich editor setting via the RichEditControl.LayoutUnit property.

By default, it has the DocumentLayoutUnit.Pixel value, which suits best for a screen display. However, the "native" unit of measurement for RichEditControl is DocumentLayoutUnit.Document.

The following pictures illustrates the visual difference caused by the use of different layout units.

DocumentLayoutUnit.Document

DocumentLayoutUnit.Pixel

While the text specimen that uses pixel layout units looks better in this particular situation, it may not be the case for all circumstances. We suggest that you experiment with the LayoutUnit setting in your application to find out, which value is the most appropriate for a particular task.

Show Me

A complete sample project is available in the DevExpress Code Examples database at http://www.devexpress.com/example=E4021.

How would you rate this topic?​​​​​​​