You need to enable SSH access in your DSM settings first.
Remember the port number here.
Open terminal, run the following command:
ssh {username}@{NAS address} -p {SSH port number}
When it asks you for a password, enter your DSM login password for account that has admin access.
Just copy & paste the following to your terminal, hit enter. Enter your password again if it prompts you.
sudo sed -i '1s/^/html, body, body input, body textarea, body keygen, body select, body button, body, .sds-login-welcome-info .sds-login-welcome-info-wrapper .sds-login-welcome-info-container .sds-login-welcome-info-title, .sds-login-welcome-info .sds-login-welcome-info-wrapper .sds-login-welcome-info-container .sds-login-welcome-info-msg { font-family: -apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif !important; font-variant-ligatures: normal !important; };\n/' /usr/syno/synoman/webman/resources/css/desktop.css && sudo rm -rf /usr/syno/synoman/webman/resources/css/desktop.css.gz
The command above will change the font to macOS default font (San Francisco)
Change the -apple-system
part to something else if you want a different font.
Open the address, force cache refresh)
https://{yourNAS}:{port number}/webman/resources/css/desktop.css
For security, disable SSH in DSM settings if you're not going to use it in the near future.