mirror of
https://github.com/stronk-dev/Guitar-Sheet-Parser.git
synced 2025-07-05 00:25:08 +02:00
Fix topmargin, increased default margins
This commit is contained in:
parent
8d03f6d665
commit
ca12e20a7a
@ -39,16 +39,16 @@ def initConfig():
|
||||
'exporttoraw': 0
|
||||
}
|
||||
config['output'] = {'metafontfamily': 'fonts/CourierPrime-Regular.ttf',
|
||||
'metaFontWeight': 16,
|
||||
'metaFontWeight': 32,
|
||||
'lyricfontfamily': 'fonts/CourierPrime-Regular.ttf',
|
||||
'tablaturefontfamliy': 'fonts/CourierPrime-Bold.ttf',
|
||||
'imageppi': 144,
|
||||
'backgroundColour': '255,255,255',
|
||||
'fontColour': '0,0,0',
|
||||
'metadataColour': '128,128,128',
|
||||
'topMargin': 10,
|
||||
'leftMargin': 25,
|
||||
'rightMargin': 25
|
||||
'topMargin': 50,
|
||||
'leftMargin': 50,
|
||||
'rightMargin': 50
|
||||
}
|
||||
# (if CMD arguments: load CMD arguments to override specific settings)
|
||||
with open('config.ini', 'w') as configfile:
|
||||
|
@ -52,10 +52,10 @@ def outputToImage(folderLocation, songObj):
|
||||
metadataTextWidth, metadataTextHeight = songObj.fontMetadata.getsize(line)
|
||||
draw.text((songObj.leftMargin,currentHeight), line, fill=songObj.metadataColour, font=songObj.fontMetadata)
|
||||
currentHeight += metadataTextHeight
|
||||
# Margin between metadata and the first section
|
||||
currentHeight += songObj.topMargin
|
||||
# Draw all pages
|
||||
for page in songObj.pages:
|
||||
# Margin between metadata and the first section / section and top of page
|
||||
currentHeight += songObj.topMargin
|
||||
for section in page.sections:
|
||||
# Reset section specific variables
|
||||
lineIterator = 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user