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

Improve stability of Noto Sans import #9

Merged
merged 3 commits into from
Sep 1, 2022

Conversation

Mandrenkov
Copy link
Collaborator

Context:

Every now and then, Sphinx projects which include the Xanadu Sphinx Theme do not render the Noto Sans font correctly. This most likely originates from the use of @font-face which is not a recommend way to embed Google Fonts.

For example, the PennyLane Sphinx documentation occasionally renders as

image

instead of

image

(To easily spot the difference, take a look at the renderings of the "g".)

Description of the Change:

  • Replaced the @font-face directive with an @import directive in the CSS file.

Benefits:

  • Better stability when importing the Noto Sans font.

Possible Drawbacks:

  • None.

Related GitHub Issues:

  • None.

Copy link
Member

@josh146 josh146 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Mandrenkov! Looks good to me, did you have a chance to test it locally?

It might be nice in the future to add a 'test sphinx doc' to this repo, that we can use for testing changes in PRs 😆

@Mandrenkov
Copy link
Collaborator Author

Thanks for the review, @josh146!

I built the PennyLane-Lightning documentation locally and confirmed that the navbar is identical to the one currently shown on the PennyLane site:

image

The GitHub Action is a great idea although a good start would be to have Sphinx documentation for this repository.

@Mandrenkov Mandrenkov merged commit f00628f into master Sep 1, 2022
@Mandrenkov Mandrenkov deleted the sc-24323-import-noto-sans-properly branch September 1, 2022 13:22
@josh146
Copy link
Member

josh146 commented Sep 1, 2022

The GitHub Action is a great idea although a good start would be to have Sphinx documentation for this repository.

Yep this is a great idea (but out of scope for now unfortunately). I'll make an issue!

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