Is it possible to use google fonts in a PyQt5 application? I'm trying to add some text to a pixmap and want to be able to use google fonts if possible. https://fonts.google.com/.
I haven't been able to find anything online regarding this.
def addText(pixmap, w, h, name):
painter = QPainter()
font = painter.font()
font.setPointSize(36);
painter.begin(pixmap)
position = QtCore.QRect(0, 0, w,h)
painter.setFont(font);
painter.drawText(position, Qt.AlignCenter, name);
painter.end()
return pixmap
Any ideas on how to make this work if it is possible? Thanks in adcance