Skip to content

Commit

Permalink
refactor: change project name
Browse files Browse the repository at this point in the history
font-metrics is taken on crates.io
  • Loading branch information
tomcur committed Jul 26, 2024
1 parent 6513dc1 commit 2e93bdc
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 24 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ jobs:
- name: Run font-enumeration tests
run: cargo test --package font-enumeration --verbose

build-and-test-font-metrics:
build-and-test-font-info:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Build font-metrics
run: cargo build --package font-metrics --verbose
- name: Run font-metrics tests
run: cargo test --package font-metrics --verbose
- name: Build font-info
run: cargo build --package font-info --verbose
- name: Run font-info tests
run: cargo test --package font-info --verbose
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
name = "font-metrics"
name = "font-info"
version = "0.1.0"
edition = "2021"
description = "Load fonts and print their metrics"
keywords = ["font", "glyph", "text"]
license = "MIT OR Apache-2.0"
readme = "README.md"
repository = "https://github.com/tomcur/font-metrics"
repository = "https://github.com/tomcur/font-info"

[dependencies]
anyhow = "1.0.86"
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<div align="center">

# font-metrics 🗚
# font-info 🗚

**Load fonts and print their metrics**

![MIT/Apache 2.0](https://img.shields.io/badge/license-MIT%2FApache-blue.svg)
[![Crates.io](https://img.shields.io/crates/v/font-metrics.svg)](https://crates.io/crates/font-metrics)
[![Build status](https://github.com/tomcur/font-metrics/workflows/CI/badge.svg)](https://github.com/tomcur/font-metrics/actions)
[![Crates.io](https://img.shields.io/crates/v/font-info.svg)](https://crates.io/crates/font-info)
[![Build status](https://github.com/tomcur/font-info/workflows/CI/badge.svg)](https://github.com/tomcur/font-info/actions)

</div>

Expand All @@ -25,12 +25,12 @@ Supported platforms:

## Usage

See `$ font-metrics --help` for CLI usage documentation. For example, to find
See `$ font-info --help` for CLI usage documentation. For example, to find
all fonts in the "Liberation Sans" font family on your system and print out
their metrics, run:

```bash
$ font-metrics --family-name "Liberation Sans"
$ font-info --family-name "Liberation Sans"
-[ FONT 1 ]-------------------------------------------------
Source: /path/to/share/fonts/truetype/LiberationSans-Bold.ttf
Font index in source: 0
Expand All @@ -57,7 +57,7 @@ The previous command has human-readable output. To output as machine-readable
JSON, run:

```bash
$ font-metrics --family-name "Liberation Sans" --format json
$ font-info --family-name "Liberation Sans" --format json
```

You can print fonts' features and supported writing systems using the
Expand All @@ -68,13 +68,13 @@ You can print fonts' features and supported writing systems using the
Install using Cargo:

```bash
$ cargo install font-metrics
$ font-metrics --family-name "Liberation Sans"
$ cargo install font-info
$ font-info --family-name "Liberation Sans"
```

Run using Nix flakes:

```bash
# Run ls
$ nix run github:tomcur/font-metrics -- --family-name "Liberation Sans"
$ nix run github:tomcur/font-info -- --family-name "Liberation Sans"
```
2 changes: 1 addition & 1 deletion default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
, fontconfig
}:
rustPlatform.buildRustPackage {
pname = "font-metrics";
pname = "font-info";
version = (lib.trivial.importTOML ./Cargo.toml).package.version;
src = ./.;
cargoLock = {
Expand Down
4 changes: 2 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
pkgs = nixpkgs.legacyPackages.${system};
in
rec {
packages.font-metrics = pkgs.callPackage ./default.nix { };
packages.default = packages.font-metrics;
packages.font-info = pkgs.callPackage ./default.nix { };
packages.default = packages.font-info;
devShells.default = pkgs.mkShell
{
buildInputs = with pkgs; [
Expand Down
2 changes: 1 addition & 1 deletion font-enumeration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description = "Simple cross-platform font enumeration"
keywords = ["font", "text"]
license = "MIT OR Apache-2.0"
readme = "README.md"
repository = "https://github.com/tomcur/font-metrics"
repository = "https://github.com/tomcur/font-info"

[dependencies]
thiserror = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion font-enumeration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

![MIT/Apache 2.0](https://img.shields.io/badge/license-MIT%2FApache-blue.svg)
[![Crates.io](https://img.shields.io/crates/v/font-enumeration.svg)](https://crates.io/crates/font-enumeration)
[![Build status](https://github.com/tomcur/font-metrics/workflows/CI/badge.svg)](https://github.com/tomcur/font-metrics/actions)
[![Build status](https://github.com/tomcur/font-info/workflows/CI/badge.svg)](https://github.com/tomcur/font-info/actions)

</div>

Expand Down
4 changes: 2 additions & 2 deletions src/logger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ impl Log for StderrLogger {
let _ = match (record.file(), record.line()) {
(Some(file), Some(line)) => writeln!(
stderr,
"font-metrics: {}|{file}:{line}: {}",
"font-info: {}|{file}:{line}: {}",
record.level(),
record.args()
),
(_, _) => writeln!(
stderr,
"font-metrics: {}: {}",
"font-info: {}: {}",
record.level(),
record.args()
),
Expand Down

0 comments on commit 2e93bdc

Please sign in to comment.