How can I create text clipping masks with Adobe XD? I know you can do this with images, but how about with text?
I know this is possible to do with other Adobe software, but I'd prefer not to install anything else right now.
Place some text over an image
Right click the text and choose Path > Convert to Path
Select both text and image
Right click and choose Mask with Shape
If you want, you can add a black rectangle and right click it and choose Arrange > Send to back
Note: Converting text to a path turns the text into a shape, and it will no longer be editable as a text object, and the process is irreversable. If you want to edit the text in future, keep a copy of the editable text somewhere off the artboard.
You can use boolean operations for a non-destructive way to do this:
If you just want to mask a gradient or image, you can directly apply a gradient or image fill to this boolean object – the fill settings work just like a Path drawn with the Pen tool.
If you want to mask more complex content, like multiple different vector shapes, you can use the boolean object as a mask shape. Place it above all the other content in the Z order, select the content together with the boolean object, and choose Object > Mask With Shape. Then you'll have a structure like this:
Either way, if you want to change the text later, you can still select the Text node and edit it or change its font settings: