[Horus] Font again. How is it now?

This commit is contained in:
Bertrand Songis
2016-04-09 19:39:03 +02:00
parent efb290324a
commit 070c64631a
11 changed files with 7 additions and 7 deletions
+2 -2
View File
@@ -68,7 +68,7 @@ def createFontBitmap(filename, fontname, fontsize, fontbold, foreground, backgro
width = getFontWidth()
top, bottom = getFontTopBottom()
image = QtGui.QImage(width, fontsize + 2, QtGui.QImage.Format_RGB32)
image = QtGui.QImage(width, fontsize + 4, QtGui.QImage.Format_RGB32)
image.fill(background)
painter = QtGui.QPainter()
painter.begin(image)
@@ -90,7 +90,7 @@ def createFontBitmap(filename, fontname, fontsize, fontbold, foreground, backgro
if fontsize >= 24:
painter.drawText(width - rect.left() + 1, fontsize - 2, c) # fontsize-bottom+1 -17 / 7
else:
painter.drawText(width + 1, fontsize - 1, c) # fontsize-bottom+1 -17 / 7
painter.drawText(width + 1, fontsize, c) # fontsize-bottom+1 -17 / 7
width += getCharWidth(c)
coords.append(width)