Support for Nerd Fonts
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:
- How are fonts currently loaded in the app today?
- Is there any plan to add a Nerd Font already?
- Are there any considerations/complications to adding a new font specifically to this app?
- Fonts currently only work in the text editor. Custom fonts are loaded by adding entries to the
Copy Bundle Resourcesstep 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.
https://github.com/thebaselab/codeapp/blob/9d95220f775f79bd71c0e856cd5868f7535b32d2/Dependencies/monaco-textmate.bundle/index.html#L12-L16 https://github.com/thebaselab/codeapp/blob/9d95220f775f79bd71c0e856cd5868f7535b32d2/CodeApp/Managers/MonacoEditor.swift#L92-L93 2. Not at the moment 3. The licenses must be compatible to ours.
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)
https://developer.mozilla.org/en-US/docs/Web/API/FontFace/FontFace
@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.
@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.
There also some other apps that can load font globally, like Fontinator
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: https://github.com/thebaselab/codeapp/issues/1004. For custom font in terminal, I opened this: https://github.com/thebaselab/codeapp/issues/1037.