Compare commits

..
16 changed files with 176 additions and 16 deletions

No files matched your search

+3
View File
@@ -17,6 +17,9 @@ links below to their main page.
into everyday docs.
- [**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
+2 -6
View File
@@ -10,7 +10,7 @@ Pretty simple. Import `codly`. Initialize it. Import `codly-languages`.
Configure `codly` with the languages. Like this:
```typst
#import "@preview/codly:1.1.1": *
#import "@preview/codly:1.1.0": *
#show: codly-init
#import "@preview/codly-languages:0.1.3": *
@@ -50,6 +50,7 @@ The following languages are still missing. All contributions welcome.
- Jinja2
- Jsonnet
- Lean
- Lisp
- LiveScript
- Makefile
- MediaWiki
@@ -92,11 +93,6 @@ The following languages are still missing. All contributions welcome.
The `typst-small.png` icon included in this package came from the MIT-licensed
[codly](https://github.com/Dherse/codly) project.
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.
All other icons included here came from the MIT-licensed
[devicon](https://github.com/devicons/devicon/) project.
-6
View File
@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg version="1.1" viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg">
<circle cx="256" cy="256" r="235" fill="#fff"/>
<path stroke="#000" stroke-width="5" d="m255.56 20.008c-62.374 0.1169-122.17 24.922-166.3 68.992-92.236 92.091-92.353 241.52-0.2617 333.75 92.09 92.236 241.52 92.353 333.75 0.262 92.236-92.091 92.353-241.52 0.262-333.75-44.377-44.447-104.64-69.371-167.45-69.254zm2.281 1.0059c59.934 0.4846 119.39 23.809 164.46 68.953 91.701 91.845 91.585 240.64-0.259 332.34-45.922 45.851-120.32 45.793-166.17-0.129-45.851-45.922-45.793-120.32 0.129-166.17 46.412-46.339 46.471-121.53 0.13-167.94-37.084-37.141-94.457-46.553-140.66-21.658 42.416-31.541 92.711-45.798 142.37-45.396zm-190.84 130.26h40c9.943 42.147 25.204 79.418 40.75 116.43 15.9-41.326 33.203-81.249 55.25-116.43h40c-48.928 97.364-102.19 164.06-24 250h-40c-47.567-77.243-82.439-147.67-112-250z"/>
<path d="m293 110.72c78.194 85.936 24.928 152.64-24 250h40c22.047-35.179 39.35-75.102 55.25-116.43 15.546 37.01 30.807 74.282 40.75 116.43h40c-29.561-102.33-64.433-172.76-112-250z"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

+1 -2
View File
@@ -4,7 +4,7 @@
// To use:
//
// ```typst
// #import "@preview/codly:1.1.1": *
// #import "@preview/codly:1.1.0": *
// #show: codly-init
//
// #import "codly-languages.typ": *
@@ -80,7 +80,6 @@
kt: (name: "Kotlin", color: rgb("#5e3cc2"), icon: __icon("kotlin.svg")),
latex: (name: "LaTeX", color: rgb("#000000"), icon: __icon("latex.svg")),
less: (name: "Less", color: rgb("#2a4d80"), icon: __icon("less.svg")),
lisp: (name: "Lisp", color: rgb("#3FBF3F"), icon: __icon("lisp.svg")),
lua: (name: "Lua", color: rgb("#000080"), icon: __icon("lua.svg")),
markdown: (name: "Markdown", color: rgb("#000000"), icon: __icon("markdown.svg")),
matlab: (name: "Matlab", color: rgb("#4499dd"), icon: __icon("matlab.svg")),
+1 -1
View File
@@ -1,5 +1,5 @@
#import "/lib.typ": *
#import "@preview/codly:1.1.1": *
#import "@preview/codly:1.1.0": *
#show: codly-init
#codly(languages: codly-languages)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 76 KiB

@@ -42,7 +42,6 @@
"kotlin",
"latex",
"less",
"lisp",
"lua",
"markdown",
"matlab",
+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"]