add font to config
This commit is contained in:
parent
fed99721d6
commit
d7bcd5ed11
3 changed files with 4 additions and 3 deletions
|
@ -6,6 +6,7 @@ base = 'https://cdosea.0x2620.org/static/render/'
|
||||||
lang = '1080p'
|
lang = '1080p'
|
||||||
start = ''
|
start = ''
|
||||||
lights = False
|
lights = False
|
||||||
|
font = 'Menlo'
|
||||||
|
|
||||||
|
|
||||||
conf = os.path.expanduser('~/.config/cdosea.json')
|
conf = os.path.expanduser('~/.config/cdosea.json')
|
||||||
|
|
|
@ -43,7 +43,7 @@ def main():
|
||||||
base = os.path.dirname(os.path.abspath(__file__))
|
base = os.path.dirname(os.path.abspath(__file__))
|
||||||
os.chdir(base)
|
os.chdir(base)
|
||||||
|
|
||||||
player = get_player()
|
player = get_player(font=config.font)
|
||||||
player.register_key_binding('q', q_binding)
|
player.register_key_binding('q', q_binding)
|
||||||
|
|
||||||
def restart(*a):
|
def restart(*a):
|
||||||
|
|
|
@ -22,11 +22,11 @@ def mpv_log(loglevel, component, message):
|
||||||
logger.info('[{}] {}: {}'.format(loglevel, component, message))
|
logger.info('[{}] {}: {}'.format(loglevel, component, message))
|
||||||
|
|
||||||
|
|
||||||
def get_player(fullscreen=True):
|
def get_player(fullscreen=True, font='Menlo'):
|
||||||
# 42 max
|
# 42 max
|
||||||
player = mpv.MPV(
|
player = mpv.MPV(
|
||||||
log_handler=mpv_log, input_default_bindings=True,
|
log_handler=mpv_log, input_default_bindings=True,
|
||||||
input_vo_keyboard=True, sub_text_font_size=28, sub_text_font='Menlo'
|
input_vo_keyboard=True, sub_text_font_size=28, sub_text_font=font,
|
||||||
)
|
)
|
||||||
#player.observe_property('time-pos', lambda pos: print('Now playing at {:.2f}s'.format(pos)))
|
#player.observe_property('time-pos', lambda pos: print('Now playing at {:.2f}s'.format(pos)))
|
||||||
player.fullscreen = fullscreen
|
player.fullscreen = fullscreen
|
||||||
|
|
Loading…
Reference in a new issue