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

TZP: "script defaults" metric catches a "fontList.match(...) is null" error #582

Open
3 tasks done
Thorin-Oakenpants opened this issue May 17, 2024 · 2 comments
Open
3 tasks done

Comments

@Thorin-Oakenpants
Copy link

Prerequisites

Please use issues for bugs only! Answer the following questions for yourself before submitting an issue: YOU MAY DELETE THE PREREQUISITES SECTION.

  • I am running the latest version
  • I checked the documentation and found no answer
  • I checked to make sure that this issue has not already been filed

Expected Behavior

no errors: values are defaults for: proportional-font + monospace size + sans-serif size + serif size

expected

as seen in Firefox> Settings > Language and Settings > Fonts > Advanced > per script in the dropdown

  • for example here is devanagari which is sans-serif-13-16-16 as per the expected example above

settings

Current Behavior

https://arkenfox.github.io/TZP/tzp.html#fonts > script defaults metric

  • "TypeError: can't access property "map", fontList.match(...) is null"
  • let tmpFonts = fontList.match(REGEX_FONTS).map(f => f.replace(/,+$/, ""));
  • code used
    • basically it loops a bunch of writing scripts by setting a language tag on an element, and for each of those loops three generic font-families (monospace, serif, sans-serif). I actually use two elements for technical reasons, but that's not important

Relevant settings

enable Spoof font fingerprint

Context (Environment)

all of them

@sereneblue
Copy link
Owner

Thanks, I'll review.

@Thorin-Oakenpants
Copy link
Author

Thanks, I'll review.

🍕

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

No branches or pull requests

2 participants