The history of luaTEX 2006–2009 / v 0.50 - Pragma ADE
The history of luaTEX 2006–2009 / v 0.50 - Pragma ADE The history of luaTEX 2006–2009 / v 0.50 - Pragma ADE
َ غْتَرِفٌُم عْتَرِفٍُم جْدِهٖ،َم نِْم لِسَِب َ ِ ً لَخ لاۤئِهٰٖا ِ ةََك وْ نَُك انََی سَْج ْ غْتَرِفٌُم عْتَرِفٍُم جْدِهٖ،َم نِْم لِسَِب َ ِ ً َ لَخ لاۤئِهٰٖا َ ةََك وْ نَُك َ ْ انََی سَْج َ ِ َ One script can serve multiple languages so let's see what happens when we switch to Urdu. analyze=yes, ccmp=yes, clig=yes, curs=yes, dlig=yes, features=yes, fina=yes, init=yes, isol=yes, kern=yes, language=urd, liga=yes, mark=yes, medi=yes, mkmk=yes, mode=node, rlig=yes, script=arab ِ ِهلل اَل ُدْمَ ْح ِهلل َْحم َد ٖ، ن َاشرا؛ ا ْيِ َذل َوالأْ ْر َواحَ َوالأْ اَل ُدْمَ ْح ِهلل َْحم َد ن َاشرا؛ ا ْيِ َذل َوالأْ ْر َواحَ َوالأْ ِبح ال ْموَ َتْ َواذلكْرَ ِبح ال ْموَ َتْ َواذلكْرَ هِدْمَ َوال وةَ،ٰیَ ْح َوالنس َوال رْیَ ْخ ِبحارَِ َوالن َعْ ف َوالشر انِ َوالضر الثن ِءۤ َا َشاكِرً ا، َوالس َوحُسِْل َوال ْحرَ ِن ، ، ، . ،ٖ َ َق امَ، هِدْمَ َوال وةَ،ٰیَ ْح َوالنس َوال رْیَ ْخ ِبحارَِ َوالن َعْ ف َوالشر انِ َوالضر الثن ِءۤ َا َشاكِرً ا، َوالس َوحُسِْل َوال ْحرَ ِن ، ، ، . َ َق امَ، In practice one will enable most of the features. In MkIV one can dene feature sets as follows: \definefontfeature [arab-default] [mode=node,language=dflt,script=arab, init=yes,medi=yes,fina=yes,isol=yes, liga=yes,dlig=yes,rlig=yes,clig=yes, mark=yes,mkmk=yes,kern=yes,curs=yes] Applying these features to fonts can be done in several ways, with as most basic one: \font\ArabFont=arabtype*arab-default at 18pt Normally one will do something like \definefont[ArabFont][arabtype*arab-default at 18pt] or use typescripts to set up ap proper font collection, in which case we end up with definitions that look like: 104 Arabic
ِ ً غْتَرِفٌُم عْتَرِفٍُم جْدِهٖ،َم نِْم لِسَِب لاۤئِهٰٖا لَخ ِ َ َ وْ نَُك َ َ ةََك ْ سَْج ِ ً انََی غْتَرِفٌُم عْتَرِفٍُم جْدِهٖ،َم نِْم لِسَِب لاۤئِهٰٖا لَخ ِ َ َ وْ نَُك َ َ ةََك انََی ْ سَْج عْترَُم لحَْ مْ دُ َِا نِْم َ قََل لذِ يَْا ا؛ً ِ شرَ لائِهٰٖا لحِ ُسْ نَِو لِاسَِب \definefontsynonym[ArabType][name:arabtype][features=arab-default] \definefontsynonym[Serif][ArabType] More information about typescripts can be found in manuals and on the ConTEXt wiki. We end this chapter with showing two arabic fonts so that you can get a taste if the differences: arabtype by MicroSoft and Palatino which is designed by Herman Zapf for Linotype. analyze=yes, ccmp=yes, clig=yes, curs=yes, dlig=yes, features=yes, fina=yes, init=yes, isol=yes, kern=yes, language=dflt, liga=yes, mark=yes, medi=yes, mkmk=yes, mode=node, rlig=yes, script=arab ِ ِهلل اَل ُدْمَ ْح ِهلل َْحم َد ٖ، ن َاشرا؛ ا ْيِ َذل َوالأْ ْر َواحَ َوالأْ اَل ُدْمَ ْح ِهلل َْحم َد ن َاشرا؛ ا ْيِ َذل َوالأْ ْر َواحَ َوالأْ ِبح ال ْموَ َواذلكْرَ ِبح ال ْموَ َواذلكْرَ ِبحارَِ َوالشر انِ َوالضر الثن ِءۤ َا َشاكِرً ا، َوالس َوحُسِْل َوال ْحرَ ِن ، ، ، امَ، َتْ َ َق هِدْمَ َوال وةَ،ٰیَ ْح َوالنس َوال رْیَ ْخ ِبحارَِ َوالشر َوالن َعْ ف انِ َوالضر الثن ِءۤ َا َشاكِرً ا، َوالس َوحُسِْل َوال ْحرَ ِن ، ، ، . ،ٖ امَ، َتْ َ َق هِدْمَ َوال وةَ،ٰیَ ْح َوالنس َوالن َعْ ف َوال رْیَ ْخ . analyze=yes, ccmp=yes, clig=yes, curs=yes, dlig=yes, features=yes, fina=yes, init=yes, isol=yes, kern=yes, language=dflt, liga=yes, mark=yes, medi=yes, mkmk=yes, mode=node, rlig=yes, script=arab ِ ِ ِ ٍف ِء الث انَ َْحمِ ِاً َْمج ِبحارَِ ٌفِ ترْغُ ٖه، م ِدْمَ ِبح َد َخ ٖه، ِد الْمَ وْ تَ ِن ، َ Arabic 105
- Page 56 and 57: function tex.printlist(data) callba
- Page 58 and 59: 56 Token speak
- Page 60 and 61: Interesting is that upto now I didn
- Page 62 and 63: do end local function nextbyte(f) r
- Page 64 and 65: \ctxlua{collectgarbage("setstepmul"
- Page 66 and 67: Collecting tokens can take place in
- Page 68 and 69: where TEX has to convert to and fro
- Page 70 and 71: When experimenting with the new imp
- Page 72 and 73: It will be clear that here we colle
- Page 74 and 75: 72 Nodes and attributes t={ attr={
- Page 76 and 77: Let's end with an observation. Attr
- Page 78 and 79: end end tex.sprint("\\setbox0=\\hbo
- Page 80 and 81: 78 Dirty tricks
- Page 82 and 83: Those who read the previous chapter
- Page 84 and 85: In a similar way support for xml wi
- Page 86 and 87: Undoubtely this will have a huge im
- Page 88 and 89: 86 Going beta
- Page 90 and 91: We like testing LuaTEX's open type
- Page 92 and 93: k a el--rie am, ld p n th re, l ak
- Page 94 and 95: his or her font). As said, it also
- Page 96 and 97: ["tag"]="calt", } }, ["name"]="ks_l
- Page 98 and 99: When testing the implementation we
- Page 100 and 101: Mr. rmn p Of course we have to test
- Page 102 and 103: ه مَ ه لِ دْ
- Page 104 and 105: لاۤئِهٰٖا لاۤئِه
- Page 108 and 109: وَْر وةَ، ٰ ي كَ
- Page 110 and 111: white black t-green a=1.000 t=0.500
- Page 112 and 113: Palets work with names: \definepale
- Page 114 and 115: • support mechanism are under con
- Page 116 and 117: So, effectively we set a box, and e
- Page 118 and 119: 116 Colors redone
- Page 120 and 121: • Spaces at the end of the line (
- Page 122 and 123: 兡 也 包 因 沘 氓 侷 柵 苗
- Page 124 and 125: 〉 + 々 = 〉々 〉々 〉々
- Page 126 and 127: 124 Chinese, Japanese and Korean, a
- Page 128 and 129: for k, v in pairs(_G) do print(k, v
- Page 130 and 131: } [4] = 200 I mistakingly assumed t
- Page 132 and 133: 130 Optimization
- Page 134 and 135: xetex metapost We can also
- Page 136 and 137: \startluacode xml.sprint(xml.first(
- Page 138 and 139: a[position()=5] maybe a[first()] ma
- Page 140 and 141: Now we have: okay okay okay Repla
- Page 142 and 143: \startxmlsetups xml:mysetups \xmlse
- Page 144 and 145: c1d1 c2d2 d3 d4 d5 Here com
- Page 146 and 147: c2 d3 b/c[1] c1 c2 a/c[1] d3 a/c[-1
- Page 148 and 149: The code in traditional TEX that de
- Page 150 and 151: and this is where MkIV hooks in ist
- Page 152 and 153: con-text == [c][o](pre=n-,post=,rep
- Page 154 and 155: luastate_bytes min:37009927, max:87
َ<br />
غْتَرِفٌُم عْتَرِفٍُم<br />
جْدِهٖ،َم نِْم لِسَِب<br />
َ<br />
<br />
ِ <br />
ً<br />
لَخ لاۤئِهٰٖا ِ<br />
ةََك وْ نَُك<br />
انََی سَْج ْ<br />
غْتَرِفٌُم عْتَرِفٍُم<br />
جْدِهٖ،َم نِْم لِسَِب<br />
َ<br />
ِ <br />
ً<br />
َ<br />
لَخ لاۤئِهٰٖا<br />
َ ةََك وْ نَُك<br />
َ<br />
ْ انََی سَْج<br />
<br />
َ<br />
ِ<br />
َ<br />
One script can serve multiple languages so let's see what happens when we switch to<br />
Urdu.<br />
analyze=yes, ccmp=yes, clig=yes, curs=yes,<br />
dlig=yes, features=yes, fina=yes, init=yes,<br />
isol=yes, kern=yes, language=urd, liga=yes,<br />
mark=yes, medi=yes, mkmk=yes, mode=node,<br />
rlig=yes, script=arab<br />
ِ ِهلل<br />
اَل ُدْمَ ْح ِهلل َْحم َد ٖ،<br />
ن َاشرا؛ ا ْيِ َذل<br />
َوالأْ ْر َواحَ َوالأْ<br />
اَل ُدْمَ ْح ِهلل َْحم َد<br />
ن َاشرا؛ ا ْيِ َذل<br />
َوالأْ ْر َواحَ َوالأْ<br />
ِبح<br />
ال ْموَ َتْ<br />
َواذلكْرَ<br />
ِبح<br />
ال ْموَ َتْ<br />
َواذلكْرَ<br />
هِدْمَ<br />
َوال وةَ،ٰیَ ْح<br />
َوالنس<br />
َوال رْیَ ْخ<br />
ِبحارَِ<br />
َوالن َعْ ف َوالشر<br />
انِ<br />
َوالضر<br />
الثن ِءۤ َا َشاكِرً ا،<br />
َوالس<br />
َوحُسِْل<br />
َوال ْحرَ<br />
ِن<br />
،<br />
،<br />
،<br />
.<br />
،ٖ<br />
َ َق<br />
امَ،<br />
هِدْمَ<br />
َوال وةَ،ٰیَ ْح<br />
َوالنس<br />
َوال رْیَ ْخ<br />
ِبحارَِ<br />
َوالن َعْ ف َوالشر<br />
انِ<br />
َوالضر<br />
الثن ِءۤ َا َشاكِرً ا،<br />
َوالس<br />
َوحُسِْل<br />
َوال ْحرَ<br />
ِن<br />
،<br />
،<br />
،<br />
.<br />
َ َق<br />
امَ،<br />
In practice one will enable most <strong>of</strong> the features. In MkIV one can dene feature sets as<br />
follows:<br />
\definefontfeature<br />
[arab-default]<br />
[mode=node,language=dflt,script=arab,<br />
init=yes,medi=yes,fina=yes,isol=yes,<br />
liga=yes,dlig=yes,rlig=yes,clig=yes,<br />
mark=yes,mkmk=yes,kern=yes,curs=yes]<br />
Applying these features to fonts can be done in several ways, with as most basic one:<br />
\font\ArabFont=arabtype*arab-default at 18pt<br />
Normally one will do something like<br />
\definefont[ArabFont][arabtype*arab-default at 18pt]<br />
or use typescripts to set up ap proper font collection, in which case we end up with definitions<br />
that look like:<br />
104 Arabic