Skip to content

Change How The Custom Font Is Loaded#310

Open
Bwc9876 wants to merge 4 commits intohuashengdun:masterfrom
Bwc9876:bwc9876/font-finder
Open

Change How The Custom Font Is Loaded#310
Bwc9876 wants to merge 4 commits intohuashengdun:masterfrom
Bwc9876:bwc9876/font-finder

Conversation

@Bwc9876
Copy link
Copy Markdown

@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
Copy Markdown

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.

2 participants