Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change How The Custom Font Is Loaded #310

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Bwc9876
Copy link

@Bwc9876 Bwc9876 commented Nov 30, 2022

Problem

Currently the custom font is loaded by assuming that it's the first item in document.fonts, the problem with this is that some extension (namely Grammarly) will load their own custom fonts. On Firefox it seems like the fonts extensions load gets placed later in the list, but on Chrome the extension's font may be placed first. This results in the terminal font not being set properly and instead being set to the extension's font.

Solution

Changes main.js to search for the font in document.fonts by name instead of assuming it's the first. To get the name the index.html template has been changed to place a custom data attribute for the font name in the <body> tag.

@Bwc9876 Bwc9876 changed the title Change How Custom Font Is Loaded Change How The Custom Font Is Loaded Nov 30, 2022
@JohnCorby
Copy link

bump

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants