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

Support for Nerd Fonts #922

Closed
thekeith opened this issue Aug 22, 2023 · 7 comments
Closed

Support for Nerd Fonts #922

thekeith opened this issue Aug 22, 2023 · 7 comments
Labels
enhancement New feature or request

Comments

@thekeith
Copy link

I’m proposing adding some Nerd Fonts to the mix like Fira Code Nerd Font, Jetbrains Mono Nerd Font and Sauce Code Pro Nerd Font.

  • I connect to a terminal with tmux and Starship. The Starship prompt does not render correctly as it uses a Nerd Font.
  • Currently in iPadOS 17 custom fonts do not work via apps like Anyfont, and they’re a suboptimal experience anyway as they require adding an unsigned custom profile
  • Having a few nerd fonts built in will be better for more advanced users and broaden the overall appeal of the product

Questions:

  1. How are fonts currently loaded in the app today?
  2. Is there any plan to add a Nerd Font already?
  3. Are there any considerations/complications to adding a new font specifically to this app?
@bummoblizard bummoblizard added the enhancement New feature or request label Aug 23, 2023
@bummoblizard
Copy link
Member

bummoblizard commented Aug 23, 2023

  1. Fonts currently only work in the text editor. Custom fonts are loaded by adding entries to the Copy Bundle Resources step in the Xcode project. Then they can be manually referenced in the CSS for the editor and Monaco Editor's api can be called to load the font.
image

@font-face {
font-family: "Fira Code";
src: local("FiraCode-Regular"),
url("fonts/FiraCode-Regular.ttf") format("truetype");
}

executeJavascript(
command: "editor.updateOptions({fontFamily: \"\(fontFamily)\"})")

2. Not at the moment
3. The licenses must be compatible to ours.

@bummoblizard
Copy link
Member

bummoblizard commented Aug 23, 2023

I think it would great if we can find a way to dynamically load fonts in the editor / terminal without bundling it in Xcode. That way we can allow custom fonts to be installed dynamically by users. (without worrying about licenses)

@bummoblizard
Copy link
Member

@thekeith
Copy link
Author

@bummoblizard we could use something similar to blink shell, which uses a CSS font stylesheet. I’ll also try building with a nerd font loaded in via XCode.

@thekeith
Copy link
Author

@bummoblizard also, thanks for being really responsive and making a great product. I’ve gone through a lot of them on iPad Pro and am glad to have found this app.

@pickaxe828
Copy link

There also some other apps that can load font globally, like Fontinator

@bummoblizard
Copy link
Member

There also some other apps that can load font globally, like Fontinator

That's right. Use a font installer app to install additional fonts and it should show up in Code's settings menu. Reference: #1004. For custom font in terminal, I opened this: #1037.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

3 participants