question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Custom Font - Italic and Bold not visible

See original GitHub issue

Describe the bug

When using custom font (via google api) Italic and Bold is not visible on site at all.

Reproduction

.vitepress/config.js

head: [ ['link', { rel: 'stylesheet', href: 'https://fonts.googleapis.com/css?family=Open+Sans' }], ],

.vitepress/theme/custom.css

--vp-font-family-base: 'Open Sans';

Expected behavior

Italic and Bold (Bold is used in H1, H2…) should be visible

System Info

Windows, v1.0.0-alpha.29, Edge

Additional context

No response

Validations

  • Follow our Code of Conduct
  • Read the docs.
  • Check that there isn’t already an issue that reports the same bug to avoid creating a duplicate.

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
brc-ddcommented, Dec 5, 2022

This is important, not to waste ‘space’ with things not in use.

It’s just a micro optimization IMO. The difference will only be ~200B (0 if cache is hit). Browser won’t load those non used fonts anyway.

0reactions
brc-ddcommented, Dec 5, 2022

Yeah sure, PRs are always welcome!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bold / Italic doesn't work on custom fonts using PhantomJS
No, it is not. You dont need to add separate fonts for different styling. Bolding for example, exists also as a css property...
Read more >
Creating bold and italic text not working with a custom font?
However creating bold and italic text for this font in LaTeX seems to not be working, no compiler errors or anything to that...
Read more >
How to avoid faux-italic & bold styles in CSS
Your custom bold and italic fonts are loaded properly, and the faux styles are nowhere to be seen! The problem is that if...
Read more >
Why Can't I Italicize or Bold Fonts in Canva?
If bolding and/or italicizing are not available for your font, they will appear as grayed out and you won't be able to click...
Read more >
How to Fake Bold & Italic Text in Photoshop (When ... - YouTube
Not all fonts include a Bold or Italic option. Photoshop allows these styles to be simulated with the click of a button. Details...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found