diff --git a/src/text/gpu/SubRunContainer.cpp b/src/text/gpu/SubRunContainer.cpp index bd5f827cc93..b486f57c782 100644 --- a/src/text/gpu/SubRunContainer.cpp +++ b/src/text/gpu/SubRunContainer.cpp @@ -937,6 +937,11 @@ public: auto vertexFiller = make_vertex_filler_from_buffer(buffer, alloc, &glyphVector.value(), skglyph::kSDFT, kGlyphInsetting); if (!buffer.validate(vertexFiller.has_value())) { return nullptr; } + // SDFTSubRun must be kA8; the GP stride is computed assuming kA8 and a + // forged kARGB causes a stride mismatch in fillVertexData. + if (!buffer.validate(vertexFiller->maskFormat() == MaskFormat::kA8)) { + return nullptr; + } return alloc->makeUnique(useLCD, isAntiAliased,