[Horus] make clean also cleans the font bitmap files
This commit is contained in:
@@ -2087,6 +2087,7 @@ clean_list :
|
||||
$(REMOVE) bitmaps/*/*.lbm
|
||||
$(REMOVE) bitmaps/*/*/*.lbm
|
||||
$(REMOVE) fonts/*.lbm
|
||||
$(REMOVE) fonts/font_*
|
||||
$(REMOVE) fonts/*/*.lbm
|
||||
$(REMOVE) lua_exports* lua_fields.txt
|
||||
$(MAKE) -C targets/taranis/bootloader clean
|
||||
|
||||
@@ -11,7 +11,7 @@ except:
|
||||
pass
|
||||
|
||||
for f in glob.glob("fonts/*.ttf"):
|
||||
id = QtGui.QFontDatabase.addApplicationFont(f)
|
||||
QtGui.QFontDatabase.addApplicationFont(f)
|
||||
|
||||
chars = u""" !"#$%&'()*+,-./0123456789:;<=>?°ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz~ ≥→←↑↓ △Ⓘ"""
|
||||
|
||||
@@ -40,14 +40,12 @@ def getFontWidth(fontsize, metrics):
|
||||
|
||||
def createFontBitmap(filename, fontname, fontsize, foreground, background, coordsfile=True):
|
||||
coords = [ ]
|
||||
# font = QtGui.QFont(QtGui.QFontDatabase.applicationFontFamilies(id)[0])
|
||||
font = QtGui.QFont(fontname)
|
||||
font.setPixelSize(fontsize)
|
||||
font.setHintingPreference(QtGui.QFont.PreferNoHinting)
|
||||
metrics = QtGui.QFontMetrics(font)
|
||||
width = getFontWidth(fontsize, metrics)
|
||||
top, bottom = getFontTopBottom(fontsize, metrics)
|
||||
print top, bottom
|
||||
image = QtGui.QImage(width, fontsize+1, QtGui.QImage.Format_RGB32)
|
||||
image.fill(background)
|
||||
painter = QtGui.QPainter()
|
||||
|
||||
Reference in New Issue
Block a user