Skip to content

feat(units): add typography length units - #901

Open
efegokdemir wants to merge 1 commit into
sharkdp:mainfrom
efegokdemir:feat-797-typography-units
Open

efegokdemir wants to merge 1 commit into
sharkdp:mainfrom
efegokdemir:feat-797-typography-units

Conversation

@efegokdemir

Copy link
Copy Markdown

Closes #797

Summary

  • Add an opt-in units::typography module with PostScript/CSS point, pica and quarter-millimetre (Q).
  • Define point as 1/72 inch, pica as 12 points and Q as 1/4 mm.
  • Add seven conversion assertions covering inches, millimetres and combined lengths.
  • Keep typography out of the default prelude to avoid conflicting with existing uses of Q.
  • Preserve the existing pc abbreviation for parsec.

Validation

  • cargo run --quiet --bin numbat -- --no-config --no-init examples/tests/typography.nbt
  • cargo test -p numbat
  • cargo fmt --all -- --check
  • git diff --check

All checks passed locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

support typographic length units

1 participant