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 🙏

© 2024 – Pkg Stats / Ryan Hefner

connect-fonts-tools

v0.0.4

Published

Utility scripts for working with connect-fonts font packs

Downloads

4

Readme

connect-fonts-tools

A collection of tools to create connect-fonts and npm compatible packages.

Usage

Set up generic author/package maintainer information

Run scripts/setup to set up generic author information that can be used to create multiple font packs.

Create a Font Pack

scripts/create_fontpack creates a connect-fonts compatible font pack from the .ttf files in a source directory. If you have already run scripts/setup, creating a font pack is easy:

<path_to_connect_fonts_tools>/scripts/create_fontpack --pn <pack_name> --sp <source_path> --tp <target_path>

If the font pack is for public use, additional parameters can be specified that will be placed inside the font pack's package.json and README.md files.

<path_to_connect_fonts_tools>/scripts/create_fontpack --pn <pack_name> --ph <pack_homepage_url> --pr <pack_repo_url> --pb <pack_bugtracker_url> --sp <source_path> --tp <target_path>

Once the pack is created, it can be published to npm:

cd <font_pack_directory>
npm publish

The font pack can then be installed from npm:

npm install <pack_name>

If the font pack is not to be published to the npm repository, it can be installed to another local project directory:

cd <target_project_dir>
npm install <font_pack_directory>

Subset an already installed font pack

scripts/subset can be used to subset an already installed font pack into fonts that are locale-optimised.

cd node_modules/<font_directory>/fonts/default
<path_to_connect_fonts_tools>/script/subset --ss=<subsets> --sp <font_name or .> --tp ../ -o --wf

Other tools

Tools exist to create individual portions of a font pack or npm module.

  • create_index - create an index.js for use by connect-fonts
  • create_license - create LICENSE
  • create_package_json - create package.json for use by npm
  • create_readme - create README.md file that contains font, author, license and repo information.
  • create_webfonts - create .woff, .svg, and .eot fonts from a .ttf file
  • display_directory_metadata - read and display the common metadata embedded in the .ttf files in a directory
  • display_file_metadata - read and display the metadata embedded in a single .ttf file
  • normalize_filenames - normalize all the filenames. Lowercases all filenames, expand -it to -italics, remove -webfont
  • subset - subset a .ttf font into smaller, locale specific fonts

Requirements

create_fontpack and subset make use of FontForge.

FontForge can be installed in Mac OSX with Homebrew by typing brew install fontforge. In Linux or Windows, see the directions provided by the Open Font Library.

Author:

Credits:

subset.py comes from Google Font Directory and is licensed under the Apache 2.0 license. Its authors are Raph Levien and Dave Crossland.

Getting involved:

MOAR font packs!

Any updates to connect-fonts-tools are appreciated. All submissions will be reviewed and considered for merge.

License:

This software is available under version 2.0 of the MPL:

https://www.mozilla.org/MPL/

subset.py, from Google Font Directory, is licensed under the Apache 2.0 license.

http://www.apache.org/licenses/LICENSE-2.0