* otf ligature rendering support?
@ 2015-01-02 15:32 Yuri D'Elia
2015-01-02 15:45 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Yuri D'Elia @ 2015-01-02 15:32 UTC (permalink / raw)
To: help-gnu-emacs
Hi everyone,
I'm not fully aware of how much otf is supported in emacs, but I found a
good reason to want ligatures in a monospaced font:
http://www.fsd.it/fonts/pragmatapro/PragmataPro_Haskell_liga.png
PragmataPro supports ligatures for a good set of common operators. This
makes it much less troublesome than "prettify-symbols-mode" since
indentation/spacing is not changed.
How would I enable the proper GSUB feature in emacs? Are ligatures
supported at all?
I can specify otf parameters in `font-spec', but the following:
(set-fontset-font nil 'latin
(font-spec :family "PragmataPro"
:otf '(latn nil (liga))))
Doesn't really show any ligatures (or any other otf feature).
Am I doing something wrong?
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: otf ligature rendering support?
2015-01-02 15:32 otf ligature rendering support? Yuri D'Elia
@ 2015-01-02 15:45 ` Eli Zaretskii
2015-01-02 16:00 ` Yuri D'Elia
0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2015-01-02 15:45 UTC (permalink / raw)
To: help-gnu-emacs
> From: Yuri D'Elia <wavexx@thregr.org>
> Date: Fri, 02 Jan 2015 16:32:31 +0100
>
> I'm not fully aware of how much otf is supported in emacs, but I found a
> good reason to want ligatures in a monospaced font:
>
> http://www.fsd.it/fonts/pragmatapro/PragmataPro_Haskell_liga.png
>
> PragmataPro supports ligatures for a good set of common operators. This
> makes it much less troublesome than "prettify-symbols-mode" since
> indentation/spacing is not changed.
>
> How would I enable the proper GSUB feature in emacs? Are ligatures
> supported at all?
>
> I can specify otf parameters in `font-spec', but the following:
>
> (set-fontset-font nil 'latin
> (font-spec :family "PragmataPro"
> :otf '(latn nil (liga))))
>
> Doesn't really show any ligatures (or any other otf feature).
> Am I doing something wrong?
I think you need to define rules for composing characters into
ligatures, in order to have what you want.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: otf ligature rendering support?
2015-01-02 15:45 ` Eli Zaretskii
@ 2015-01-02 16:00 ` Yuri D'Elia
2015-01-02 16:07 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Yuri D'Elia @ 2015-01-02 16:00 UTC (permalink / raw)
To: help-gnu-emacs
On 01/02/2015 04:45 PM, Eli Zaretskii wrote:
>> PragmataPro supports ligatures for a good set of common operators. This
>> makes it much less troublesome than "prettify-symbols-mode" since
>> indentation/spacing is not changed.
>>
>> How would I enable the proper GSUB feature in emacs? Are ligatures
>> supported at all?
>>
>> I can specify otf parameters in `font-spec', but the following:
>>
>> (set-fontset-font nil 'latin
>> (font-spec :family "PragmataPro"
>> :otf '(latn nil (liga))))
>>
>> Doesn't really show any ligatures (or any other otf feature).
>> Am I doing something wrong?
>
> I think you need to define rules for composing characters into
> ligatures, in order to have what you want.
This is different than composition of unicode ligatures.
OTF ligatures are an inherent property of the font along with kerning
tables.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: otf ligature rendering support?
2015-01-02 16:00 ` Yuri D'Elia
@ 2015-01-02 16:07 ` Eli Zaretskii
2015-01-03 10:44 ` Yuri D'Elia
0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2015-01-02 16:07 UTC (permalink / raw)
To: help-gnu-emacs
> From: Yuri D'Elia <wavexx@thregr.org>
> Date: Fri, 02 Jan 2015 17:00:31 +0100
>
> > I think you need to define rules for composing characters into
> > ligatures, in order to have what you want.
>
> This is different than composition of unicode ligatures.
> OTF ligatures are an inherent property of the font along with kerning
> tables.
I'm probably missing something, and I'm certainly not an expert on OTF
fonts, in Emacs or elsewhere. But if what you want is display several
characters as a single glyph, the way to do that in Emacs is define
composition rules.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: otf ligature rendering support?
2015-01-02 16:07 ` Eli Zaretskii
@ 2015-01-03 10:44 ` Yuri D'Elia
2015-01-03 11:22 ` Eli Zaretskii
0 siblings, 1 reply; 6+ messages in thread
From: Yuri D'Elia @ 2015-01-03 10:44 UTC (permalink / raw)
To: help-gnu-emacs
On 01/02/2015 05:07 PM, Eli Zaretskii wrote:
>> From: Yuri D'Elia <wavexx@thregr.org>
>> Date: Fri, 02 Jan 2015 17:00:31 +0100
>>
>>> I think you need to define rules for composing characters into
>>> ligatures, in order to have what you want.
>>
>> This is different than composition of unicode ligatures.
>> OTF ligatures are an inherent property of the font along with kerning
>> tables.
>
> I'm probably missing something, and I'm certainly not an expert on OTF
> fonts, in Emacs or elsewhere. But if what you want is display several
> characters as a single glyph, the way to do that in Emacs is define
> composition rules.
Composition generates at most a sequence of precomposed utf code points,
such as æ. This is done at the client level and is font-agnostic.
OTF ligatures instead are glypt replacement tables which are provided
for a sequence of characters in the font itself. This is mostly needed
to improve the rendering for languages such as arabic.
The issue is that it needs special support in the client, since
previously drawn glypts might change as a result of typing.
I was under the impression that ligatures were supported by looking at
`fontset.el'.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: otf ligature rendering support?
2015-01-03 10:44 ` Yuri D'Elia
@ 2015-01-03 11:22 ` Eli Zaretskii
0 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2015-01-03 11:22 UTC (permalink / raw)
To: help-gnu-emacs
> From: Yuri D'Elia <wavexx@thregr.org>
> Date: Sat, 03 Jan 2015 11:44:25 +0100
>
> OTF ligatures instead are glypt replacement tables which are provided
> for a sequence of characters in the font itself. This is mostly needed
> to improve the rendering for languages such as arabic.
But then the OTF font driver should tell Emacs about this situation.
Is your Emacs compiled with libotf and libm17n-flt? That's how Emacs
supports Arabic and other complex scripts. Do you see Arabic ligature
shaping when Emacs displays Arabic text?
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-01-03 11:22 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-02 15:32 otf ligature rendering support? Yuri D'Elia
2015-01-02 15:45 ` Eli Zaretskii
2015-01-02 16:00 ` Yuri D'Elia
2015-01-02 16:07 ` Eli Zaretskii
2015-01-03 10:44 ` Yuri D'Elia
2015-01-03 11:22 ` Eli Zaretskii
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).