summaryrefslogtreecommitdiff
path: root/macros/xetex/latex/xepersian-hm/kashida-example.tex
blob: 6702fd3687518736f9ba22a57afe7c8b048b389a (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
% \PassOptionsToPackage{Kashida=off,RTLdocument=on}{xepersian}  % Load xepersian with a few options
\documentclass{report}
% \textwidth=345.0pt
% \textheight=550.0pt
% \textheight=620pt
% \usepackage[Kashida]{xepersian}  % Fails
% \usepackage{xepersian-hm}  % Succeeds
% \usepackage[Kashida=hrule,kashidastretch=0.14 em plus 0.5 em]{xepersian-hm}  % Succeeds
% \usepackage[Kashida=hrule,kashidastretch=0.14 em plus 5.5 em]{xepersian-hm}  % Succeeds
\usepackage[Kashida=glyph,linebreakpenalty=8,kashidastretch=0.14 em plus 5.5 em]{xepersian-hm}  % Succeeds
% \usepackage[Kashida=glyph,kashidastretch=kayhan]{xepersian-hm}  % Succeeds
% \usepackage[Kashida,kashidastretch=0.14 em plus 0.5 em]{xepersian-hm}  % Succeeds
% \usepackage[Kashida,kashidastretch=noskip]{xepersian-hm}  % Succeeds
% \usepackage[Kashida,kashidastretch=default]{xepersian-hm}  % Succeeds
% \usepackage[Kashida,kashidastretch=kayhan]{xepersian-hm}  % Succeeds
% \usepackage[Kashida,kashidastretch=khorramshahr]{xepersian-hm}  % Succeeds

% \settextfont[Scale=4.5,Colour=darkgray]{XB Kayhan}
\settextfont[Scale=4.5]{HM XKayhan}
% \settextfont[Scale=4.5,Colour=darkgray]{HM XNiloofar} 
% \settextfont[Scale=4.5,Colour=darkgray]{HM XYas} 
% \settextfont[Scale=4.5,Colour=darkgray]{HM XZar} 
% \settextfont[Scale=1,Colour=darkgray]{HM XKayhan}

% \setlatintextfont[Scale=2.5,Colour=0000FF]{XB Kayhan}
\setlatintextfont[Scale=1.5,Colour=0000FF]{HM XKayhan}

\defpersianfont\HMXKayhanIt[Scale=4.5]{HM XKayhan Italic}
\defpersianfont\HMXKayhanOb[Scale=4.5]{HM XKayhanOb Oblique}
\defpersianfont\HMXKayhanOl[Scale=4.5]{HM XKayhan Outline}
\defpersianfont\HMXKayhanSd[Scale=4.5]{HM XKayhan Shadow}

% \def\SampleText{\discouragebadlinebreaks[8][0.14 em plus 5.5 em]{
%  راهی جایی تابی چاپی چاههی تلاشهایی
%  شتابهایی تابی چاپی راهی تلاشهــایی
%  که کتابهایی که کلاههایی که کتابهایی }}

% \def\SampleText{\discouragebadlinebreaks[10][0.12 em plus 5.5 em]{
%  راهی جایی تابی چاپی چاههی تلاشهایی
%  شتابهایی تابی چاپی راهی تلاشهــایی
%  که کتابهایی که کلاههایی که کتابهایی }}

\def\SampleText{\discouragebadlinebreaks{
  راهی جایی تابی چاپی چاههی تلاشهایی
  شتابهایی تابی چاپی راهی تلاشهــایی
  که کتابهایی که کلاههایی که کتابهایی }}

\setlength\parindent{0pt}
\pagestyle{empty}

\begin{document}

\KashidaOff\lr{(Kashida Off, Regular)}

\SampleText

\newpage

\KashidaOn\lr{(Kashida On, Regular)}

\SampleText

\newpage

\KashidaOn\lr{(Kashida On, Italic)}

{\HMXKayhanIt \SampleText}

\newpage

\KashidaOn\lr{(Kashida On, Oblique)}

{\HMXKayhanOb \SampleText}

\newpage

\KashidaOn\lr{(Kashida On, Outline)}

{\HMXKayhanOl \SampleText}

\newpage

\KashidaOn\lr{(Kashida On, Shadow)}

{\HMXKayhanSd \SampleText}

\end{document}