summaryrefslogtreecommitdiff
path: root/texmf-dist/doc/generic/harftex/test.tex
diff options
context:
space:
mode:
Diffstat (limited to 'texmf-dist/doc/generic/harftex/test.tex')
-rw-r--r--texmf-dist/doc/generic/harftex/test.tex249
1 files changed, 249 insertions, 0 deletions
diff --git a/texmf-dist/doc/generic/harftex/test.tex b/texmf-dist/doc/generic/harftex/test.tex
new file mode 100644
index 00000000..bc088410
--- /dev/null
+++ b/texmf-dist/doc/generic/harftex/test.tex
@@ -0,0 +1,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