diff --git a/src/renderer/atlas/BackendD2D.cpp b/src/renderer/atlas/BackendD2D.cpp index cf7bd8a2bec..748fb0e8cbf 100644 --- a/src/renderer/atlas/BackendD2D.cpp +++ b/src/renderer/atlas/BackendD2D.cpp @@ -394,8 +394,14 @@ void BackendD2D::_prepareBuiltinGlyphRenderTarget(const RenderingPayload& p) THROW_IF_FAILED(target->GetBitmap(_builtinGlyphsBitmap.put())); _builtinGlyphsRenderTarget = target.query(); _builtinGlyphsBitmapCellCountU = cellCountU; - _builtinGlyphsRenderTargetActive = false; memset(&_builtinGlyphsReady[0], 0, sizeof(_builtinGlyphsReady)); + + _builtinGlyphsRenderTarget->BeginDraw(); + _builtinGlyphsRenderTargetActive = true; + + // The initial contents of the bitmap are undefined. + // -> We need to define them. :) + _builtinGlyphsRenderTarget->Clear(); } D2D1_RECT_U BackendD2D::_prepareBuiltinGlyph(const RenderingPayload& p, char32_t ch, u32 off)