-
-
Notifications
You must be signed in to change notification settings - Fork 14
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
More Authentic Experience - Custom Font #26
Comments
Hey, I like your enthusiasm towards authenticity :) Thoughts about about this have flown around before. One approach in creating a new font could be to replace some Latin characters with the katakana characters. A more elegant approach would be the replace the actual katakana characters with their flipped (and modified) versions. To do this one would need to figure out where the characters go in the font file. Most people on Arch install ttf-mplus to get fonts for Japanese characters so it could be useful to take a look at their font file and how it deals with this. As for the looks there is for example [this design] that looks pretty spot on. Replacing the Japanese characters with something like this would solve the font side of the problem. Now for the (perhaps) technically harder problem. The terminal pulls the font from the system so we have two parts that are outside the application. A perfect solution would be that the program changes the terminal font, runs and then changes it back to the original one. I didn't explore this deeply so I don't know how tractable this problem is but any partial solution would be a great step. For example changing the whole system font for Japanese characters (perhaps on installation), or changing the font for the current terminal session without returning it to the original. Cmatrix has an option for changing the font to something weird in tty so exploring that might also be useful. |
I've banged on this a lot in one of my pet projects, RoguePC (and its sibling PyRogue. So let me share my strategies and solutions, maybe some might be useful in TMatrix:
matrix() {
if ! [[ "$TERM" == "linux" ]]; then
cmatrix -sbu8 # X11, virtual TTY. See my next post
return
fi
local default=$(mktemp) && trap 'rm -f -- "$default"' RETURN
setfont -O "$default" matrix.psf # Backup current font, set matrix PSF font
cmatrix -sbxu8 # run cmatrix, -x signals that font has japanese glyphs
setfont "$default" # restore previous font
} |
For virtual terminals under X11, such as
For
For Gnome-Terminal:
# Created with: dconf dump "/org/gnome/terminal/legacy/profiles:/${profile}" | sort
dconf load "/org/gnome/terminal/legacy/profiles:/${profile}" < <(sed -Ez 's/\n +//g' <<-EOF
[/]
background-color='#000000'
font='Perfect DOS VGA 437 Unicode 24'
foreground-color='#AAAAAA'
palette=['#000000', '#AA0000', '#00AA00', '#AA5500',
'#0000AA', '#AA00AA', '#00AAAA', '#AAAAAA',
'#555555', '#FF5555', '#55FF55', '#FFFF55',
'#5555FF', '#FF55FF', '#55FFFF', '#FFFFFF']
scrollbar-policy='never'
use-system-font=false
use-theme-colors=false
use-theme-transparency=false
use-transparent-background=false
visible-name='$name'
EOF
|
Oh, this is very useful, you obviously know a lot about terminals. I won't be using matrix.psf because it has some characters that don't appear in the Matrix and it's also missing characters that do, so it doesn't really fit the goal of this project. I will look more deeply into the things you suggested so thanks for sharing your experience! Might contact you if I get stuck somewhere ;) |
Hey I stumbled upon this project after not being satisfied with the accuracy of cmatrix, I just got into linux and back into programming about 5 months ago and I would like to contribute some accurate aesthetic to this projects already extensible and simple code.
My first feature request would be to add a custom font file (to the default if at all possible) that is an exact font image of the one used in the movies. I recognize the amount of work this could be to handle, but in the next couple months I will try to be tackling it head on, making an accurate font image. If I run into any issues It might take a bit seeings how I’m not used to programming in anything but C++, but we will see how this goes.
Most if not all the characters are english/Japanese with mirrored versions every now and then and I feel as if this could be easily done, let me know if you have any ideas or any concerns, Sorry if this sounds a bit weird as this is my first time really using github.
The text was updated successfully, but these errors were encountered: