---
UID: NF:dwrite.IDWriteFont.GetWeight
title: IDWriteFont::GetWeight (dwrite.h)
description: Gets the weight, or stroke thickness, of the specified font.
old-location: directwrite\IDWriteFont_GetWeight.htm
tech.root: DirectWrite
ms.assetid: 32959881-42f4-45cb-ad32-1acb2787b155
ms.date: 12/05/2018
ms.keywords: GetWeight, GetWeight method [Direct Write], GetWeight method [Direct Write],IDWriteFont interface, IDWriteFont interface [Direct Write],GetWeight method, IDWriteFont.GetWeight, IDWriteFont::GetWeight, directwrite.IDWriteFont_GetWeight, dwrite/IDWriteFont::GetWeight
f1_keywords:
- dwrite/IDWriteFont.GetWeight
dev_langs:
- c++
req.header: dwrite.h
req.include-header: 
req.target-type: Windows
req.target-min-winverclnt: Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps \| UWP apps]
req.target-min-winversvr: Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps \| UWP apps]
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:
- IDWriteFont.GetWeight
targetos: Windows
req.typenames: 
req.redist: 
ms.custom: 19H1
---

# IDWriteFont::GetWeight


## -description


 Gets the weight, or stroke thickness, of the specified font.


## -parameters






## -returns



Type: <b><a href="/windows/win32/api/dwrite/ne-dwrite-dwrite_font_weight">DWRITE_FONT_WEIGHT</a></b>

A value that indicates the weight for the specified font.




## -see-also




<a href="/windows/win32/api/dwrite/nn-dwrite-idwritefont">IDWriteFont</a>
 

 

