mirror of
https://github.com/nix-community/nix-on-droid.git
synced 2025-11-28 21:21:04 +01:00
Created Custom font (markdown)
parent
3f1c4aefab
commit
8c6f52e593
1 changed files with 17 additions and 0 deletions
17
Custom-font.md
Normal file
17
Custom-font.md
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
(taken from https://github.com/t184256/nix-on-droid/issues/120#issuecomment-867219785)
|
||||
|
||||
TL;DR: you can set one font, drop it into `~/.termux/font.ttf`
|
||||
|
||||
Setting fonts from Nix is hard to do right. I've started twice or thrice, never finished.
|
||||
|
||||
Font facts:
|
||||
|
||||
* in normal nix-on-droid usage (just running the terminal), none of the linux/home-manager font configuration facilities matter, fontconfig is ignored
|
||||
* the only thing that renders fonts is my fork of the Termux app
|
||||
* the fork has the styling addon baked in, so it looks for a `~/.termux/font.ttf`
|
||||
* so, good news are, you can change the font
|
||||
* bad news are, it has to be a regular file and not a symlink to `/nix/store` because, as far as the terminal app is concerned, there's no `/nix/store`. Auto-copying it on activation sounds hacky. Patching the app to do the sort of broken symlink resolution we already do for login script is definitely an option, but I'm basically allergic to Android development. PRs are welcome though.
|
||||
* another bad thing is, Termux terminal emulator isn't exactly breathtaking with its font-rendering capabilities, even doing obliques instead of italics (my poor font)
|
||||
* finally, there's no family detection, fallback chain or anything, none of this stuff. one ttf to rule them all
|
||||
|
||||
So, if you want a font with extra symbols, you'd have to find a TTF that has all the symbols you want in one file and then put it at `~/.termux/font.ttf`.
|
||||
Loading…
Add table
Add a link
Reference in a new issue