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

Segoe UI font issue on Mac shows random letter/numbers in many places #2518

Closed
docmattman opened this issue Mar 7, 2024 · 8 comments · Fixed by #2520
Closed

Segoe UI font issue on Mac shows random letter/numbers in many places #2518

docmattman opened this issue Mar 7, 2024 · 8 comments · Fixed by #2520
Labels
bug Functionality does not match expectation

Comments

@docmattman
Copy link
Contributor

Search terms

Some text looks like gibberish with random letters and number on a Mac

Expected Behavior

Text should show proper values

Actual Behavior

Some output text shows garbled text

Steps to reproduce the bug

View generated docs on a Mac that doesn't have Segoe UI font installed. Lots of text in the docs will end up looking like this screenshot:

Screenshot 2024-03-06 at 3 59 24 PM

If I specifically install the Segoe UI font on my Mac (not super easy to find), then the text is fixed. Perhaps it would be good to use an alternate default font that would work better cross-platform?

Environment

  • Typedoc version: latest
  • TypeScript version: any
  • Node.js version: any
  • OS: Mac
@docmattman docmattman added the bug Functionality does not match expectation label Mar 7, 2024
@Gerrit0
Copy link
Collaborator

Gerrit0 commented Mar 7, 2024

What the... why didn't your browser fall back to the sans-serif fallback?

@docmattman
Copy link
Contributor Author

I was wondering the same thing. I do have multiple colleagues on Macs that see the same behavior. I think it mostly shows up in places with italic style fonts.

This is from Chrome on a Mac.

@docmattman
Copy link
Contributor Author

docmattman commented Mar 7, 2024

I created a PR to change to Open Sans for the default font (which should be a very close visual replacement) in case you're interested/willing to swap it out:

#2520

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Mar 8, 2024

As someone who primarily works on a system not connected to the internet, I really like that TypeDoc today doesn't depend on any external resources...

I think a better fix is probably to switch to what GitHub is using, does this fix the issue for you?

font-family: -apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"

@docmattman
Copy link
Contributor Author

That makes sense. To verify that change, I can plug that in to my local setup and check/confirm on Mac to make sure, but it seems like it should work fine. I can post back later when I have a chance to check it.

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Mar 8, 2024

That'd be great! I'd like to include that fix in the next release (tomorrow/Sunday) with the next TypeScript version support

@docmattman
Copy link
Contributor Author

Ok, I plugged in that font-family value and it all looks good on a Mac. I made the change in the PR as well in case you want to merge it from there. Thanks!

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Mar 9, 2024

Awesome, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Functionality does not match expectation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants