Initial commit
This commit is contained in:
60
backup/config.py
Normal file
60
backup/config.py
Normal file
@@ -0,0 +1,60 @@
|
||||
# config.py
|
||||
|
||||
#定义内容字体
|
||||
fonts_path = {
|
||||
'title': 'fonts/LXGWWenKai-Medium.TTF',
|
||||
'subtitle': 'fonts/LXGWWenKai-Medium.TTF',
|
||||
'body': 'fonts/LXGWWenKai-Light.TTF',
|
||||
'signature': 'fonts/LXGWWenKai-Light.TTF'
|
||||
}
|
||||
|
||||
|
||||
#定义底图模版
|
||||
templates = {
|
||||
'minimal': {
|
||||
'background': 'backgrounds/IMG_5784.JPG',
|
||||
'padding': 50
|
||||
},
|
||||
'modern': {
|
||||
'background': 'backgrounds/IMG_5789.JPG',
|
||||
'padding': 60
|
||||
},
|
||||
'vintage': {
|
||||
'background': 'backgrounds/IMG_5793.JPG',
|
||||
'padding': 70
|
||||
}
|
||||
}
|
||||
|
||||
#定义各部分内容样式
|
||||
styles = {
|
||||
'title': {
|
||||
'size': 48,
|
||||
'letter_spacing': 0,
|
||||
'color': (30, 30, 30),
|
||||
'line_spacing': 10,
|
||||
'top_spacing': 0,
|
||||
'bottom_spacing': 20
|
||||
},
|
||||
'subtitle': {
|
||||
'size': 32,
|
||||
'letter_spacing': 0,
|
||||
'color': (60, 60, 60),
|
||||
'line_spacing': 10,
|
||||
'top_spacing': 20,
|
||||
'bottom_spacing': 20
|
||||
},
|
||||
'body': {
|
||||
'size': 24,
|
||||
'letter_spacing': 0,
|
||||
'color': (20, 20, 20),
|
||||
'line_spacing': 15
|
||||
},
|
||||
'signature': {
|
||||
'size': 28,
|
||||
'letter_spacing': 2,
|
||||
'color': (80, 80, 80),
|
||||
'position': 'right', # 水平位置:left, center, right
|
||||
'vertical_position': 'bottom', # 垂直位置:bottom, flow
|
||||
'offset': 30 # 距离底部的偏移量
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user