summaryrefslogtreecommitdiff
path: root/texmf-dist/doc/generic/harftex/test.tex
blob: bc088410b0f6b6839f8023b1e483111ff7489776 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
\pdfvariable suppressoptionalinfo \numexpr1+32+64+128+512\relax

\tracingstats=1
\tracingonline=1

\input harfload.sty

\font\amiriten="[amiri-regular.ttf]" at 10pt
\font\amiritenb="[amiri-bold.ttf]" at 10pt

\begingroup\pardir TRT\textdir TRT
\amiriten
هذا كتاب صغير في بحث جديد، تنبّهنا له ونحن ننشر الطبعة الثانية من كتابنا الفلسفة
اللغوية لأنّ موضوعه تابع لموضوعنا. أو هي خطوة ثانية في تاريخ اللغة باعتبار
منشأها وتكونها ونموها. فالفلسفة اللغوية تبحث في كيف نطق الانسان الأول، وكيف
نشأت اللغة وتولّدت الألفاظ من حكاية الأصوات الخارجية، ك{\amiritenb قصف الرعد}، وهبوب الرياح،
والقطع والكسر، وحكاية التف والنفخ والصفير ونحوها. ومن المقاطع الطبيعية التي
ينطق بها الانسان غريزيا كالتأوه، والزفير. وكيف تنوّعت تلك الأصوات لفظا ومعنى
بالنحت، والابدال، والقلب، حتى صارت ألفاظا مستقلة وتكوّنت الأفعال، والأسماء،
والحروف وصارت اللغة على نحو ما هي عليه.  وأما تاريخ اللغة فيتناول النظر في
ألفاظها وتراكيبها، بعد تمام تكونها، فيبحث فيما طرأ عليهما من التغيير والتجدد أو
الدثور، فيبين الألفاظ والتراكيب التي دثرت من اللغة بالاستعمال، وما قام مقامها
من الألفاظ الجديدة، والتراكيب الجديدة، بما تولّد فيها، أو اقتبسته من سواها، مع
بيان الأحوال التي قضت بدثور القديم وتولد الجديد، وأمثلة مما دثر، أو أهمل، أو
تولّد، أو دخل.

المحتوى الذي تصل إليه (في حالة عدم استخدام مواقع مؤمنة عن طريق بروتوكول نقل
النص التشعبي الآمن {\textdir TLT HTTPS}).
\par\endgroup\vfill\eject

\def\arabictext{%
هذا كتاب صغير في بحث جديد، تنبّهنا له ونحن ننشر الطبعة الثانية من كتابنا الفلسفة
اللغوية لأنّ موضوعه تابع لموضوعنا. أو هي خطوة ثانية في تاريخ اللغة باعتبار
منشأها وتكونها ونموها. فالفلسفة اللغوية تبحث في كيف نطق الانسان الأول، وكيف
نشأت اللغة وتولّدت الألفاظ من حكاية الأصوات الخارجية، كقصف الرعد، وهبوب الرياح،
والقطع والكسر، وحكاية التف والنفخ والصفير ونحوها. ومن المقاطع الطبيعية التي
ينطق بها الانسان غريزيا كالتأوه، والزفير. وكيف تنوّعت تلك الأصوات لفظا ومعنى
بالنحت، والابدال، والقلب، حتى صارت ألفاظا مستقلة وتكوّنت الأفعال، والأسماء،
والحروف وصارت اللغة على نحو ما هي عليه.  وأما تاريخ اللغة فيتناول النظر في
ألفاظها وتراكيبها، بعد تمام تكونها، فيبحث فيما طرأ عليهما من التغيير والتجدد أو
الدثور، فيبين الألفاظ والتراكيب التي دثرت من اللغة بالاستعمال، وما قام مقامها
من الألفاظ الجديدة، والتراكيب الجديدة، بما تولّد فيها، أو اقتبسته من سواها، مع
بيان الأحوال التي قضت بدثور القديم وتولد الجديد، وأمثلة مما دثر، أو أهمل، أو
تولّد، أو دخل.%
}

\font\amiritwelve="[amiri-regular.ttf]" at 20pt
\begingroup\pardir TRT\textdir TRT
\amiritwelve
\baselineskip=2em
\arabictext
\par\endgroup\vfill\eject

\font\ruqaaharf="Aref Ruqaa" at 10pt
\font\ruqaaboldnode="Aref Ruqaa Bold:mode=node;script=arab" at 10pt
\font\ruqaaboldbase="Aref Ruqaa Bold:mode=base;script=arab" at 10pt
\begingroup\pardir TRT\textdir TRT
\tolerance 9999
\ruqaaharf    \arabictext\par
\ruqaaboldnode\arabictext\par
\ruqaaboldbase\arabictext\par
\endgroup\vfill\eject

\begingroup\pardir TRT\textdir TRT
\font\nasta="Noto Nastaliq Urdu" at 14pt
\nasta
\baselineskip=3em
\arabictext
\par\endgroup\vfill\eject

\begingroup\pardir TRT\textdir TRT
\font\testc="[amiri-regular.ttf]:color=FF0000" at 20pt
\amiritwelve قلبي {\testc تلون كله} بلون الحب.
\par\endgroup\vfill\eject

\begingroup\pardir TRT\textdir TRT
\font\quran="Amiri Quran Colored" at 20pt
\quran
\baselineskip=2.6em
\parindent=0pt
\leftskip=0pt plus 1fil
\rightskip=0pt plus -1fil
\parfillskip=0pt plus 2fil
\def\aya#1{{\textdir TLT ^^^^06dd#1}}
^^^^fdfd~\aya{١}\par
ٱلۡحَمۡدُ لِلَّهِ رَبِّ ٱلۡعَٰلَمِینَ~\aya{٢} ٱلرَّحۡمَٰنِ ٱلرَّحِیمِ~\aya{٣} مَٰلِكِ یَوۡمِ ٱلدِّینِ~\aya{٤} إِیَّاكَ نَعۡبُدُ وَإِیَّاكَ نَسۡتَعِینُ~\aya{٥} ٱهۡدِنَا ٱلصِّرَٰطَ ٱلۡمُسۡتَقِیمَ~\aya{٦} صِرَٰطَ ٱلَّذِینَ أَنۡعَمۡتَ عَلَیۡهِمۡ غَیۡرِ ٱلۡمَغۡضُوبِ عَلَیۡهِمۡ وَلَا ٱلضَّاۤلِّینَ~\aya{٧}\par
\endgroup\vfill\eject

\begingroup
\font\bungeea="[BungeeColor1.ttf]:colr=true" at 50pt
\font\bungeeb="[BungeeColor1.ttf]:colr=2" at 50pt
\bungeea ABCDEFG\par
\bungeeb ABCDEFG\par

\font\emoji="Noto Color Emoji" at 24pt
\emoji
💙💚💛💜💝🖤🧡😀😇🧔🏽🦆
abc

\endgroup\vfill\eject

\begingroup
\amiriten
\TeX\ = τεχ in Greek

\directlua{
if luaotfload then
  local hb = require("harf")
  assert(    luaotfload.aux.font_has_glyph(font.id("amiriten"), 0x0061)) % a
  assert(not luaotfload.aux.font_has_glyph(font.id("amiriten"), 0x03C4)) % τ
  assert(not luaotfload.aux.font_has_glyph(font.id("amiriten"), 0x0061 + hb.CH_GID_PREFIX)) % a pseudo char
  assert("a" == luaotfload.aux.name_of_slot(font.id("amiriten"), 0x0061)) % a
  assert(nil == luaotfload.aux.name_of_slot(font.id("amiriten"), 0x03C4)) % τ
  assert(68 + hb.CH_GID_PREFIX == luaotfload.aux.slot_of_name(font.id("amiriten"), "a"))
  assert(nil == luaotfload.aux.slot_of_name(font.id("amiriten"), "foo"))
end
}

\font\amiriteni="[amiri-slanted.ttf]" at 10pt
({\amiriteni f\/})

\def\l#1#2{%
  \begingroup%
  \font\testl="[amiri-regular.ttf]:language=#1" at 10pt
  \testl #2%
  \endgroup%
}
\l{ARA}{٠١٢٣٤٥٦٧٨٩}\par
\l{FAR}{۰۱۲۳۴۵۶۷۸۹}\par
\l{URD}{۰۱۲۳۴۵۶۷۸۹}\par
\l{SND}{۰۱۲۳۴۵۶۷۸۹}\par
\l{KSH}{۰۱۲۳۴۵۶۷۸۹}\par

Some text then inline math $E=mc^2$ then $\hbox{text inside inline math}$, then
display math $$E=mc^2\hbox{ with text inside}$$

\begingroup
\font\lmmono="[lmmono10-regular.otf]"
\lmmono $\fam0 \textfont0\font https:$
\endgroup

% Test selecting shapers; when “ot” shaper is used, “kdot” feature will not
% work as it is a Graphite-only feature in Padauk font.
\font\padauk="[Padauk-Regular.ttf]:+kdot" at 30pt\padauk
က ဂ င တ ပ မ ယ လ ဢ ၵ ၸ \par
\font\padauk="[Padauk-Regular.ttf]:shaper=graphite2;+kdot" at 30pt\padauk
က ဂ င တ ပ မ ယ လ ဢ ၵ ၸ \par
\font\padauk="[Padauk-Regular.ttf]:shaper=ot;+kdot"        at 30pt\padauk
က ဂ င တ ပ မ ယ လ ဢ ၵ ၸ \par


\font\arab="[amiri-regular.ttf]:script=arab" at 10pt\arab
\font\latn="[amiri-regular.ttf]:script=latn" at 10pt\latn
\font\dflt="[amiri-regular.ttf]" at 10pt\dflt
\baselineskip=1.6em
\halign{#\qquad\hfill&(#)\hfill\cr
{\arab .A.} & {\tt Arab} script\cr
{\latn .ع.} & {\tt Latn} script\cr
{\arab ..}  & {\tt Arab} script\cr
{\dflt .A.} & No script in font options\cr
{\dflt .ع.} & No script in font options\cr
{\dflt ..}  & No script in font options\cr
}

\font\letterspace=[amiri-regular.ttf]:letterspace=50 at 30pt\letterspace
letter spaced

\font\slanted=[amiri-regular.ttf]:slant=.3 at 30pt\slanted
Slanted text.

\endgroup\vfill\eject

\begingroup
\parindent=0pt
\font\notoserifcjk="[NotoSerifCJK-Regular.ttc]" at 10pt
\notoserifcjk
\noindent
\smallskip
offbeat office baffle coffee HAVANA\par
\smallskip
\begingroup
\rightskip=0pt plus1fil \pretolerance=-1 \hyphenpenalty=-10000
offbeat office baffle coffee HAVANA\par
\endgroup
\endgroup
\vfill\eject

\font\lmten="[lmroman10-regular.otf]:+dlig" at 10pt
\begingroup
\parindent=0pt
\lmten
\noindent
\smallskip
offbeat office baffle {\rm baffle} coffee HAVANA\par
\smallskip
\begingroup
\rightskip=0pt plus1fil \pretolerance=-1 \hyphenpenalty=-10000
offbeat office baffle {\rm baffle} coffee HAVANA\par
\endgroup
\endgroup
\vfill\eject

\font\lmtwelve="[lmroman12-regular.otf]" at 12pt
\font\lmtenb="[lmroman10-bold.otf]" at 10pt
\font\lmteni="[lmromanslant10-regular.otf]" at 10pt
\lmten
\hrule
\vskip 1in
\centerline{\lmtenb A SHORT STORY}
\vskip 6pt
\centerline{\lmteni by A. U. Thor}
\vskip .5cm
Once upon a time, in a distant {\lmtwelve galaxy called} Ööç, there lived a computer named
R.~J. Drofnats.

Mr.~Drofnats-----or ‘‘R. J.,’’ as he {\textdir TRT preferred} to be called-----was happiest when he
was at work typesetting beautiful documents.
\vskip 1in
\hrule
\vfill\eject

\font\test=cmr10 at 12pt
\test
\input story

\begingroup
\font\lmsansten="[lmsans12-regular.otf]" at 12pt
\lmsansten
\protrudechars=2
\rpcode\font`\,=280

We thrive in information―thick worlds because of our
marvelous and everyday capacity to select, edit,
single out, structure, highlight, group, pair, merge,
harmonize, synthesize, focus, organize, condense,
reduce, boil down, choose, categorize, catalog, classify,
list, abstract, scan, look into, idealize, isolate,
discriminate, distinguish, screen, pigeonhole, pick over,
sort, integrate, blend, inspect, filter, lump, skip,
smooth, chunk, average, approximate, cluster, aggregate,
outline, summarize, itemize, review, dip into,
flip through, browse, glance into, leaf through, skim,
refine, enumerate, glean, synopsize, winnow the wheat
from the chaff and separate the sheep from the goats.

\protrudechars=0
\endgroup\vfill\eject

\bye