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:
|
||||
"""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 \
|
||||
font_str.endswith('.ttf') or \
|
||||
font_str.endswith('.woff') or \
|
||||
|
@ -18627,7 +18630,8 @@ def load_tokens(base_dir: str, tokens_dict: {}, tokens_lookup: {}) -> None:
|
|||
break
|
||||
|
||||
|
||||
def run_daemon(content_license_url: str,
|
||||
def run_daemon(dyslexic_font: bool,
|
||||
content_license_url: str,
|
||||
lists_enabled: str,
|
||||
default_reply_interval_hrs: int,
|
||||
low_bandwidth: bool,
|
||||
|
@ -18718,6 +18722,8 @@ def run_daemon(content_license_url: str,
|
|||
|
||||
httpd.post_to_nickname = None
|
||||
|
||||
httpd.dyslexic_font = dyslexic_font
|
||||
|
||||
# license for content of the instance
|
||||
if not content_license_url:
|
||||
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='?',
|
||||
const=True, default=False,
|
||||
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",
|
||||
dest='show_node_info_accounts',
|
||||
type=str2bool, nargs='?',
|
||||
|
@ -3120,11 +3125,14 @@ verify_all_signatures = \
|
|||
if verify_all_signatures is not None:
|
||||
args.verify_all_signatures = bool(verify_all_signatures)
|
||||
|
||||
broch_mode = \
|
||||
get_config_param(base_dir, 'brochMode')
|
||||
broch_mode = get_config_param(base_dir, 'brochMode')
|
||||
if broch_mode is not None:
|
||||
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 = \
|
||||
get_config_param(base_dir, 'logLoginFailures')
|
||||
if log_login_failures is not None:
|
||||
|
@ -3217,7 +3225,8 @@ if args.defaultCurrency:
|
|||
print('Default currency set to ' + args.defaultCurrency)
|
||||
|
||||
if __name__ == "__main__":
|
||||
run_daemon(content_license_url,
|
||||
run_daemon(args.dyslexic_font,
|
||||
content_license_url,
|
||||
lists_enabled,
|
||||
args.default_reply_interval_hrs,
|
||||
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
|
||||
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
|
||||
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
|
||||
RailModel is GPL. See https://www.fontspace.com/rail-model-font-f10741
|
||||
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
|
||||
lists_enabled = ''
|
||||
content_license_url = 'https://creativecommons.org/licenses/by/4.0'
|
||||
dyslexic_font = False
|
||||
print('Server running: Alice')
|
||||
run_daemon(content_license_url,
|
||||
run_daemon(dyslexic_font,
|
||||
content_license_url,
|
||||
lists_enabled, default_reply_interval_hrs,
|
||||
low_bandwidth, max_like_count,
|
||||
shared_items_federated_domains,
|
||||
|
@ -960,8 +962,10 @@ def create_server_bob(path: str, domain: str, port: int,
|
|||
default_reply_interval_hrs = 9999999999
|
||||
lists_enabled = ''
|
||||
content_license_url = 'https://creativecommons.org/licenses/by/4.0'
|
||||
dyslexic_font = False
|
||||
print('Server running: Bob')
|
||||
run_daemon(content_license_url,
|
||||
run_daemon(dyslexic_font,
|
||||
content_license_url,
|
||||
lists_enabled, default_reply_interval_hrs,
|
||||
low_bandwidth, max_like_count,
|
||||
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
|
||||
lists_enabled = ''
|
||||
content_license_url = 'https://creativecommons.org/licenses/by/4.0'
|
||||
dyslexic_font = False
|
||||
print('Server running: Eve')
|
||||
run_daemon(content_license_url,
|
||||
run_daemon(dyslexic_font,
|
||||
content_license_url,
|
||||
lists_enabled, default_reply_interval_hrs,
|
||||
low_bandwidth, max_like_count,
|
||||
shared_items_federated_domains,
|
||||
|
@ -1110,8 +1116,10 @@ def create_server_group(path: str, domain: str, port: int,
|
|||
default_reply_interval_hrs = 9999999999
|
||||
lists_enabled = ''
|
||||
content_license_url = 'https://creativecommons.org/licenses/by/4.0'
|
||||
dyslexic_font = False
|
||||
print('Server running: Group')
|
||||
run_daemon(content_license_url,
|
||||
run_daemon(dyslexic_font,
|
||||
content_license_url,
|
||||
lists_enabled, default_reply_interval_hrs,
|
||||
low_bandwidth, max_like_count,
|
||||
shared_items_federated_domains,
|
||||
|
|
Loading…
Reference in New Issue