7sdream / fontfor Goto Github PK
View Code? Open in Web Editor NEWFind fonts which can show a specified character and preview them in terminal or browser.
License: GNU General Public License v3.0
Find fonts which can show a specified character and preview them in terminal or browser.
License: GNU General Public License v3.0
I know this is a little bit different from the original purpose of this, but I feel that with the ability to preview words/sentences this tool could become a great font previewer, much better than Gnome Specimen for example.
Now we uses the PostScript name(ID 6).
But maybe Family(ID 1) + SubFamily(ID 2) is a better option? Or if there a (de-facto) standard for this?
net2
crate has been deprecated; usesocket2
instead
Details | |
---|---|
Status | unmaintained |
Package | net2 |
Version | 0.2.34 |
URL | deprecrated/net2-rs@3350e38 |
Date | 2020-05-01 |
The net2
crate has been deprecated
and users are encouraged to considered socket2
instead.
See advisory page for additional details.
Run without args:
error: The following required arguments were not provided:
<CHAR>
USAGE:
fontfor-macOS [FLAGS] <CHAR>
For more information try --help
Run with --help
fontfor 0.3.0
7sDream <[email protected]>
find fonts which can show a specified character and preview them in terminal or browser
USAGE:
fontfor-macOS [FLAGS] <CHAR>
FLAGS:
-h, --help Prints help information
-p, --preview Preview character use supported fonts in browser
-t, --tui Enable Terminal UI mode enable this mode will disable the --preview/-p and ignore --verbose/-v arg
-V, --version Prints version information
-v, --verbose Verbose mode, show all font styles
ARGS:
<CHAR> The character
Just show help when args are empty could be better
So having a problem in one terminal where it wasn't rendering "๏" but in another it was. Just a font "path" issue. Either way I found out I have lots of options. but --preview doesn't really tell me what I'm looking at, and neither does --tui. What I'd really like is for tui to just show me the character as it would appear in the terminal in that font (if possible). Even better would be to be able to see them all at once, like if using --verbose
just show me it as it would appear in that font at that size.
not only load system fonts, also support custom font dirs
Sometimes we can see lots of font face, for example run with character a
.
We need a way to filter font faces we interested, both in normal list output and tui mode.
tui
is unmaintained; useratatui
instead
Details | |
---|---|
Status | unmaintained |
Package | tui |
Version | 0.13.0 |
URL | fdehau/tui-rs#654 |
Date | 2023-08-07 |
The tui
crate is no longer maintained.
Consider using the ratatui
crate instead.
See advisory page for additional details.
Pretty self-explanatory:
Checking fontfor v0.4.2 (/home/leah/coding/fontfor)
error: fields `left` and `top` are never read
--> src/rasterizer/bitmap.rs:23:9
|
22 | pub struct Metrics {
| ------- fields in this struct
23 | pub left: usize,
| ^^^^
24 | pub top: usize,
| ^^^
|
note: the lint level is defined here
--> src/main.rs:20:9
|
20 | #![deny(warnings)]
| ^^^^^^^^
= note: `#[deny(dead_code)]` implied by `#[deny(warnings)]`
error: could not compile `fontfor` (bin "fontfor") due to 1 previous error
Please consider setting up some sort of CI system if you'd like to use #[deny(warnings)]
, so that this kind of problem gets caught before it gets into someone else's CI (in my case, NixOS's Hydra, which produces a build log like this).
We only get glyph outline(glyf, CFF, CFF2), not any kind of glyph data table like bitmap/image/color/svg.
So there may be some font face which supports asked character, but the tui preview show empty result. But many fonts also provided a outline as fallback, so it's not very likely to happen.
Therefore, personally I consider it a low priority issue . If you meet this, feel free to comment here.
Consider providing binray release with github actions ๐ฐ
We use ASCII character in terminal as canvas pixel. Normally, the character w/h radio will around 1:2 for most fonts.
Render code should consider this, maybe repeat each character is good enough, a better option is set the right scale factor in rasterization step.
I went ahead and created an AUR package for Arch Linux users. I hope you don't mind.
If you're an Arch user, I don't mind making you a maintainer/co-maintainer.
Cheers.
Steps:
chmod +x fontfor-macOS
./fontfor-macOS
Got error:
dyld: Library not loaded: /usr/local/opt/fontconfig/lib/libfontconfig.1.dylib
Referenced from: /Users/xcodebuild/Downloads/fontfor-macOS
Reason: image not found
[1] 75413 abort
Hello!
I hope you are doing well!
We are a security research team. Our tool automatically detected a vulnerability in this repository. We want to disclose it responsibly. GitHub has a feature called Private vulnerability reporting, which enables security research to privately disclose a vulnerability. Unfortunately, it is not enabled for this repository.
Can you enable it, so that we can report it?
Thanks in advance!
PS: you can read about how to enable private vulnerability reporting here: https://docs.github.com/en/code-security/security-advisories/repository-security-advisories/configuring-private-vulnerability-reporting-for-a-repository
The Kitty graphics protocol is an open standard for displaying graphics in the terminal, similar to sixels, but not color-palette limited, and comparatively easier to implement, both by TEs and applications.
I'd like to add support for the protocol. Would such support be upstreamed?
ansi_term is Unmaintained
Details | |
---|---|
Status | unmaintained |
Package | ansi_term |
Version | 0.12.1 |
URL | ogham/rust-ansi-term#72 |
Date | 2021-08-18 |
The maintainer has advised that this crate is deprecated and will not receive any maintenance.
The crate does not seem to have much dependencies and may or may not be ok to use as-is.
Last release seems to have been three years ago.
The below list has not been vetted in any way and may or may not contain alternatives;
See advisory page for additional details.
$ fontfor '๐ฉ' -p
Font(s) support the character "๐ฉ"(U+01F4A9, 128169, 0xF0 0x9F 0x92 0xA9):
Noto Color Emoji with 1 style
Source Code Pro with 14 styles
Source Code Variable with 14 styles
----------------------------------------
Please visit http://127.0.0.1:34659/ in your browser for preview
And press Enter after your finish...
The font size is pretty small.
It's 2px, (15px would be readable)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.