Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
36ae430
HTML reports: scratching the surface
RickyDaMa Oct 23, 2025
1546f12
Find language-specific BASE overrides
RickyDaMa Oct 23, 2025
c5ea7be
Fix escaping
RickyDaMa Oct 23, 2025
97a971e
Split fontheight's shaping & location tech into its own crate
RickyDaMa Oct 24, 2025
feee7af
Add README
RickyDaMa Oct 24, 2025
9f5cd33
Add a TODO
RickyDaMa Oct 24, 2025
3fe8e47
Render SVG words
RickyDaMa Oct 24, 2025
0b1157f
Add legend for win ascent/descent and fix descent line position
RickyDaMa Oct 24, 2025
d19794e
Consolidate reports by script, then sort by word list & location
RickyDaMa Oct 24, 2025
6d4efa3
Hack to fix sorting / HTML report generation
RickyDaMa Oct 27, 2025
930d6ed
Fix shaping
RickyDaMa Oct 27, 2025
5416711
Don't be misleading
RickyDaMa Oct 27, 2025
98520fb
Move BezierPen to harfshapedfa as BoundsPen
RickyDaMa Oct 28, 2025
abe332d
Fix BASE table reading
RickyDaMa Oct 28, 2025
6b8602e
Implement FromIterator for Location and use in Reporter::interesting_…
RickyDaMa Oct 28, 2025
bb0e213
Refactor: waste less effort; fix BASE lang lookup
RickyDaMa Oct 28, 2025
8371e71
Log time taken for HTML report
RickyDaMa Oct 29, 2025
5b6f228
Re-export kurbo as its own module, not part of pens
RickyDaMa Oct 29, 2025
64e9759
Show conditional features on docs.rs
RickyDaMa Oct 29, 2025
8f06cc5
Resolve a TODO by thinking about it
RickyDaMa Oct 29, 2025
cb16eae
Refactor SVG drawing and add padding
RickyDaMa Oct 29, 2025
3e08431
Improve styling of lines legend & add baseline
RickyDaMa Oct 29, 2025
1f89d6f
Reduce padding a bit
RickyDaMa Oct 29, 2025
66845ae
Tidy
RickyDaMa Oct 29, 2025
0c797ea
Show required features
RickyDaMa Oct 29, 2025
8a13653
Document harfshapedfa
RickyDaMa Oct 30, 2025
eb0ec7b
Update versions & changelogs
RickyDaMa Oct 30, 2025
5a84db1
Document HTML reporter more thoroughly
RickyDaMa Oct 30, 2025
23cf6c7
Add CI workflow for generating docs
RickyDaMa Oct 30, 2025
679385d
Fix doc building
RickyDaMa Oct 30, 2025
6fd8ac1
Docs
RickyDaMa Oct 30, 2025
03008cf
Rename report
RickyDaMa Oct 31, 2025
8535e7c
Caveat
RickyDaMa Oct 31, 2025
a53e4ff
Add more detail to the README
RickyDaMa Oct 31, 2025
df2b833
Clarify better when we're positioning relative to what
RickyDaMa Oct 31, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
on:
push:
branches:
- main
pull_request:

name: Generate docs

# Make sure CI fails on all warnings, and pretend we're docs.rs
env:
RUSTFLAGS: "-Dwarnings -Adead-code -Aunused-imports -Aunused-macros"
# FIXME: in future, use the below to better match docs.rs. At the time of
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally, let's move the TODOs and FIXMEs in this file into issues

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do after merging!

# writing (2025/10/30), a very common documentation-related nightly
# feature attribute (doc_auto_cfg) has been renamed (to doc_cfg) which
# is resulting in the pipeline failing due to transient dependencies
# using the removed feature (even though I specify --no-deps). Not
# fully matching docs.rs also causes some warnings to get emitted
# while building SLWL, so allow those for now.
# RUSTFLAGS: "-Dwarnings --cfg docsrs"

jobs:
generate-docs:
name: ${{ matrix.crate }}
runs-on: ubuntu-latest
strategy:
matrix:
crate:
- fontheight
- harfshapedfa
- static-lang-word-lists
steps:
# docs.rs uses nightly rust
- name: Setup nightly Rust
uses: dtolnay/rust-toolchain@nightly
- name: Checkout ${{ github.head_ref || github.ref_name }}
uses: actions/checkout@v4
- name: Document
shell: bash
run: cargo +nightly doc --all-features --no-deps --package ${{ matrix.crate }}
# TODO: could we deploy this to GitHub pages somehow?
# https://github.com/actions/upload-pages-artifact
# https://github.com/actions/deploy-pages
106 changes: 93 additions & 13 deletions Cargo.lock

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

8 changes: 7 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,20 @@
resolver = "2"
members = [
"cli",
"core",
"core", "harfshapedfa",
"static-lang-word-lists",
"xtask",
]

[workspace.dependencies]
# Note: make sure harfrust's read-fonts matches skrifa's read-fonts
harfrust = "=0.3.2"
harfshapedfa = { version = "0.1.0", path = "harfshapedfa", features = ["pens"] }
log = "0.4.25"
ordered-float = "5"
rayon = "1.10"
# Note: make sure skrifa's read-fonts matches harfrust's read-fonts
skrifa = "=0.37.0"
thiserror = "2"

[profile.release]
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ Options:
-k, --words <WORDS_PER_LIST> The number of words from each list to test [default: all words]
-v, --verbose... Increase logging verbosity
-q, --quiet... Decrease logging verbosity
-o, --output <OUTPUT_PATH> Write the reports into the given path. Will print to stdout if not specified
--html Output all the reports into a single HTML file
-h, --help Print help
-V, --version Print version
```
Expand Down
9 changes: 8 additions & 1 deletion cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
# `fontheight` CLI

## Unreleased
## v0.1.1

### Added

- LibreOffice word lists
- HTML reporter, use `--html` to receive a visual report of the exemplar words against various metric lines
- `-o/--output` flag, to have `fontheight` write into a file

### Changes

- Update word lists
- Sort exemplars lexicographically if their vertical extents match

## v0.1.0 - 2025/09/12

Expand Down
14 changes: 10 additions & 4 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "fontheight-cli"
description = "Find out the vertical extents your font reaches on shaped words"
version = "0.1.0"
version = "0.1.1"
edition = "2024"
authors = [
"Dalton Maag <sd@daltonmaag.com>",
Expand All @@ -19,9 +19,15 @@ path = "src/main.rs"
[dependencies]
anyhow = "1"
clap-verbosity-flag = { version = "3", features = ["log"] }
fontheight = { version = "0.1.5", path = "../core" }
log = { workspace = true }
rayon = { workspace = true }
fontheight = { version = "0.2", path = "../core" }
harfrust.workspace = true
harfshapedfa.workspace = true
log.workspace = true
maud = "0.27.0"
ordered-float.workspace = true
rayon.workspace = true
skrifa.workspace = true
svg = "0.18"

[dependencies.static-lang-word-lists]
version = "0.4"
Expand Down
Loading