ref: ed1bc8ca641b403e923cd78719d0e9c130569b26
parent: 75b1240331499e4420bb1a0ae124268f037d0cef
author: Ali Gholami Rudi <ali@rudi.ir>
date: Wed Jan 21 03:35:23 EST 2015
trfn: specify similar glyphs in alts array
--- a/trfn.c
+++ b/trfn.c
@@ -220,8 +220,8 @@
static void trfn_lig(char *c)
{int i;
- for (i = 0; i < LEN(ligs_exceptions); i++)
- if (!strcmp(ligs_exceptions[i], c))
+ for (i = 0; i < LEN(agl_exceptions); i++)
+ if (!strcmp(agl_exceptions[i][1], c))
return;
if (c[0] && c[1] && strlen(c) > utf8len((unsigned char) c[0])) {sprintf(strchr(trfn_ligs, '\0'), "%s ", c);
--- a/trfn_ch.h
+++ b/trfn_ch.h
@@ -7,20 +7,11 @@
{"ffl", "ffl"}, {"st", "st"},};
-/* these are not ligatures */
-static char *ligs_exceptions[] = {- "ga", "aq", "ti", "ha",
-};
/* AGL exceptions */
static char *agl_exceptions[][2] = {- {"Δ", "∆"}, /* Delta -> Delatagreek */- {"Ω", "Ω"}, /* Omega -> Omegagreek */- {"µ", "μ"}, /* mu -> mugreek */- {"‘", "`"}, /* quoteleft */- {"`", "ga"}, /* grave */- {"’", "'"}, /* quoteright */- {"'", "aq"}, /* quotesingle */+ {"`", "ga"}, /* grave; using quoteleft for ` */+ {"'", "aq"}, /* quotesingle; using quoteright for ' */ {"~", "ti"}, /* asciitilde; using tilde for ~ */ {"^", "ha"}, /* asciicircum; using circumflex for ^ */};
@@ -27,7 +18,7 @@
/* troff aliases */
static char *alts[][8] = {- {"'", "cq"},+ {"’", "'", "cq"}, {"+", "pl"}, {"-", "hy"}, {"/", "sl"},@@ -35,8 +26,7 @@
{"\"", "dq"}, {"\\", "bs", "rs"}, {"_", "ru", "ul"},- {"`", "oq"},- {"aq"},+ {"‘", "`", "oq"}, {"|", "or"}, {"¡", "!!", "r!"}, {"¢", "c|", "ct"},@@ -54,7 +44,6 @@
{"±", "+-"}, {"²", "2^"}, {"³", "3^"},- {"µ", "/u"}, {"¶", "P!", "pg"}, {"·", ".^"}, {"¹", "1^"},@@ -185,7 +174,7 @@
{"Φ", "*F"}, {"Χ", "*X"}, {"Ψ", "*Q"},- {"Ω", "*W"},+ {"Ω", "*W", "Ω"}, {"Ω", "Ω", "*W"}, {"α", "*a"}, {"β", "*b"}, {"γ", "*g"},@@ -197,7 +186,7 @@
{"ι", "*i"}, {"κ", "*k"}, {"λ", "*l"},- {"μ", "*m"},+ {"μ", "*m", "µ", "/u"}, {"µ", "/u", "*m", "μ"}, {"ν", "*n"}, {"ξ", "*c"}, {"ο", "*o"},@@ -239,7 +228,7 @@
{"∂", "pd"}, {"∃", "te"}, {"∅", "es"},- {"∆", "*D"},+ {"∆", "*D", "Δ"}, {"Δ", "∆", "*D"}, {"∇", "gr"}, {"∈", "mo"}, {"∉", "!m"},@@ -305,7 +294,7 @@
{"", "lt"}, {"", "lk"}, {"", "lb"},- {"", "bv", "|",},+ {"", "bv", "|"}, {"⎧", "lt"}, {"⎨", "lk"}, {"⎩", "lb"},--
⑨