From: handa@gnu.org (K. Handa)
To: Yuri D'Elia <wavexx@thregr.org>
Cc: emacs-devel@gnu.org
Subject: Re: otf ligature rendering support?
Date: Sun, 04 Jan 2015 00:16:55 +0900 [thread overview]
Message-ID: <87egrb3ndk.fsf@gnu.org> (raw)
In-Reply-To: <m86d9m$1ii$1@ger.gmane.org> (message from Yuri D'Elia on Fri, 02 Jan 2015 16:25:42 +0100)
[-- Attachment #1: Type: text/plain, Size: 1584 bytes --]
In article <m86d9m$1ii$1@ger.gmane.org>, Yuri D'Elia <wavexx@thregr.org> writes:
> 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?
Currently, Emacs can not control which OTF features to
apply. Emacs leaves it to font drivers on eash platform. I
actually tried to give Emacs such facility, and src/font.c
contains not-yet-finished code within "#if 0" and "#endif".
I want to finish the code, but I'm not sure I can work on it
soon.
> 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).
The above just tells Emacs to select such an OTF font that
has `liga' GPOS feature for `latn' script.
By the way, if you are running Emacs on X with libm17n-flt
and libotf libraries, you can override the default behavior
of those libraries by putting the attached two files under
~/.m17n.d/. It assumes that the family name of PragmataPro
font is "PragmataPro". If that is not the case, please
replace "PragmataPro" in generic.fst with a proper family
name.
---
K. Handa
handa@gnu.org
[-- Attachment #2: generic.fst --]
[-- Type: application/octet-stream, Size: 3825 bytes --]
;; generic.fst -- Fontset mainly using generic font specs.
;; Copyright (C) 2005, 2006, 2007, 2010 AIST (H15PRO112)
;; See the end for copying conditions.
;;; <li> generic.fst
;;;
;;; Fontset mainly using generic font specifications. See the
;;; documentation of the fontset "default" for the information about
;;; each font.
(latin
(vi
((nil PragmataPro unicode-bmp) combining)
((nil nil unicode-bmp :lang=vi)))
(nil
((nil PragmataPro unicode-bmp) combining)
((nil nil unicode-bmp :script=latin))))
(hebrew
(nil
((nil nil unicode-bmp :otf=hebr) hebr-otf)
((nil nil unicode-bmp :script=hebrew))))
(arabic
(nil
((nil nil unicode-bmp :otf=arab=init,medi,fina,liga+mark) arab-otf)
((nil nil unicode-bmp :otf=arab=init,medi,fina,liga+~mark) arab-otf-no-gpos)
((nil nil unicode-bmp :script=arabic) arab)))
(syriac
(nil
((nil nil unicode-bmp :otf=syrc) syrc-otf)))
(thaana
(nil
((nil nil unicode-bmp :otf=thaa) thaa-otf)
((nil nil unicode-bmp :script=thaana))))
(devanagari
(nil
((nil nil unicode-bmp :otf=dev2) dev2-otf)
((nil nil unicode-bmp :otf=deva) deva-otf)))
(bengali
(nil
((nil nil unicode-bmp :otf=bng2) bng2-otf)
((nil nil unicode-bmp :otf=beng) beng-otf)))
(gurmukhi
(nil
((nil nil unicode-bmp :otf=gur2) gur2-otf)
((nil nil unicode-bmp :otf=guru) guru-otf)))
(gujarati
(nil
((nil nil unicode-bmp :otf=gjr2) gjr2-otf)
((nil nil unicode-bmp :otf=gujr) gujr-otf)))
(oriya
(nil
((nil nil unicode-bmp :otf=ory2) ory2-otf)
((nil nil unicode-bmp :otf=orya) orya-otf)))
(tamil
(nil
((nil nil unicode-bmp :otf=tml2) tml2-otf)
((nil nil unicode-bmp :otf=taml) taml-otf)))
(telugu
(nil
((nil nil unicode-bmp :otf=tel2) tel2-otf)
((nil nil unicode-bmp :otf=telu) telu-otf)))
(kannada
(nil
((nil nil unicode-bmp :otf=knd2) knd2-otf)
((nil nil unicode-bmp :otf=knda) knda-otf)))
(malayalam
(nil
((nil nil unicode-bmp :otf=mlm2) mlm2-otf)
((nil nil unicode-bmp :otf=mlym) mlym-otf)))
(sinhala
(nil
((nil nil unicode-bmp :otf=sinh) sinh-otf)))
(tibetan
(nil
((nil nil unicode-bmp :otf=tibt) tibt-otf)))
(thai
(nil
((nil nil unicode-bmp :otf=thai) thai-otf)
((nil nil unicode-bmp :script=thai) thai-generic)))
(lao
(nil
((nil nil unicode-bmp :otf=laoo) laoo-otf)
((nil nil unicode-bmp :script=lao) laoo-generic)))
(myanmar
(nil
((nil padauk unicode-bmp) mymr-sil)))
(khmer
(nil
((nil nil unicode-bmp :otf=khmr) khmr-otf)))
(han
(zh
((nil nil unicode-bmp :lang=zh)))
(ja
((nil nil unicode-bmp :lang=ja)))
(ko
((nil nil unicode-bmp :lang=ko))))
(hiragana
(nil
((nil nil unicode-bmp :lang=ja))))
(katakana
(nil
((nil nil unicode-bmp :lang=ja))))
(hangul
(nil
((nil nil unicode-bmp :lang=ko))))
(cham
(nil
((nil nil unicode-bmp :script=cham) cham-generic)))
(nil
((nil nil unicode-bmp)))
;; Copyright (C) 2003, 2004, 2007, 2010
;; National Institute of Advanced Industrial Science and Technology (AIST)
;; Registration Number H15PRO112
;; This file is part of the m17n database; a sub-part of the m17n
;; library.
;; The m17n library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public License
;; as published by the Free Software Foundation; either version 2.1 of
;; the License, or (at your option) any later version.
;; The m17n library is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;; Lesser General Public License for more details.
;; You should have received a copy of the GNU Lesser General Public
;; License along with the m17n library; if not, write to the Free
;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;; Local Variables:
;; mode: lisp
;; End:
[-- Attachment #3: COMBINING.flt --]
[-- Type: application/octet-stream, Size: 2131 bytes --]
;; COMBINING.flt -- Font Layout Table for combining diacritical marks
;; Copyright (C) 2007 AIST (H15PRO112)
;; See the end for copying conditions.
(font layouter combining nil)
;;; <li> COMBINING.flt
;;;
;;; For combining diacritical marsk (U+0300..U+036F).
(category
;; The contents is build up by the m17n-lib.
)
(generator
(0
(cond
("(u)([a-t]+)"
(cond
((font-facility :otf=DFLT=liga) < :otf=DFLT=liga >)
((font-facility :otf=DFLT+mark) < :otf=DFLT+mark,mkmk >)
(".*"
< = ; combining class
(cond ("a" Bc.Bc =) ; < 200
("b" bl.tc =) ; 200
("c" bc.tc =) ; 202
("d" br.tc =) ; 204
("e" Bl.Br =) ; 208
("f" Br.Bl =) ; 210
("g" tl.bc =) ; 212
("h" tc.bc =) ; 214
("i" tr.bc =) ; 216
("j" bl.tc =) ; 218
("k" bc-tc =) ; 220
("l" br-tc =) ; 222
("m" Bl.Br =) ; 224
("n" Br.Bl =) ; 226
("o" tl+bc =) ; 228
("p" tc+bc =) ; 230
("q" tr+bc =) ; 232
("r" br-tr =) ; 233
("s" tr+br =) ; 234
("t" bc-tc =)) ; 240
* >)))
("[a-t]" [ = ])
("." =))
*))
;; Copyright (C) 2007
;; National Institute of Advanced Industrial Science and Technology (AIST)
;; Registration Number H15PRO112
;; This file is part of the m17n database; a sub-part of the m17n
;; library.
;; The m17n library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public License
;; as published by the Free Software Foundation; either version 2.1 of
;; the License, or (at your option) any later version.
;; The m17n library is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;; Lesser General Public License for more details.
;; You should have received a copy of the GNU Lesser General Public
;; License along with the m17n library; if not, write to the Free
;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.
;; Local Variables:
;; mode: emacs-lisp
;; End:
next prev parent reply other threads:[~2015-01-03 15:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-02 15:25 otf ligature rendering support? Yuri D'Elia
2015-01-03 15:16 ` K. Handa [this message]
2015-01-03 16:38 ` Yuri D'Elia
2015-08-17 1:04 ` YAMAMOTO Mitsuharu
2015-08-17 4:17 ` Stefan Monnier
-- strict thread matches above, loose matches on Subject: below --
2015-01-02 15:32 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87egrb3ndk.fsf@gnu.org \
--to=handa@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=wavexx@thregr.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.