DirectWrite utilities

namespace dwrite_utils

Functions

HRESULT create_custom_rendering_params(IDWriteFactory *factory, HMONITOR monitor, DWRITE_RENDERING_MODE rendering_mode, IDWriteRenderingParams **rendering_params)

Create DirectWrite rendering params for a monitor and specific rendering options.

Parameters:
Returns:

HRESULT indicating success or failure code

HMONITOR get_monitor_for_window(HWND wnd)

Get the HMONITOR to use with cui::fonts::create_rendering_params() and create_custom_rendering_params() for a given HWND.

Parameters:

wnd – The HWND that is rendering text using DirectWrite

Returns:

HMONITOR of the root window associated with the HWND, or nullptr on failure