npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@font-forger/tools

v0.0.1-alpha.4

Published

`pex/` 目录下包含一些用于字体处理的 Python 可执行文件(PEX),用于快速运行字体相关工具,无需单独安装环境。

Downloads

622

Readme

生成 PEX 文件

pex/ 目录下包含一些用于字体处理的 Python 可执行文件(PEX),用于快速运行字体相关工具,无需单独安装环境。


安装 PEX

pip install pex

生成 pyftsubset.pex

用于字体子集化(裁剪字体,只保留指定字符)。

构建 PEX

pex fonttools brotli zopfli -o pyftsubset.pex -m fontTools.subset

依赖说明

  • fonttools:字体处理核心库
  • brotli:提供 WOFF2 压缩支持
  • zopfli:更高压缩率的 gzip 实现

使用方式

python ./pyftsubset.pex font.ttf --text="Hello World" --output-file=subset.ttf

生成 pyftschars.pex

用于读取字体文件中包含的所有字符。

创建 pyftschars.py

from fontTools.ttLib import TTFont

import sys

font = TTFont(sys.argv[1], lazy=True)

print(''.join(chr(cp) for cp in font.getBestCmap().keys()))

构建 PEX

需要保证当前目录下只有pyftschars.py不然会把其他产物也打包进去会很大

pex fonttools brotli zopfli -D . -m pyftschars -o pyftschars.pex

使用方式

python ./pyftschars.pex ./font.ttf