CTAN Comprehensive TeX Archive Network

Directory macros/luatex/latex/lua-font-config

README.md

# lua-font-config


Fast and simple opentype font configuration for Lua. Efficient auto-generation of font families providing easy access to the multiple shapes, weights, widths and features provided by many of today's fonts.

Engine callbacks, hooks and caching are used to eliminate pre-loading, reduce lookups and minimise pre-defining. This allows very rich font families to be quickly generated, with minimal user input and zero configuration files.

The core code consists of two Lua modules: one taken modified from Cont (MKIV) and one providing the interface and data processing.

Version 0.3 introduces ‘font sets’: multiple independent font configurations which may be enabled and disabled during typesetting. Non-default font sets are only configured when first used, so may be defined in the preamble with minimal overhead.

The package is experimental and, while already usable in many cases, lacks some features provided by fontspec.

Currently implemented:

  • configuration of the main document font families (roman, sans, typewriter);
  • use of these families in maths mode;
  • support for Unicode maths (via lua-unicode-math);
  • ‘font sets’ as described above;
  • creation of additional specialist families (text mode);
  • key-value or 'raw' features specifications for text fonts.

Missing features include:

  • automated support for multi-lingual typesetting;
  • UI support for variable fonts;
  • spot colours etc.;
  • a more complete key-value interface.

While I have tested the package, I can only do this on Arch Linux (locally) and Ubuntu (GitHub). Given how system-dependent Unicode font configuration is, I am very grateful to all those who provided feedback on version 0.1 and particularly welcome feedback on whether and how well it works elsewhere.


## Compatibility


The package requires Lua.

Font sets and Unicode maths support require lua-unicode-math, which is incompatible with unicode-math.


## Licence


Cont module

The file named lfc-context-font-syn.lua is a modified renamed copy of

filename: context-font-syn.lua author: Hans Hagen, PRAGMA-ADE, Hasselt NL copyright: PRAGMA ADE / Cont Development Team licence: GPL v2


### adaption

The following statement applies to all files except the Cont module.

Copyright (C) 2026 Clea F. Rees.

This work may be distributed and/or modified under the conditions of the Project Public License, either version 1.3c of this license or (at your option) any later version. The latest version of this license is in https://www.latex-project.org/lppl.txt and version 1.3c or later is part of all distributions of version 2008-05-04 or later.

This work has the LPPL maintenance status maintained'. The Current Maintainer of this work is Clea F. Rees.

This work consists of all files listed in manifest.txt.

lua-font-config.dtx and lua-font-config.ins use infrastructure derived from skeleton.ins and skeleton.dtx, both part of of version 2.4 of Scott Pakin's dtxtut. A copy of dtxtut including unmodified copies of skeleton.dtx and skeleton ins is available from https://www.ctan.org/pkg/dtxtut and released under the LPPL.

Other attributions are included in the source of the package itself.


Code Repositories

Code for the support package is hosted at

https://codeberg.org/cfr/nfssext
For convenience, the repository is mirrored at https://github.com/cfr42/nfssext

Contact Details

Bug reports, feature requests etc. concerning the support or packaging should be filed at https://codeberg.org/cfr/nfssext/issues

Clea F. Rees Version 0.3 2026-11-24


Download the contents of this package in one zip archive (934.3k).

Lua-font-config – Lua-based OpenType font configuration for Lua

Fast and simple OpenType font configuration for Lua. Efficient auto-generation of font families providing easy access to the multiple shapes, weights, widths and features provided by many of today’s fonts. Engine callbacks, hooks and caching are used to eliminate pre-loading, reduce lookups and minimise pre-defining. This allows very rich font families to be quickly generated, with minimal user input and zero configuration files. Font sets support the use of multiple font configurations (text and math modes), and delayed setup of non-default sets minimises overhead.

The core code consists of two Lua modules: one taken as-is from Cont (MkIV) and one providing the interface and data processing.

The package is experimental and, while already usable in many cases, currently provides only a small part of fontspec’s functionality. Implemented features include configuration of the main document font families (roman, sans, typewriter), use of these families in maths mode, creation of additional families (text mode), support for Unicode maths (via lua-unicode-math) and font sets. Missing features include support for automated multilingual typesetting, an interface for variable fonts, spot colours etc. and a more extensive and intuitive user interface.

PackageLua-font-config
Bug tracker
Repository
Version0.3
LicensesThe Project Public License 1.3c
GNU General Public License, version 2
Copyright2026 Clea F. Rees
MaintainerClea F. Rees
Contained inTeX Live as lua-font-config
TopicsFont management
Font selection
Lua
Font use
...
Guest Book Sitemap Contact Contact Author