Compare commits

...
Author SHA1 Message Date
swaits 7ad3c5ad65 chore(codly-languages): bump version to 0.1.5 2025-01-10 10:25:31 -07:00
swaits 079e80edb2 doc(codly-languages): update README
- clean up icon attribution section
- eliminate nauseating list of missing languages
2025-01-10 10:23:50 -07:00
swaits 4761b49867 chore(codly-languages): update LICENSE to 2025 copyright 2025-01-10 10:23:46 -07:00
swaits e4c1350ebc Merge pull request #23 from Kees-van-Beilen/patch-1
Update css3.svg
2025-01-10 09:37:52 -07:00
Kees van Beilen b0dac5f91a Update css3.svg 2025-01-10 09:37:52 -07:00
swaits d0e7fe4371 chore: add clean.sh to remove test artifacts 2025-01-10 09:21:44 -07:00
swaits 0cd345a123 merge: published easy-typography-0.1.0 and tasteful-pairings-0.1.0 to main 2025-01-10 08:47:52 -07:00
swaits d296f3a3f1 chore(tasteful-pairings): updated description from @neuralpain
Integrates change in [this
PR](https://github.com/typst/packages/pull/1526) from
[neuralpain](https://github.com/neuralpain).
2025-01-09 13:05:37 -07:00
swaits 338fee564f fix(tasteful-pairings): update Adobe open-source fonts to latest versions 2025-01-09 13:00:08 -07:00
swaits a76b261348 chore(easy-typography): rm rogue pdf 2025-01-09 12:17:26 -07:00
swaits 093fcf88fd fix(easy-typography): incorporates changes from community
Incoroporates changes from [this
PR](https://github.com/typst/packages/pull/1527) and updates tests
accordingly.

Thank you to [neuralpain](https://github.com/neuralpain) and
[ssotoen](https://github.com/ssotoen) for the suggestions and code
fixes.
2025-01-09 12:06:06 -07:00
swaits 1e095a8b26 feat(tasteful-pairings): initial version 2025-01-07 22:52:47 -07:00
swaits 5ad6c10b65 feat(easy-typography): initial implementation 2025-01-07 22:52:47 -07:00
25 changed files with 579 additions and 77 deletions

No files matched your search

+5
View File
@@ -11,6 +11,8 @@ links below to their main page.
- [**codly-languages**](https://typst.app/universe/package/codly-languages): A
set of language configurations for use with
[codly](https://typst.app/universe/package/codly).
- [easy-typography](https://typst.app/universe/package/easy-typography): Sets up
sensible typography defaults.
- [**glossy**](https://typst.app/universe/package/glossy): A very simple
glossary system with easily customizable output.
- [**rfc-vibe**](https://typst.app/universe/package/rfc-vibe): Bring RFC language
@@ -19,6 +21,9 @@ links below to their main page.
create various run-in lists.
- [**swank-tex**](https://typst.app/universe/package/swank-tex): Render those
funky logos for TeX, LaTeX, and friends.
- [**tasteful-pairings**](https://typst.app/universe/package/tasteful-pairings):
A carefully curated collection of font pairings focusing on readability and
typographic harmony.
## Templates
Executable
+22
View File
@@ -0,0 +1,22 @@
#!/usr/bin/env bash
# remove-diff-out.sh
#
# Removes all files (including hidden) in any <pkg>/tests/<test>/diff or out directories.
set -euo pipefail
# 1) Make the shell match hidden files (dotfiles) in globs.
# 2) Let an empty glob expand to zero arguments rather than itself.
shopt -s dotglob nullglob
# 2) Loop over any matching directories: <pkg>/tests/<test>/{diff,out}
for dir in */tests/*/{diff,out}; do
# Only proceed if it's actually a directory
if [[ -d "$dir" ]]; then
echo "Removing files under: $dir"
# Remove everything inside (including hidden files)
rm -rf -- "$dir"/*
fi
done
echo "Done!"
+1 -1
View File
@@ -1,6 +1,6 @@
MIT License
Copyright (c) 2024 Stephen Waits <steve@waits.net>
Copyright (c) 2025 Stephen Waits <steve@waits.net>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
+21 -74
View File
@@ -13,7 +13,7 @@ Configure `codly` with the languages. Like this:
#import "@preview/codly:1.1.1": *
#show: codly-init
#import "@preview/codly-languages:0.1.4": *
#import "@preview/codly-languages:0.1.5": *
#codly(languages: codly-languages)
```
@@ -24,85 +24,32 @@ languages, should look like this:
## Contributing
The following languages are still missing. All contributions welcome.
- ASP
- ActionScript
- Ada
- AppleScript
- AsciiDoc
- Batch File
- CFML
- CSV
- Cabal
- Crontab
- D
- Diff
- DotENV
- Email
- Fish
- Fstab
- GLSL
- Graphviz
- Groff
- Group
- INI
- Jinja2
- Jsonnet
- Lean
- LiveScript
- Makefile
- MediaWiki
- NSIS
- Ninja
- Org mode
- Pascal
- Passwd
- Protobuf
- Puppet
- QML
- Racket
- Rego
- Regular Expressions
- Resolv
- RestructuredText
- Robot
- SLS
- SML
- Slim
- Strace
- SublimeEthereum
- SublimeJQ
- SystemVerilo
- TCL
- TOML
- Textile
- TodoTxt
- Verilog
- WGSL
- cmd-help
- gnuplot
- hosts
- http-request-response
- varlink
- vscode-wgsl
Some languages are still missing. All contributions welcome.
## Icon Attribution
The `typst-small.png` icon included in this package came from the MIT-licensed
[codly](https://github.com/Dherse/codly) project.
| **Icon** | **Source** | **License** |
| ----------------- | ---------------------------------------- | ---------------------------- |
| `css3.svg` | [CSS-Next/logo.css][css3-source] | [CC0][css3-license] |
| `cuda.svg` | [vscode-icons/vscode-icons][cuda-source] | [MIT][cuda-license] |
| `lisp.svg` | [Wikipedia (User:Jooja)][lisp-source] | [CC BY-SA 4.0][lisp-license] |
| `typst-small.png` | [Dherse/codly][typst-source] | [MIT][typst-license] |
The `lisp.svg` icon comes [from
Wikipedia](https://commons.wikimedia.org/wiki/File:Lisp_logo.svg), attribution:
Jooja, CC BY-SA 4.0 <https://creativecommons.org/licenses/by-sa/4.0>, via
Wikimedia Commons.
[css3-source]: https://github.com/CSS-Next/logo.css/blob/main/css.svg?short_path=c59d4da
[css3-license]: https://github.com/CSS-Next/logo.css/blob/main/LICENSE
[cuda-source]: https://github.com/vscode-icons/vscode-icons/tree/master
[cuda-license]: https://github.com/vscode-icons/vscode-icons/blob/master/LICENSE
[lisp-source]: https://commons.wikimedia.org/wiki/File:Lisp_logo.svg
[lisp-license]: https://commons.wikimedia.org/wiki/File:Lisp_logo.svg#Licensing
[typst-source]: https://github.com/Dherse/codly
[typst-license]: https://github.com/Dherse/codly/blob/main/LICENSE
The `cuda.svg` icon included in this package came from the MIT-licensed
[vscode-icons](https://github.com/vscode-icons/vscode-icons) project.
All icons not listed in this table come from the
[devicons/devicon][default-source] project, [MIT licensed][default-license].
All other icons included here came from the MIT-licensed
[devicon](https://github.com/devicons/devicon/) project.
[default-source]: https://github.com/devicons/devicon/
[default-license]: https://github.com/devicons/devicon/blob/master/LICENSE
## License
This package is released under the MIT License.
This package is released under the [MIT License](LICENSE).
+5 -1
View File
@@ -1 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128"><path fill="#1572B6" d="M18.814 114.123L8.76 1.352h110.48l-10.064 112.754-45.243 12.543-45.119-12.526z"/><path fill="#33A9DC" d="M64.001 117.062l36.559-10.136 8.601-96.354h-45.16v106.49z"/><path fill="#fff" d="M64.001 51.429h18.302l1.264-14.163H64.001V23.435h34.682l-.332 3.711-3.4 38.114h-30.95V51.429z"/><path fill="#EBEBEB" d="M64.083 87.349l-.061.018-15.403-4.159-.985-11.031H33.752l1.937 21.717 28.331 7.863.063-.018v-14.39z"/><path fill="#fff" d="M81.127 64.675l-1.666 18.522-15.426 4.164v14.39l28.354-7.858.208-2.337 2.406-26.881H81.127z"/><path fill="#EBEBEB" d="M64.048 23.435v13.831H30.64l-.277-3.108-.63-7.012-.331-3.711h34.646zm-.047 27.996v13.831H48.792l-.277-3.108-.631-7.012-.33-3.711h16.447z"/></svg>
<!--from https://github.com/CSS-Next/logo.css/blob/main/css.svg?short_path=c59d4da cc0-->
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000" role="img" aria-labelledby="css-logo-title css-logo-description">
<path id="bg" fill="#639" d="M0 0H840A160 160 0 0 1 1000 160V840A160 160 0 0 1 840 1000H160A160 160 0 0 1 0 840V0Z" />
<path id="fg" fill="#fff" d="m358.1,920c-64.23-.06-103.86-36.23-103.1-102.79,0,0,0-168.39,0-168.39,0-33.74,9.88-59.4,29.64-76.96,35.49-34.19,117.83-36.27,152.59.52,21.42,18.89,29.5,57.48,27.58,93.49h-73.72c.56-14.15-.19-35.58-8.51-43.65-10.81-14.63-39.36-12.91-46.91,2.32-4.64,8.26-6.96,20.49-6.96,36.67v146.18c0,30.65,10.65,46.15,31.96,46.49,9.96,0,17.53-3.62,22.68-10.85,7.19-8.58,8.31-27.58,7.73-41.32h73.72c5.04,70.07-36.32,119.16-106.71,118.29Zm234.04,0c-71.17.98-103.01-49.66-101.04-118.29h69.59c-1.93,29.92,8.35,57.17,32.99,55.27,10.99,0,18.73-3.44,23.2-10.33,8.5-12.59,10.09-48.95-2.06-63.02-8.49-13.55-39.03-25.51-55.16-33.57-23.03-11.02-39.61-24.1-49.75-39.26-22.87-33.64-20.75-107.48,11.34-137.4,31.18-36.92,112.61-38.62,143.82-.77,19.25,19.51,27.66,57.9,26.03,93.23h-67.02c.57-14.52-.8-37.95-6.44-46.49-3.95-7.23-11.43-10.85-22.42-10.85-19.59,0-29.38,11.71-29.38,35.12.21,24.86,9.9,35.06,32.48,45.45,29.24,11.36,66.42,30.76,79.9,54.24,40.2,71.54,12.62,180.82-86.09,176.65Zm224.76,0c-71.17.98-103.01-49.66-101.04-118.29h69.59c-1.93,29.92,8.35,57.17,32.99,55.27,10.99,0,18.73-3.44,23.2-10.33,8.5-12.59,10.09-48.95-2.06-63.02-8.49-13.55-39.03-25.51-55.16-33.57-23.03-11.02-39.61-24.1-49.75-39.26-22.87-33.64-20.75-107.48,11.34-137.4,31.18-36.92,112.61-38.62,143.82-.77,19.25,19.51,27.66,57.9,26.03,93.23h-67.02c.57-14.52-.8-37.95-6.44-46.49-3.95-7.23-11.43-10.85-22.42-10.85-19.59,0-29.38,11.71-29.38,35.12.21,24.86,9.9,35.06,32.48,45.45,29.24,11.36,66.42,30.76,79.9,54.24,40.2,71.54,12.62,180.82-86.09,176.65Z" />
</svg>

Before

Width:  |  Height:  |  Size: 778 B

After

Width:  |  Height:  |  Size: 1.8 KiB

+1 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "codly-languages"
version = "0.1.4"
version = "0.1.5"
entrypoint = "lib.typ"
authors = ["Stephen Waits <steve@waits.net>"]
license = "MIT"
+2
View File
@@ -0,0 +1,2 @@
tests/**/out/
tests/**/diff/
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2025 Stephen Waits <steve@waits.net>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+65
View File
@@ -0,0 +1,65 @@
# Easy Typography for Typst
A Typst package that simplifies professional typography by providing sensible
defaults and easy customization options. Focus on your content while ensuring
beautiful, readable documents.
## Features
- 🎨 Precise heading scale with clear hierarchy
- 📏 Optimal line height and paragraph spacing
- 📖 Professional text justification and hyphenation
- ⚖️ Balanced vertical rhythm throughout
- ⚡ Simple configuration with reasonable defaults
## Usage
Basic usage with default settings:
```typst
#import "@preview/easy-typography:0.1.0": *
#show: easy-typography
= Your Document Title
Your content here...
```
Customized usage with specific fonts:
```typst
#show: easy-typography.with(
fonts: (
heading: "Source Sans Pro",
body: "Source Serif Pro"
),
body-size: 11pt,
paper: "a4",
margin: 2cm
)
```
## Configuration Options
- `body-size`: Base size for body text (default: 10pt)
- `fonts`: Dictionary specifying heading and body fonts
- `heading`: Font for headings (default: "Libertinus Sans")
- `body`: Font for body text (default: "Libertinus Serif")
- `paper`: Paper size setting (optional)
- `margin`: Page margin setting (optional)
## Example Output
The package automatically handles:
- Heading sizes with natural visual hierarchy (H1-H5)
- Optimal spacing between elements
- Professional text justification
- Smart hyphenation
- Consistent vertical rhythm
See the [example output](thumbnail.png) for more information and a complete
example.
## License
MIT License - See [LICENSE](LICENSE) for details.
+1
View File
@@ -0,0 +1 @@
#import "src/main.typ": easy-typography
+29
View File
@@ -0,0 +1,29 @@
// Constants
// space above H1
#let heading-above-max = 1.25em
// space above H5
#let heading-above-min = 0.80em
// space below H1
#let heading-below-max = 0.65em
// space below H5
#let heading-below-min = 0.55em
// font size for H1
#let heading-size-max = 1.10em
// font size for H5
#let heading-size-min = 1.00em
// default text weight -- light is best for reading, and printers are fine with
// it these days
#let body-weight = "light"
// line spacing -- tight; efficient but still readable with good fonts
#let line-spacing = 1.30
// paragraph spacing -- defaults to a double-space
#let paragraph-spacing = 1.70
+102
View File
@@ -0,0 +1,102 @@
#import "constants.typ": *
/// The main function for easy typography setup.
///
/// - body-size (): The size of body text (default 10pt).
/// - fonts (): A dictionary specifying heading/body fonts.
/// - paper (str): The paper size to use (none to skip).
/// - margin (): Margin for the page (none to skip).
/// -> content
#let easy-typography(
body-size: 10pt,
fonts: (heading: "Libertinus Sans", body: "Libertinus Serif"),
paper: none,
margin: none,
body
) = {
// Optional page setup
if paper != none {
set page(paper: paper)
}
if margin != none {
set page(margin: margin)
}
// Paragraphs
set par(
leading: line-spacing * 0.5em,
spacing: paragraph-spacing * 0.5em,
justify: true,
linebreaks: "optimized",
)
// Body text
set text(
font: fonts.body,
fallback: false,
style: "normal",
weight: body-weight,
stretch: 100%,
size: body-size,
tracking: 0pt,
spacing: 100% + 0pt,
baseline: 0pt,
overhang: true,
hyphenate: true,
kerning: true,
ligatures: true,
number-width: "proportional",
// number-type: "lining", // commented: intentionally left up to the font to choose
)
show table: set text(number-width: "tabular")
/// Top-heavy easing function for heading sizes/spacing.
///
/// `sqrt(t)` gives biggest decrease at top, gentlest at bottom.
///
/// - max (length): Biggest size (H1)
/// - min (length): Smallest size (H5)
/// - level (length): From 1 to 5
/// -> length
let compute-size(max, min, level) = {
if level <= 1 {
max
} else if level >= 5 {
min
} else {
let t = (level - 1) / 4
max - (max - min) * calc.sqrt(t)
}
}
// Heading weight logic
let compute-weight(level) = {
if level <= 1 {
"bold"
} else if level == 2 {
"semibold"
} else if level == 3 {
"medium"
} else {
"regular"
}
}
// Show headings using computed size/spacing values
show heading: it => block(
breakable: false,
sticky: true,
above: compute-size(heading-above-max, heading-above-min, it.level),
below: compute-size(heading-below-max, heading-below-min, it.level),
text(
font: fonts.heading,
size: compute-size(heading-size-max, heading-size-min, it.level),
weight: compute-weight(it.level),
it
)
)
// Finally, render the body
body
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 769 KiB

+125
View File
@@ -0,0 +1,125 @@
#import "/lib.typ": *
#import "@preview/codly:1.2.0": *
#import "@preview/codly-languages:0.1.1": *
#show: codly-init.with()
#codly(languages: codly-languages)
#show: easy-typography.with(
fonts: (heading: "Source Sans 3", body: "Source Serif 4"),
)
= Introducing Easy Typography
#set heading(numbering: (..nums) => {
numbering("1.1.", ..nums.pos().slice(1))
})
The `easy-typography` package transforms complex typographic decisions into
simple choices, letting you focus on your content while ensuring professional
results. By adjusting the settings to match your specific needs, you can refine
the aesthetic or adapt your layout for everything from casual reading to formal
publication.
== Core Typography Features
The package manages:
#columns(2)[
- Precise heading scale with a clear hierarchy
- Optimal line height and paragraph spacing
#colbreak()
- Professional text justification and hyphenation
- Balanced vertical rhythm throughout
]
These features ensure that your document is both visually appealing and easy to
read.
=== Type Formatting
This package automatically adjusts line spacing, paragraph spacing, and
justification to maintain a clean layout. Headings are also carefully weighted
to balance them against the body text, so you can focus on content rather than
tweaking spacing and sizing. Standard formatting like *bold* and _italic_
integrates seamlessly with `easy-typography`'s approach.
=== Heading Levels
The heading scale gracefully steps down, ensuring that each level remains
distinct yet consistent. Behind the scenes, `easy-typography` calculates the
ideal size for each heading, preserving a cohesive visual hierarchy as your
document gets deeper. This approach supports manuals, academic papers, and any
long-form text where structure matters. It also helps in shorter documents,
guaranteeing a crisp layout with minimal effort.
== Why Typography Matters
Good typography isn't just about aesthetics. It's about effective communication.
Well-designed text:
#columns(2)[
- Improves reading comprehension
- Reduces eye strain
- Maintains reader engagement
#colbreak()
- Establishes visual hierarchy
- Conveys professionalism
]
Notice how this document's typography enhances readability. The justified text,
proper hyphenation, and optimized line breaks create a clean, professional
appearance. With each heading level, the user can quickly scan and digest
important information.
== Example Usage and Output
#set heading(numbering: none)
#show raw.where(block: true): set text(size: 7pt)
#grid(
columns: (55%, auto),
gutter: 1.0em,
[
// code
```typst
#import "@preview/easy-typography:0.1.0": *
#show: easy-typography.with(
fonts: (
heading: "Source Sans Pro",
body: "Source Serif Pro"
),
)
#lorem(6)
= Level One
#lorem(6)
== Level Two
#lorem(6)
=== Level Three
#lorem(6)
==== Level Four
#lorem(6)
===== Level Five
#lorem(6)
```
],
box(
stroke: 0.5pt + silver,
inset: 0.5em,
radius: 0.2em,
[
#lorem(6)
= Level One
#lorem(6)
== Level Two
#lorem(6)
=== Level Three
#lorem(6)
==== Level Four
#lorem(6)
===== Level Five
#lorem(6)
]
) // box
)
Binary file not shown.

After

Width:  |  Height:  |  Size: 306 KiB

+10
View File
@@ -0,0 +1,10 @@
[package]
name = "easy-typography"
version = "0.1.0"
entrypoint = "lib.typ"
authors = ["Stephen Waits <steve@waits.net>"]
license = "MIT"
description = "Sets up sensible typography defaults."
keywords = ["easy", "typography", "defaults"]
repository = "https://github.com/swaits/typst-collection"
exclude = ["thumbnail.png", "tests"]
+2
View File
@@ -0,0 +1,2 @@
tests/**/out/
tests/**/diff/
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2025 Stephen Waits <steve@waits.net>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+57
View File
@@ -0,0 +1,57 @@
# Tasteful Pairings
A carefully curated collection of font pairings for [Typst](https://typst.app/),
focusing on readability and typographic harmony. Each pairing combines a
sans-serif heading font with a serif body font, following established
typographic principles for clear visual hierarchy and optimal reading
experience.
## Installation
```typ
#import "@preview/tasteful-pairings:0.1.0": *
```
## Usage
```typ
#let pairing = font-pairings.at("modern-heritage")
#show heading: set text(font: pairing.heading)
#set text(font: pairing.body)
= Your Document Title
Your content here...
```
## Available Pairings
- **`ibm-plex`** - Modern corporate-friendly superfamily
- **`noto`** - Extensive language support, highly legible
- **`source`** - Adobe's refined open-source pair
- **`friendly-weather`** - Open Fira Sans with space-efficient Merriweather
- **`android`** - Complete Roboto family look
- **`kindle`** - Amazon's reading-optimized fonts
- **`office`** - Classic Microsoft Office combination
- **`modern-heritage`** - Contemporary Montserrat with timeless Georgia Pro
- **`legible`** - Reading-focused Lexend and Literata
## Gallery
![Font pairing examples gallery](thumbnail.png)
## Philosophy
The pairings in this collection follow these principles:
1. **Sans for Headlines, Serif for Body** - Following traditional typographic
wisdom for clear hierarchy
2. **Readability First** - Each pairing is tested for optimal reading experience
3. **Complementary Characteristics** - Fonts are matched based on x-height,
weight balance, and character width
4. **Practical Applications** - Selected for real-world use cases from corporate
documents to digital reading
## License
[MIT License](LICENSE).
+1
View File
@@ -0,0 +1 @@
#import "src/main.typ": font-pairings
+55
View File
@@ -0,0 +1,55 @@
#let font-pairings = (
"ibm-plex": (
heading: "IBM Plex Sans",
body: "IBM Plex Serif",
description: "A modern corporate-friendly superfamily with a wide weight range. Clean, neutral, and highly legible."
),
"noto": (
heading: "Noto Sans",
body: "Noto Serif",
description: "Huge language coverage, highly legible, and neutral. Great for multilingual documents."
),
"source": (
heading: "Source Sans 3",
body: "Source Serif 4",
description: "Adobe's open-source pair. Clean, highly readable, and well-hinted for both screen and print."
),
"friendly-weather": (
heading: "Fira Sans",
body: "Merriweather",
description: "Open, friendly sans plus a space-efficient modern serif. Good for text-heavy documents."
),
"android": (
heading: "Roboto",
body: "Roboto Serif",
description: "A complete Android-friendly look. Roboto is extremely common; Roboto Serif is its matching new serif companion."
),
"kindle": (
heading: "Amazon Ember",
body: "Bookerly",
description: "The Kindle pairing. Bookerly is a warm, book-like serif; Amazon Ember is a clean, readable sans."
),
"office": (
heading: "Calibri",
body: "Cambria",
description: "A classic Microsoft Office pairing. Calibri (sans) for headings, Cambria (serif) for body text."
),
"modern-heritage": (
heading: "Montserrat",
body: "Georgia Pro",
description: "Merges the warm, traditional forms of Georgia Pro with Montserrat’s clean, geometric lines. A modern-yet-classic pairing, equally suited to formal reports or stylish web layouts."
),
"legible": (
heading: "Lexend",
body: "Literata",
description: "An ultra-legible pairing designed for reading fluency. Lexend’s tall x-height and open shapes reduce visual stress, while Literata brings a warm, bookish feel to body text."
),
)
Binary file not shown.

After

Width:  |  Height:  |  Size: 994 KiB

+23
View File
@@ -0,0 +1,23 @@
#import "/lib.typ": *
#set page(margin: 1em, height: auto, width: 5.5in)
#set par(justify: true, linebreaks: "optimized")
#let keys = font-pairings.keys().sorted()
#for key in keys {
block(
stroke: 1pt + navy,
inset: 1em,
radius: 1em,
[
#let pairing = font-pairings.at(key)
#show heading: set text(font: pairing.heading, weight: "bold")
= #pairing.heading & #pairing.body #h(1fr) #text(fill: eastern, weight: "light", size: 0.8em, baseline: -3pt, ["#key"])
#set text(font: pairing.body, weight: "light")
#pairing.description
#lorem(20)
]
)
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 366 KiB

+10
View File
@@ -0,0 +1,10 @@
[package]
name = "tasteful-pairings"
version = "0.1.0"
entrypoint = "lib.typ"
authors = ["Stephen Waits <steve@waits.net>"]
license = "MIT"
description = "A carefully curated collection of font pairings."
keywords = ["font", "pairing", "typography"]
repository = "https://github.com/swaits/typst-collection"
exclude = ["thumbnail.png", "tests"]