Function Signature
Description
Filters and returns all font pairings where the heading font matches the specified category. This is useful when you want to enforce a specific typographic style for headings, such as all serif headings for a traditional look or sans-serif for modern designs. The function filters based on theheadingCategory property, not the body font category.
Parameters
The font category to filter by. Must be one of:
"serif"- Traditional fonts with decorative strokes (e.g., Libre Baskerville, Merriweather)"sans-serif"- Modern fonts without decorative strokes (e.g., Outfit, Schibsted Grotesk)"monospace"- Fixed-width fonts for code and technical content (e.g., IBM Plex Mono, Fira Code)
Return Value
An array of font pairings where the heading font belongs to the specified category. Returns an empty array if no pairings match.Each
PairingData object contains:Usage Examples
Example Response
Notes
Heading Category Only: This function filters by
headingCategory, not bodyCategory. The body font may be in a different category, which often creates interesting typographic contrast.Performance: This function filters the entire pairings array on each call. Consider caching results if calling repeatedly with the same category.
Common Patterns
Serif Headings
Serif heading fonts create a traditional, authoritative, or editorial feel. Common for:- News and magazine sites
- Academic publications
- Literary content
- Traditional brands
Sans-serif Headings
Sans-serif heading fonts create a modern, clean, minimal feel. Common for:- Tech startups
- SaaS products
- Modern agencies
- Portfolio sites
Monospace Headings
Monospace heading fonts create a technical, code-focused feel. Common for:- Developer tools
- Technical documentation
- Code-heavy sites
- Retro/terminal aesthetics
Related Functions
getAllPairings- Get all available pairingsgetPairing- Get a specific pairing by namegetPairingsByMood- Filter by mood tag