mirror of https://gitlab.com/bashrc2/epicyon
Dyslexic font option
parent
889e57239d
commit
cdb9b7cb4b
10
daemon.py
10
daemon.py
|
@ -6834,7 +6834,10 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
getreq_start_time) -> None:
|
getreq_start_time) -> None:
|
||||||
"""Returns a font
|
"""Returns a font
|
||||||
"""
|
"""
|
||||||
font_str = path.split('/fonts/')[1]
|
if self.server.dyslexic_font:
|
||||||
|
font_str = 'OpenDyslexic-Regular.woff2'
|
||||||
|
else:
|
||||||
|
font_str = path.split('/fonts/')[1]
|
||||||
if font_str.endswith('.otf') or \
|
if font_str.endswith('.otf') or \
|
||||||
font_str.endswith('.ttf') or \
|
font_str.endswith('.ttf') or \
|
||||||
font_str.endswith('.woff') or \
|
font_str.endswith('.woff') or \
|
||||||
|
@ -18627,7 +18630,8 @@ def load_tokens(base_dir: str, tokens_dict: {}, tokens_lookup: {}) -> None:
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|
||||||
def run_daemon(content_license_url: str,
|
def run_daemon(dyslexic_font: bool,
|
||||||
|
content_license_url: str,
|
||||||
lists_enabled: str,
|
lists_enabled: str,
|
||||||
default_reply_interval_hrs: int,
|
default_reply_interval_hrs: int,
|
||||||
low_bandwidth: bool,
|
low_bandwidth: bool,
|
||||||
|
@ -18718,6 +18722,8 @@ def run_daemon(content_license_url: str,
|
||||||
|
|
||||||
httpd.post_to_nickname = None
|
httpd.post_to_nickname = None
|
||||||
|
|
||||||
|
httpd.dyslexic_font = dyslexic_font
|
||||||
|
|
||||||
# license for content of the instance
|
# license for content of the instance
|
||||||
if not content_license_url:
|
if not content_license_url:
|
||||||
content_license_url = 'https://creativecommons.org/licenses/by/4.0'
|
content_license_url = 'https://creativecommons.org/licenses/by/4.0'
|
||||||
|
|
15
epicyon.py
15
epicyon.py
|
@ -381,6 +381,11 @@ parser.add_argument("--broch_mode",
|
||||||
type=str2bool, nargs='?',
|
type=str2bool, nargs='?',
|
||||||
const=True, default=False,
|
const=True, default=False,
|
||||||
help="Enable broch mode")
|
help="Enable broch mode")
|
||||||
|
parser.add_argument("--dyslexic_font",
|
||||||
|
dest='dyslexic_font',
|
||||||
|
type=str2bool, nargs='?',
|
||||||
|
const=True, default=False,
|
||||||
|
help="Use dyslexic font")
|
||||||
parser.add_argument("--nodeinfoaccounts",
|
parser.add_argument("--nodeinfoaccounts",
|
||||||
dest='show_node_info_accounts',
|
dest='show_node_info_accounts',
|
||||||
type=str2bool, nargs='?',
|
type=str2bool, nargs='?',
|
||||||
|
@ -3120,11 +3125,14 @@ verify_all_signatures = \
|
||||||
if verify_all_signatures is not None:
|
if verify_all_signatures is not None:
|
||||||
args.verify_all_signatures = bool(verify_all_signatures)
|
args.verify_all_signatures = bool(verify_all_signatures)
|
||||||
|
|
||||||
broch_mode = \
|
broch_mode = get_config_param(base_dir, 'brochMode')
|
||||||
get_config_param(base_dir, 'brochMode')
|
|
||||||
if broch_mode is not None:
|
if broch_mode is not None:
|
||||||
args.broch_mode = bool(broch_mode)
|
args.broch_mode = bool(broch_mode)
|
||||||
|
|
||||||
|
dyslexic_font = get_config_param(base_dir, 'dyslexicFont')
|
||||||
|
if dyslexic_font is not None:
|
||||||
|
args.dyslexic_font = bool(dyslexic_font)
|
||||||
|
|
||||||
log_login_failures = \
|
log_login_failures = \
|
||||||
get_config_param(base_dir, 'logLoginFailures')
|
get_config_param(base_dir, 'logLoginFailures')
|
||||||
if log_login_failures is not None:
|
if log_login_failures is not None:
|
||||||
|
@ -3217,7 +3225,8 @@ if args.defaultCurrency:
|
||||||
print('Default currency set to ' + args.defaultCurrency)
|
print('Default currency set to ' + args.defaultCurrency)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
run_daemon(content_license_url,
|
run_daemon(args.dyslexic_font,
|
||||||
|
content_license_url,
|
||||||
lists_enabled,
|
lists_enabled,
|
||||||
args.default_reply_interval_hrs,
|
args.default_reply_interval_hrs,
|
||||||
args.low_bandwidth, args.max_like_count,
|
args.low_bandwidth, args.max_like_count,
|
||||||
|
|
|
@ -18,6 +18,7 @@ Minitel is GPL. See https://www.dafont.com/minitel.font
|
||||||
Montserrat is under OFL and came from CCC Rc3 style guide https://styleguide.rc3.world
|
Montserrat is under OFL and came from CCC Rc3 style guide https://styleguide.rc3.world
|
||||||
Nimbus Sans L is GPL. See https://www.fontsquirrel.com/fonts/nimbus-sans-l
|
Nimbus Sans L is GPL. See https://www.fontsquirrel.com/fonts/nimbus-sans-l
|
||||||
Octavius is created by Jack Oatley and described as "100% free to use, though credit is appreciated" https://www.dafont.com/octavius.font
|
Octavius is created by Jack Oatley and described as "100% free to use, though credit is appreciated" https://www.dafont.com/octavius.font
|
||||||
|
OpenDyslexic is under OFL. See https://github.com/antijingoist/opendyslexic
|
||||||
Orbitron is under OFL and came from CCC Rc3 style guide https://styleguide.rc3.world
|
Orbitron is under OFL and came from CCC Rc3 style guide https://styleguide.rc3.world
|
||||||
RailModel is GPL. See https://www.fontspace.com/rail-model-font-f10741
|
RailModel is GPL. See https://www.fontspace.com/rail-model-font-f10741
|
||||||
Rainyhearts in public domain. By Camellina tr.camellina@gmail.com
|
Rainyhearts in public domain. By Camellina tr.camellina@gmail.com
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
16
tests.py
16
tests.py
|
@ -813,8 +813,10 @@ def create_server_alice(path: str, domain: str, port: int,
|
||||||
default_reply_interval_hrs = 9999999999
|
default_reply_interval_hrs = 9999999999
|
||||||
lists_enabled = ''
|
lists_enabled = ''
|
||||||
content_license_url = 'https://creativecommons.org/licenses/by/4.0'
|
content_license_url = 'https://creativecommons.org/licenses/by/4.0'
|
||||||
|
dyslexic_font = False
|
||||||
print('Server running: Alice')
|
print('Server running: Alice')
|
||||||
run_daemon(content_license_url,
|
run_daemon(dyslexic_font,
|
||||||
|
content_license_url,
|
||||||
lists_enabled, default_reply_interval_hrs,
|
lists_enabled, default_reply_interval_hrs,
|
||||||
low_bandwidth, max_like_count,
|
low_bandwidth, max_like_count,
|
||||||
shared_items_federated_domains,
|
shared_items_federated_domains,
|
||||||
|
@ -960,8 +962,10 @@ def create_server_bob(path: str, domain: str, port: int,
|
||||||
default_reply_interval_hrs = 9999999999
|
default_reply_interval_hrs = 9999999999
|
||||||
lists_enabled = ''
|
lists_enabled = ''
|
||||||
content_license_url = 'https://creativecommons.org/licenses/by/4.0'
|
content_license_url = 'https://creativecommons.org/licenses/by/4.0'
|
||||||
|
dyslexic_font = False
|
||||||
print('Server running: Bob')
|
print('Server running: Bob')
|
||||||
run_daemon(content_license_url,
|
run_daemon(dyslexic_font,
|
||||||
|
content_license_url,
|
||||||
lists_enabled, default_reply_interval_hrs,
|
lists_enabled, default_reply_interval_hrs,
|
||||||
low_bandwidth, max_like_count,
|
low_bandwidth, max_like_count,
|
||||||
shared_items_federated_domains,
|
shared_items_federated_domains,
|
||||||
|
@ -1034,8 +1038,10 @@ def create_server_eve(path: str, domain: str, port: int, federation_list: [],
|
||||||
default_reply_interval_hrs = 9999999999
|
default_reply_interval_hrs = 9999999999
|
||||||
lists_enabled = ''
|
lists_enabled = ''
|
||||||
content_license_url = 'https://creativecommons.org/licenses/by/4.0'
|
content_license_url = 'https://creativecommons.org/licenses/by/4.0'
|
||||||
|
dyslexic_font = False
|
||||||
print('Server running: Eve')
|
print('Server running: Eve')
|
||||||
run_daemon(content_license_url,
|
run_daemon(dyslexic_font,
|
||||||
|
content_license_url,
|
||||||
lists_enabled, default_reply_interval_hrs,
|
lists_enabled, default_reply_interval_hrs,
|
||||||
low_bandwidth, max_like_count,
|
low_bandwidth, max_like_count,
|
||||||
shared_items_federated_domains,
|
shared_items_federated_domains,
|
||||||
|
@ -1110,8 +1116,10 @@ def create_server_group(path: str, domain: str, port: int,
|
||||||
default_reply_interval_hrs = 9999999999
|
default_reply_interval_hrs = 9999999999
|
||||||
lists_enabled = ''
|
lists_enabled = ''
|
||||||
content_license_url = 'https://creativecommons.org/licenses/by/4.0'
|
content_license_url = 'https://creativecommons.org/licenses/by/4.0'
|
||||||
|
dyslexic_font = False
|
||||||
print('Server running: Group')
|
print('Server running: Group')
|
||||||
run_daemon(content_license_url,
|
run_daemon(dyslexic_font,
|
||||||
|
content_license_url,
|
||||||
lists_enabled, default_reply_interval_hrs,
|
lists_enabled, default_reply_interval_hrs,
|
||||||
low_bandwidth, max_like_count,
|
low_bandwidth, max_like_count,
|
||||||
shared_items_federated_domains,
|
shared_items_federated_domains,
|
||||||
|
|
Loading…
Reference in New Issue