• Stars
    star
    162
  • Rank 232,284 (Top 5 %)
  • Language
    Rust
  • License
    GNU General Publi...
  • Created almost 5 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Find fonts which can show a specified character and preview them in terminal or browser.

FontFor

license-badge version-badge ci-badge

Find fonts which can show a specified character and preview them in browser.

This is port from my early python script called which_fonts_support, but with some improvements:

  • Write in Rust, safe and faster
  • Use Fontconfig library instead of depends on fc-list command installed
  • Support preview in shell (powered by FreeType), no browser needed

Dependencies

This program needs Fontconfig and FreeType library to run, and some of their deps needs cmake to compile, so we need to install them before compile:

  • macOS: brew install cmake freetype fontconfig
  • Linux: Please refer to the docs of your Linux distribution to figure out how to install them
  • Win: Do not support Windows for now

Install or Update

cargo install -f fontfor

Usage

Basic

$ fontfor א
Font(s) support the character "א"(U+05D0, 1488, 0xD7 0x90):
Arial                       with 4 styles
Arial Hebrew                with 3 styles
Arial Hebrew Desk Interface with 3 styles
Arial Hebrew Scholar        with 3 styles
Arial Unicode MS            with 1 style
Corsiva Hebrew              with 2 styles
Courier New                 with 4 styles
DejaVu Sans                 with 8 styles
FreeMono                    with 4 styles
FreeSans                    with 4 styles
FreeSerif                   with 4 styles
HanaMinA                    with 1 style
LastResort                  with 1 style
Lucida Grande               with 2 styles
Microsoft Sans Serif        with 1 style
New Peninim MT              with 4 styles
Raanana                     with 2 styles
TW-Kai                      with 1 style
TW-Sung                     with 1 style
Tahoma                      with 2 styles
Times New Roman             with 4 styles

Character Input Format

You can use the following formats for the character:

  • Character: א
  • Unicode scalar value
    • U+XXXXXX: U+5d0, U+05d0, U+0005d0
    • Direct input
      • Dec format: 1488
      • Oct format: 0o2720
      • Binary format: 0b010111010000
  • UTF8 bytes: 0xd790

Show All Font Styles

add -v flag to show all font style.

We don't show screenshot picture here because it's a bit long.

Preview in Browser

Add -p flag to enable browser preview:

browser-preview-screenshot

Preview in Shell

Add -t flag to enter tui mode for preview in shell:

tui-mono-mode

And you can change render mode to ASCII(10 Level):

tui-ascii-10-mode

ASCII(70 Level):

tui-ascii-70-mode

Or moon-render mode:

tui-moon-mode

LICENSE

GPLv3 or later.

See COPYING.

More Repositories

1

zhihu-py3

[不再维护] 后继者 zhihu-oauth https://github.com/7sDream/zhihu-oauth 已被 DMCA,亦不再开发,仅提供代码存档:
Python
1,038
star
2

pyqart

QArt Python Implementation.
Python
504
star
3

rikka

A simple image share system in go.
Go
208
star
4

torrent_parser

A .torrent file parser and creator for both Python 2 and 3
Python
149
star
5

django-intro-zh

Django 官方文档的 intro 部分的中文翻译
137
star
6

scp-pdf

SCP 基金会中文 Wiki 文档集,下载:https://github.com/7sDream/scp-pdf/releases
TeX
83
star
7

remda

Learn Ray Tracing in One Weekend series using Rust.
Rust
62
star
8

jellyap

Create a WiFi AP with transparent proxy quickly
Shell
49
star
9

qqqfome

Thank-you-follow-me Ha Ha Ha!
Python
42
star
10

tui-markup

markup langauge for terminal styled text
Rust
41
star
11

danmacu

自用 Bilibili 弹幕姬 for macOS
Python
41
star
12

certbot-dns-challenge-cloudflare-hooks

Simple scripts I use to auto renew my Let's encrypt wildcard SSL cert.
Shell
39
star
13

fonts-and-layout-zhCN

《Fonts and Layout for Global Scripts》中文版。一本关于字体设计、Unicode和计算机中复杂文本处理的免费书籍。
Typst
36
star
14

kd100

由于快递 100 接口的问题,目前脚本不可用,是否能修复取决于快递 100 官网是否恢复。详情请看 Issue #3。
Python
28
star
15

amiya

experimental middleware-based minimalism async HTTP server framework
Rust
22
star
16

0v0.link-blog

Blog, powered by django, sqlite, apache.
Python
15
star
17

moon-render

An experiment - render characters using moon emoji in shell 🌕️
C
14
star
18

firelomo

快速发送网页内容到 flomo 的火狐扩展
TypeScript
14
star
19

pixel-bird-jump

🐦 A small flappy-bird-like game demo by Godot engine
GDScript
13
star
20

which_fonts_support

This project will not update anymore, use https://github.com/7sDream/fontfor instead.
Python
12
star
21

nonebot-plugin-bam

Bilibili activity monitor plugin for nonebot.
Python
7
star
22

antarctica

Anatarctica maps based on leaflet.js, proj4leaflet and images from GIBS of NASA.
JavaScript
7
star
23

geko

GEneric Keep Order types for JSON (un)marshal.
Go
6
star
24

connex

A plumber game
Rust
5
star
25

gbc

基于OpenGL和GLUT的C++类库(OpenGL and GLUT Based Classes),写来学图形学的
C++
5
star
26

piano-emulator

A simple gui piano emulator, with Matlab.
HTML
4
star
27

coin

toss coin in the fish. 🌕🌖🌗🌘🌑🌒🌓🌔🌕
Shell
4
star
28

pyqt-piano-emulator

a piano emulator in windows by pyqt
Python
4
star
29

useful-files

some useful setting or other files
Shell
3
star
30

arbitrary

Rust
3
star
31

burz

Kaiheila bot framework for Rust
Rust
3
star
32

bgpview-cli

CLI tools for bgpview.io
Rust
2
star
33

typst-easy-pinyin

Write Chinese pinyin easily.
1
star
34

slog

Go
1
star
35

dotnes

[WIP] Yet another NES file parser
Rust
1
star
36

tui-markup-ansi-macro

A macro to generate styled ansi escape sequence from markup language
Rust
1
star
37

goodomain

A tiny toy to find good domain from your favorite word.
Svelte
1
star
38

nonebot-plugin-7s-roll

A roll dice plugin for nonebot
Python
1
star
39

qqbot-linger

My QQ Bot for personal use
Python
1
star