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

Font style support #10

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Font style support #10

wants to merge 1 commit into from

Conversation

h-2
Copy link

@h-2 h-2 commented Apr 23, 2020

fixes #7


Experimental fix.

I originally thought that the different font-styles are not mutually exclusive, so I have designed the handling in that way. But I think the way this is implemented upstream in shiki it means that items can always only be bold or italic, right?

You originally suggested adding this to fancyvrbOptions, but the property is per IThemedToken so I added it in the loop.

var fontStyleStr2:string = "";
if (preserveFontStyle && fontStyle == `font-weight: bold`)
fontStyleStr2 += `\\bfseries`;
if (preserveFontStyle && fontStyle == `font-style: italic;`)
Copy link
Author

Choose a reason for hiding this comment

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

I don't know why only this comes with ; upstream

@leafac
Copy link
Member

leafac commented Apr 26, 2020

When shikijs/shiki#23 is merged we’ll merge this as well. Thanks for the good work 😃

@Maximvdw
Copy link

When shikijs/shiki#23 is merged we’ll merge this as well. Thanks for the good work 😃

The merge has come through a few days ago

@leafac
Copy link
Member

leafac commented Mar 20, 2021

Awesome. I’ll get to it soon…

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.

Add experimental support for fontStyles
3 participants