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