---
UID: NF:dwrite_2.IDWriteTextLayout2.GetOpticalAlignment
title: IDWriteTextLayout2::GetOpticalAlignment (dwrite_2.h)
description: Get how the glyphs align to the edges the margin.
old-location: directwrite\idwritetextlayout2_getopticalalignment.htm
tech.root: DirectWrite
ms.assetid: C372B1F9-E874-48AE-B22E-72D883B6DBF9
ms.date: 12/05/2018
ms.keywords: GetOpticalAlignment, GetOpticalAlignment method [Direct Write], GetOpticalAlignment method [Direct Write],IDWriteTextLayout2 interface, IDWriteTextLayout2 interface [Direct Write],GetOpticalAlignment method, IDWriteTextLayout2.GetOpticalAlignment, IDWriteTextLayout2::GetOpticalAlignment, directwrite.idwritetextlayout2_getopticalalignment, dwrite_2/IDWriteTextLayout2::GetOpticalAlignment
f1_keywords:
- dwrite_2/IDWriteTextLayout2.GetOpticalAlignment
dev_langs:
- c++
req.header: dwrite_2.h
req.include-header: 
req.target-type: Windows
req.target-min-winverclnt: Windows 8.1 [desktop apps only]
req.target-min-winversvr: Windows Server 2012 R2 [desktop apps only]
req.kmdf-ver: 
req.umdf-ver: 
req.ddi-compliance: 
req.unicode-ansi: 
req.idl: 
req.max-support: 
req.namespace: 
req.assembly: 
req.type-library: 
req.lib: Dwrite.lib
req.dll: Dwrite.dll
req.irql: 
topic_type:
- APIRef
- kbSyntax
api_type:
- COM
api_location:
- dwrite.dll
api_name:
- IDWriteTextLayout2.GetOpticalAlignment
targetos: Windows
req.typenames: 
req.redist: 
ms.custom: 19H1
---

# IDWriteTextLayout2::GetOpticalAlignment


## -description


Get how the glyphs align to the edges the margin.  


## -parameters






## -see-also




<a href="/windows/win32/DirectWrite/idwritetextlayout2">IDWriteTextLayout2</a>
 

 

