I'm using Emacs 28 (HEAD) on Debian Stable, compiled with HARFBUZZ
and cairo
(if that's important).
I'm trying to enable opentype features on the Pragmata Pro font (as shown here).
(font-spec :family "Iosevka Term SS10" :size 16 :otf '(latn nil nil (dlig))
(font-spec :family "Iosevka Term" :size 16 :otf '(latn nil nil (dlig))
I've tried both of these, with no difference. Emacs does not show me any errors but the extra ligatures don't work.
Documentation:
font-spec is a function defined in font.c.
Signature
(font-spec ARGS...)
Documentation
Return a newly created font-spec with arguments as properties.
ARGS must come in pairs KEY VALUE of font properties. KEY must be a
valid font property name listed below:
:family, :weight, :slant, :width
They are the same as face attributes of the same name. See
set-face-attribute.
:foundry
VALUE must be a string or a symbol specifying the font foundry, e.g. misc.
:adstyle
VALUE must be a string or a symbol specifying the additional
typographic style information of a font, e.g. sans.
:registry
VALUE must be a string or a symbol specifying the charset registry and
encoding of a font, e.g. iso8859-1.
:size
VALUE must be a non-negative integer or a floating point number
specifying the font size. It specifies the font size in pixels (if
VALUE is an integer), or in points (if VALUE is a float).
:name
VALUE must be a string of XLFD-style or fontconfig-style font name.
:script
VALUE must be a symbol representing a script that the font must
support. It may be a symbol representing a subgroup of a script
listed in the variable script-representative-chars.
:lang
VALUE must be a symbol whose name is a two-letter ISO-639 language
name, e.g. ja. The value is matched against the "Additional Style"
field of the XLFD spec of a font, if it's non-empty, on X, and
against the codepages supported by the font on w32.
:otf
VALUE must be a list (SCRIPT-TAG LANGSYS-TAG GSUB [ GPOS ]) to specify
required OpenType features.
SCRIPT-TAG: OpenType script tag symbol (e.g. deva).
LANGSYS-TAG: OpenType language system tag symbol,
or nil for the default language system.
GSUB: List of OpenType GSUB feature tag symbols, or nil if none required.
GPOS: List of OpenType GPOS feature tag symbols, or nil if none required.
GSUB and GPOS may contain nil elements. In such a case, the font
must not have any of the remaining elements.
For instance, if the VALUE is (thai nil nil (mark)), the font must
be an OpenType font whose GPOS table of thai script's default
language system must contain mark feature.
I have tried to use GPOS / GSUB independently. Using GPOS gives me this error on startup:
Error in private config: config.el, (error invalid font property :otf latn nil dlig (nil))
Any help is appreciated!