We need support for gradients and patterns on FontQt
Created attachment 28095 [details] patterns and gradients for Qt This adds the support.
Comment on attachment 28095 [details] patterns and gradients for Qt > + if (ctx->textDrawingMode() & cTextStroke) { > + if (ctx->strokeGradient()) { > + QBrush brush(*ctx->strokeGradient()->platformGradient()); > + brush.setMatrix(ctx->strokeGradient()->gradientSpaceTransform()); > + p->setPen(QPen(brush, 0)); > + } else if (ctx->strokePattern()) { > + TransformationMatrix affine; > + p->setPen(QPen(QBrush(ctx->strokePattern()->createPlatformPattern(affine)), 0)); > + } else > + p->setPen(QColor(ctx->strokeColor())); > + } > > QString string = qstring(run); I think it's good enough to go in, but the above section has to be prefixed with "FIXME: stroking is currently not working or such". Basically the issue is that Qt doesn't support stroking of text per se. So what needs to be done is that it has to be emulated with a path as in: if (ctx->textDrawingMode() & cTextStroke) { QPainterPath path; path.addText(0, 0, currentFont, text); ... p->strokePath(path, theCorretPen); } Basically stroke the path constructed from the given text string.
landed in r41294.