Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Sets the optical margin alignment for the text format.
By default, glyphs are aligned to the margin by the default origin and side-bearings of the glyph. If you specify DWRITE_OPTICAL_ALIGNMENT_USING_SIDE_BEARINGS, then the alignment Suses the side bearings to offset the glyph from the aligned edge to ensure the ink of the glyphs are aligned.
Syntax
HRESULT SetOpticalAlignment(
  DWRITE_OPTICAL_ALIGNMENT opticalAlignment
);
Parameters
opticalAlignment
The optical alignment to set.
Return value
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Requirements
| Requirement | Value | 
|---|---|
| Minimum supported client | Windows 8.1 [desktop apps | UWP apps] | 
| Minimum supported server | Windows Server 2012 R2 [desktop apps | UWP apps] | 
| Target Platform | Windows | 
| Header | dwrite_2.h | 
| Library | Dwrite.lib | 
| DLL | Dwrite.dll |