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