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

Use ligature font as default coding font? #83

Closed
pat-s opened this issue Oct 18, 2017 · 9 comments
Closed

Use ligature font as default coding font? #83

pat-s opened this issue Oct 18, 2017 · 9 comments

Comments

@pat-s
Copy link
Collaborator

pat-s commented Oct 18, 2017

For example Fira-Code or Iosevka:

I have them installed locally but to get it working for everyone, could it just be imported within the CSS?

@import url(https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz);
@import url(https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic);

@import url(https://cdn.rawgit.com/tonsky/FiraCode/1.204/distr/fira_code.css);

What are your thoughts on this?

@yihui
Copy link
Owner

yihui commented Oct 19, 2017

Since it is trivially easy for users to customize fonts, I don't want to make this the default. With the current dev version, you can save the CSS above to fira-code.css (or whatever CSS file), and

output:
  xaringan::moon_reader:
    css: ["default", "fira-code.css"]

@pat-s
Copy link
Collaborator Author

pat-s commented Oct 19, 2017

Okay, I was curious if you would like to switch the default. Thanks for your quick reply!

@pat-s pat-s closed this as completed Oct 19, 2017
@yihui
Copy link
Owner

yihui commented Oct 19, 2017

I actually use Fira Code myself in RStudio IDE. I don't have a strong opinion on whether everyone should use it or see it, so I'll leave the decision to users.

@pat-s
Copy link
Collaborator Author

pat-s commented Oct 19, 2017

Maybe it could be included as a secondary option in the default.css so that users just need to switch the font order instead of trying to find the webfont import statement etc.? Otherwise it will probably get lost in this issue I think.

From my experience most guys enjoy ligatures in the font, especially in presentations.
Also, most users stick to the default settings because they do not want to spent time in altering something - thats why I think that using ligatures as default would be nice 👍

@yihui
Copy link
Owner

yihui commented Oct 19, 2017

Sounds like a good idea. I'll reconsider it.

@yihui yihui reopened this Oct 19, 2017
@yihui yihui closed this as completed in 32718ff Oct 23, 2017
@yihui
Copy link
Owner

yihui commented Oct 23, 2017

On second thought, I decided only to document it: https://slides.yihui.name/xaringan/#33 since it is simple enough for users to provide this CSS file, which I don't want to maintain by myself.

@pat-s
Copy link
Collaborator Author

pat-s commented Oct 23, 2017

Fair enough, that should help most users. Thanks!

@kkmann
Copy link

kkmann commented Sep 19, 2019

@pat-s sorry for bringing this up again, but how do you then activate ligatures for Fira Code in css?

@pat-s
Copy link
Collaborator Author

pat-s commented Sep 19, 2019

See here.
Ligatures are automatic - either a font supports it or not.

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

3 participants