I want to display text with directwrite in a specified rectangle and with a specified font size, the text outside the rect should be cutted off.

By searching I found something about CreateTextLayout but it looked like it isn't possible to define the font size with it.

![Only  the text in the red rectangle should be displayed](https://i.stack.imgur.com/f1vsW.png)

*Thanks for answers.*