aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2020-05-23 10:59:39 +0300
committerEli Zaretskii2020-05-23 10:59:39 +0300
commitfb2e34cd2155cbaaf945d8cd167b600b55b9edff (patch)
tree2f245d37d7c1d065849e193c57b8953ad01a845c
parent13b6dfd4f767a6ce2b01a519fe412dbf80f4921e (diff)
downloademacs-fb2e34cd2155cbaaf945d8cd167b600b55b9edff.tar.gz
emacs-fb2e34cd2155cbaaf945d8cd167b600b55b9edff.zip
; * etc/TODO (Ligatures): Update the entry based on recent discussions.
-rw-r--r--etc/TODO33
1 files changed, 25 insertions, 8 deletions
diff --git a/etc/TODO b/etc/TODO
index f983fa27d33..c11848e0c5d 100644
--- a/etc/TODO
+++ b/etc/TODO
@@ -220,10 +220,23 @@ https://lists.gnu.org/r/emacs-devel/2013-11/msg00515.html
220 width fonts. However, more features are still needed to achieve this. 220 width fonts. However, more features are still needed to achieve this.
221 221
222** Support ligatures out of the box 222** Support ligatures out of the box
223For the list of typographical ligatures, see 223For the list of frequently-used typographical ligatures, see
224 224
225 https://en.wikipedia.org/wiki/Orthographic_ligature#Ligatures_in_Unicode_(Latin_alphabets) 225 https://en.wikipedia.org/wiki/Orthographic_ligature#Ligatures_in_Unicode_(Latin_alphabets)
226 226
227(Note that in general, the number of possible ligatures can be much
228larger, and there's no way, in principle, to specify the superset of
229all the ligatures that could exist. Each font can support different
230ligatures. The reliable way of supporting any and all ligatures is to
231hand all text to be displayed to the shaping engine and get back the
232font glyphs to display that text. However, doing this is impossible
233with the current design of the Emacs display engine, since it examines
234buffer text one character at a time, and implements character
235composition by calls to Lisp, which makes doing this for every
236character impractically slow. therefore, the rest of this item
237describes a limited form of ligature support which is compatible with
238the current display engine design and uses automatic compositions.)
239
227For Text and derived modes, the job is to figure out which ligatures 240For Text and derived modes, the job is to figure out which ligatures
228we want to support, how to let the user customize that, and probably 241we want to support, how to let the user customize that, and probably
229define a minor mode for automatic ligation (as some contexts might not 242define a minor mode for automatic ligation (as some contexts might not
@@ -237,12 +250,12 @@ prettify-symbols-mode. We need to figure out which ligatures are
237needed for each programming language, and provide user options to turn 250needed for each programming language, and provide user options to turn
238this on and off. 251this on and off.
239 252
240The implementation should use the infrastructure for character 253The implementation should use the infrastructure for automatic
241compositions, i.e., we should define appropriate regexp-based rules 254character compositions, i.e., we should define appropriate
242for character sequences that need to be composed into ligatures, and 255regexp-based rules for character sequences that need to be composed
243populate composition-function-table with those rules. See 256into ligatures, and populate composition-function-table with those
244composite.el for examples of this, and also grep lisp/language/*.el 257rules. See composite.el for examples of this, and also grep
245for references to composition-function-table. 258lisp/language/*.el for references to composition-function-table.
246 259
247One problem with character compositions that will need to be solved is 260One problem with character compositions that will need to be solved is
248that composition-function-table, the char-table which holds the 261that composition-function-table, the char-table which holds the
@@ -259,7 +272,11 @@ way of preventing the ligation from happening. One possibility is to
259have a ZWNJ character separate these ASCII characters; another 272have a ZWNJ character separate these ASCII characters; another
260possibility is to introduce a special text property that prevents 273possibility is to introduce a special text property that prevents
261character composition, and place that property on the relevant parts 274character composition, and place that property on the relevant parts
262of the mode line. 275of the mode line. Yet another possibility would be to write a
276specialized composition function, which would detect that it is called
277on mode-line strings, and return nil to signal that composition is not
278possible in this case; then use that function in the rules for
279ligatures stored in composition-function-table.
263 280
264The prettify-symbols-mode should be deprecated once ligature support 281The prettify-symbols-mode should be deprecated once ligature support
265is in place. 282is in place.