summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/xelatex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2007-07-26 17:59:28 +0000
committerKarl Berry <karl@freefriends.org>2007-07-26 17:59:28 +0000
commit85d9421bba33f314d23a3cc34828fc357b01aacd (patch)
tree64223ff5b566b9d2d01bc9e9fa9d88cf3cf0850b /Master/texmf-dist/source/xelatex
parentfb7e6e75508ba3e8eca86ca810f7d500a25a4708 (diff)
philokalia update, getting .otf in fonts/ (frank 25jul07)
git-svn-id: svn://tug.org/texlive/trunk@4653 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/xelatex')
-rw-r--r--Master/texmf-dist/source/xelatex/philokalia/philokalia.dtx190
1 files changed, 139 insertions, 51 deletions
diff --git a/Master/texmf-dist/source/xelatex/philokalia/philokalia.dtx b/Master/texmf-dist/source/xelatex/philokalia/philokalia.dtx
index cc20cbb400a..01a94b1f26a 100644
--- a/Master/texmf-dist/source/xelatex/philokalia/philokalia.dtx
+++ b/Master/texmf-dist/source/xelatex/philokalia/philokalia.dtx
@@ -28,19 +28,20 @@
% Apostolos Syropoulos (asyropoulos@yahoo.com)
%
%\fi
-% \CheckSum{32}
+% \CheckSum{126}
% \iffalse This is a Metacomment
%
%<philokalia>\ProvidesFile{philokalia.sty}
%<EU1plk>\ProvidesFile{eu1plk.fd}
%
-%<philokalia>[2007/01/07 v1.0 Package `philokalia']
+%<philokalia>[2007/01/24 v1.1 Package `philokalia']
%<EU1plk>[2007/01/07 v1.0 Philokalia-Regular Support File]
%
% \begin{macrocode}
%<*driver>
\documentclass{ltxdoc}
-\usepackage[local]{philokalia}
+\usepackage{philokalia}
+\usepackage{fullpage}
\GetFileInfo{philokalia.drv}
\begin{document}
\DocInput{philokalia.dtx}
@@ -53,23 +54,24 @@
%\author{Apostolos Syropoulos\\366, 28th October Str.\\
%GR-671 00 Xanthi, HELLAS\\
%Email:\texttt{asyropoulos@yahoo.com}}
-% \date{2007/01/07}
+% \date{2007/01/25}
%\maketitle
%\begin{abstract}
% This document describes the functionality of the \textsf{philokalia} package, which
-% have been designed to ease the use of the Philokalia-Regular OpenType font with \XeLaTeX, as well as
-% the OpenType features of the Philokalia-Regular font.
+% has been designed to ease the use of the Philokalia-Regular OpenType font with \XeLaTeX, as well as
+% the OpenType features of this font.
%\end{abstract}
%\StopEventually{}
%\section{Introduction}
% The \textsf{philokalia} package has been designed to ease the use of the Philokalia-Regular (henceforward
% it will specified simply as the font)
% OpenType font with \XeLaTeX. The package provides two options: \texttt{global} and \texttt{local}.
-% When the package is used with the \texttt{global} option, which is the default option, the font
-% is made the main font of the entire document, while when the package is used with the \texttt{local}
-% option, it just provides the commands \verb=\textphlk= and \verb=\phkl=. The first command takes
-% one argument which is typeset using the font. The second command makes the font the main font of
-% current environment, local scope, or the rest of the document. The complete package provides the
+% When the package is used with the \texttt{global} option the font is made the main font of the entire
+% document. Also, this option provides support to typeset titling capitals.
+% When the package is used with the \texttt{local} option, which is the default option,
+% it provides the commands \verb=\textphlk= and \verb=\phkl= to enable typesetting of short passages.
+% The first command takes one argument which is typeset using the font. The second command makes the font
+% the main font of the current (local) scope. The complete package provides the
% following \XeLaTeX\ files:
%\begin{center}
% \begin{tabular}{ll}
@@ -81,19 +83,20 @@
%
% \section{About The Font}
%
-% The font started as a project to digitize the typeface
+% The font started as a project to digitize the typeface that was
% used to typeset the Philokalia books. For information regarding these books, the reader
% should visit either the following URL:
%\begin{center}
% \verb=http://orthodoxwiki.org/Philokalia=
%\end{center}
-% or enter the word {\em philokalia} in the Amazon.com search box. The project was carried out by
+% or enter the word {\em philokalia} in the Amazon.com search box, for information about various
+% editions of the books. The project was carried out by
% Apostolos Syropoulos and Ioannis Gamvets. Initially, the project was part
-% of Ioannis Gamvetas's diploma thesis, but the resulting Opetype font is not part of this
-% thesis work and it was developed by this author. The original thesis work was to develop Type~1 fonts
-% and tools to typeset portions of the Philokalia books with Omega. Since, the original thesis work has
-% not been completed yet (!), the idea of releasing an OpenType font emerged quite naturally.
-% The font contains only Greek letters but it can be used to typeset any Greek text. However, since the
+% of Ioannis Gamvetas's diploma thesis, but the resulting OpenType font is not part of this
+% thesis work and it was developed by this author. The goal of the original thesis work was to develop Type~1
+% fonts and tools to typeset portions of the Philokalia books with Omega. Since, the original thesis work
+% has not been completed yet (!), the idea of releasing an OpenType font emerged quite naturally.
+% The font contains only Greek letters and it can be used to typeset any Greek text. However, since the
% shapes of the letters are not that obvious, here is a ``translation''-table:
% \begin{center}
% \begin{tabular}{cccccccccc}
@@ -109,13 +112,13 @@
% \textphlk{ψ} & \texttt{ψ} & \textphlk{ω} & \texttt{ω}
% \end{tabular}
% \end{center}
-% One of the interesting aspect of this font is that accents are placed {\em after} capital
-% letters (see the sample below). Another interesting aspect of the font is the great number of
-% ligatures it provides. In fact, it provides more than 40 {\em historical} ligatures plus two
+% One interesting feature of this font is that accents are placed {\em after} capital
+% letters (see the sample below). Another interesting feature of the font is the great number of
+% ligatures it includes. In fact, it includes more than 40 {\em historical} ligatures plus two
% {\em contextual} ligatures. When typing \texttt{κι} and these letters are not part of a word, then
-% one gets the \textphlk{κι} symbol, which is the Greek ampersand. The same ligature can be
-% obtained if we substiture {\em iota} with {\em iota with varia}. The table below shows all the
-% ligatures provided by the font:
+% one gets the contextual ligature \textphlk{κι}, which is the Greek ampersand. The same ligature can be
+% obtained if we substitute {\em iota} with {\em iota with varia}. The table below shows all the historical
+% ligatures included in the font:
% \begin{center}
% \begin{tabular}{llllllllll}
% \textphlk{λλ} & \texttt{λλ} & \textphlk{ἀν} & \texttt{ἀν} & \textphlk{εν} & \texttt{εν} &
@@ -134,24 +137,33 @@
% \textphlk{ρί} & \texttt{ρί} & \textphlk{ρὶ} & \texttt{ρὶ} \\
% \textphlk{ρῖ} & \texttt{ρῖ} & \textphlk{ἡν} & \texttt{ἡν} & \textphlk{ην} & \texttt{ην} &
% \textphlk{ῆν} & \texttt{ῆν} & \textphlk{ήν} & \texttt{ήν} \\
-% \textphlk{υν} & \texttt{υν} & \textphlk{ύν} & \texttt{ύν} & \textphlk{΄-} & \texttt{΄-} &
-% \textphlk{στ} & \texttt{στ}
+% \textphlk{υν} & \texttt{υν} & \textphlk{ύν} & \texttt{ύν} & \textphlk{στ} & \texttt{στ} &
+% \textphlk{΄-} & \texttt{΄-} & \textphlk{1Μο} & \texttt{1Μο} \\
+% \textphlk{1μο} & \texttt{1μο} & \textphlk{΄1} & \texttt{΄1}
+%
% \end{tabular}
% \end{center}
-% Notice that in order to get the \textphlk{΄-} symbol one has to type a tonos and then a
-% hyphen. This symbol has been used by the ancient Greek mathematician Diophantus to denote
-% the minus sign. This symbol was not in the original Philokalia font, but it has been
-% included here for reasons of completeness. Future releases of the font may contain some more
-% mathematical symbols. In case, someone wants only to use this symbol, she can use the
-% \verb=\dminus= command.
+% Notice that in order to get the symbols \textphlk{΄-} and \textphlk{΄1} one has to type a tonos and then a
+% hyphen or the digit one, respectively. The symbols \textphlk{΄-} and \textphlk{΄1}
+% have been used by the ancient Greek mathematician Diophantus to denote the subtraction
+% operator\footnote{Diophantus did not explicitly specified negative numbers in his writings, although
+% he was aware of them.} and
+% an unknown quantity (similar to the $x$ we use today in simple equations like $x+x^2=3$). Also, the
+% symbols \textphlk{1Μο} and \textphlk{1μο} have been used by Diophantus to denote the unit (i.e., the
+% number one). These symbol were not in the original Philokalia font, but they have been
+% included here for reasons of completeness. The followin commands are provided for people who only
+% want to typeset these symbols: \verb=\dsubop=, \verb=\dUnit=, \verb=\dunit=, and \verb=\dunknown=.
+%
+% The font includes titling capitals that are accessible through the titling OpenType feature,
+% which, however, is implicitly available. In particular, the command \verb|\textinit|, which has two
+% arguments, the first being the first letter of a word and the second being the rest of the word,
+% can be used to typeset a drop capital. The following short passage from Aristotle's treatise
+% {\em The Poetics} was typeset with the font so as to demonstrate the various features of it.
%
-% These ligatures really honor content and most of them are really rare in the sense that are not
-% used in modern Greek typography. We provide
-% a short passage from Aristotle's treatise {\em The Poetics} typeset with the font so that readers can
-% appreciate the beauty of these ligatures:
-% \begin{quotation}
-%\fontfamily{plk}\selectfont\language\ancientgreek
-%1. Περὶ ποιητικῆς αὐτῆς τε καὶ τῶν εἰδῶν αὐτῆς, ἥν τινα δύναμιν ἕκαστον ἔχει,
+%{\fontfamily{plk}\selectfont\language\ancientgreek
+% \font\PHtitl="[Philokalia-Regular]/ICU:script=grek,+titl"
+% \newsavebox{\mybox}\savebox{\mybox}{\PHtitl Π}
+% \lettrine[lines=3]{\usebox{\mybox}}{ερὶ} ποιητικῆς αὐτῆς τε καὶ τῶν εἰδῶν αὐτῆς, ἥν τινα δύναμιν ἕκαστον ἔχει,
%καὶ πῶς δεῖ συνίστασθαι τοὺς μύθους εἰ μέλλει καλῶς ἕξειν ἡ ποίησις, ἔτι δὲ ἐκ πόσων καὶ ποίων
%ἐστὶ μορίων, ὁμοίως δὲ καὶ περὶ τῶν ἄλλων ὅσα τῆς αὐτῆς ἐστι μεθόδου, λέγωμεν ἀρξάμενοι κατὰ φύσιν
%πρῶτον ἀπὸ τῶν πρώτων.
@@ -165,28 +177,104 @@
%ἁρμονίᾳ, τούτοις δ᾽ ἢ χωρὶς ἢ μεμιγμένοις· οἷον ἁρμονίᾳ μὲν καὶ ῥυθμῷ χρώμεναι μόνον ἥ τε αὐλητικὴ καὶ ἡ κιθαριστικὴ
%κἂν εἴ τινες [25] ἕτεραι τυγχάνωσιν οὖσαι τοιαῦται τὴν δύναμιν, οἷον ἡ τῶν συρίγγων, αὐτῷ δὲ τῷ ῥυθμῷ [μιμοῦνται]
%χωρὶς ἁρμονίας ἡ τῶν ὀρχηστῶν (καὶ γὰρ οὗτοι διὰ τῶν σχηματιζομένων ῥυθμῶν μιμοῦνται καὶ ἤθη καὶ πάθη καὶ πράξεις)·
-% \end{quotation}
+% }
+%
+% \bigskip
+% The first line of the code that was used to typeset the previous passage follows:
+% \begin{center}
+% \texttt{\char`\\language\char`\\ancientgreek\char`\\textinit\char`\{Π\char`\}\char`\{ερὶ\char`\} ποιητικῆς
+% αὐτῆς\ldots}
+% \end{center}
+% Notice that here we enable the \texttt{ancientgreek} hyphenation patterns to allows \XeTeX\ to correctly
+% hyphenate the text.
+%
% \section{The package \textsf{philokalia}}
-% The code of the \textsf{philokalia} package is really very simple. First, we specify what has to be
-% done when the package is invoked with the corresponding option and then load some reuired packages.
+%
+% First of all, we have to load a number of packages that are necessary for the correct use of the font.
+% In addition, we use the \textsf{lettrine} package to typeset the titling capitals.
% \begin{macrocode}
%<*philokalia>
+\RequirePackage{fontspec}
+\RequirePackage{xunicode}
+\RequirePackage{xltxtra}
+\RequirePackage{lettrine}
+\newsavebox{\Pb@x}
+% \end{macrocode}
+% Unfortunately, we cannot use the \textsf{lettrine} package as it stands. We need to sligthly modify
+% two macros. In particular, the macro \verb=\Lettrine@height=, which computes the height of the
+% titling capital, has to compute the height of the letter \texttt{x} of a font in order to
+% carry out its computation. Since the font does not include this character, we had to modify the
+% code so as to compute the height of the letter \texttt{α} instead. Similarly, we had to modify the macro
+% \verb=\LettrineFont= because it was designed with the assumption that the main font of the document has
+% the \texttt{X} character, which, again, is not valid for our case.
+% \begin{macrocode}
+\def\Lettrine@height{%
+ \@tempdima=\baselineskip
+ \setlength{\L@height}{\theL@lines\@tempdima}%
+ \ifnum\theL@lines>1
+ \addtolength{\L@height}{-\@tempdima}%
+ \fi
+ \sbox{\L@tbox}{\LettrineTextFont "03B1}%%%% Modified here
+ \addtolength{\L@height}{\ht\L@tbox}%
+ \addtolength{\L@height}{\L@oversize\L@height}}
+\renewcommand*{\LettrineFont}{%
+ \Lettrine@height
+ \sbox{\L@tbox}{\LettrineFontHook\fontsize{\L@height}{\L@height}%
+ \selectfont "0391}%%%% Modified here
+ \@tempcntb=\ht\L@tbox
+ \@tempcnta=\L@height
+ \multiply\@tempcnta by 100
+ \divide\@tempcntb by 100
+ \divide\@tempcnta by \@tempcntb
+ \advance\@tempcnta by -9999
+ \ifnum\@tempcnta>0
+ \def\@tempa{1.\the\@tempcnta}%
+ \else
+ \def\@tempa{1}%
+ \fi
+ \LettrineFontHook
+ \fontsize{\@tempa\L@height}{\@tempa\L@height}%
+ \selectfont
+}
+% \end{macrocode}
+% Now, we have to define the two options: global and local (the default one). In the first case, we
+% define the command \verb|\textinit| that is used to typeset drop capitals from the titling
+% capitals included in the font. By default, the \texttt{titl} feature of the font is not enabled
+% as this would mean that all paragraphs would start with these really huge titling capitals.
+% Also, the font is made the default font for the entire document. Notice that we use a box variable
+% to store the letter that will appear as a drop capital. This is necessary in order to have in
+% the box the titling capital and not the ordinary capital letter, or else the \verb|\lettrine|
+% command will fail to correctly compute the height and width of the letter.
+% \begin{macrocode}
\DeclareOption{global}{%
\renewcommand{\rmdefault}{plk}%
+ \DeclareFontFamily{EU1}{plktitl}{}%
+ \DeclareFontShape{EU1}{plktitl}{m}{n}%
+ {<-> "[Philokalia-Regular]/ICU:script=grek,+titl"}{}%
+ \newcommand{\textinit}[2]{%
+ \savebox{\Pb@x}{\usefont{EU1}{plktitl}{m}{n} #1}%
+ \lettrine[lines=3]{\usebox{\Pb@x}}{#2}}%
}
+% \end{macrocode}
+% When the package is used with the default option, it provides two commands to typeset short
+% passages of text. As is evident from the code that follows, the first macro is actually a
+% definition and the second a command that can be used to typeset its argument with the font. Users
+% should use the definition with care.
+% \begin{macrocode}
\DeclareOption{local}{%
\def\phkl{\fontfamily{plk}\selectfont}%
\newcommand{\textphlk}[1]{{\phkl #1}}%
}
-\ExecuteOptions{global}
+\ExecuteOptions{local}
\ProcessOptions
-\RequirePackage{fontspec}
-\RequirePackage{xunicode}
-\RequirePackage{xltxtra}
% \end{macrocode}
-% The command \verb|\dminus| provides access to the glyph that represents Diophantus minus sign.
+% The following commands are glyph access commands for the archaic mathematical symbols included in
+% the font. They produce the symbols \dsubop, \dUnit, \dunit, and \dunknown, respectively.
% \begin{macrocode}
-\def\dminus{{\fontfamily{plk}\selectfont\char"0185}}
+\def\dsubop{{\fontfamily{plk}\selectfont\char"018B}}
+\def\dUnit{{\fontfamily{plk}\selectfont\char"018C}}
+\def\dunit{{\fontfamily{plk}\selectfont\char"018D}}
+\def\dunknown{{\fontfamily{plk}\selectfont\char"018E}}
%</philokalia>
% \end{macrocode}
%
@@ -200,7 +288,7 @@
{<-> "[Philokalia-Regular]/ICU:script=grek,+hlig,+clig:mapping=tex-text"}{
}
% \end{macrocode}
-% And here we define the default substitutions:
+% And then we define the various substitutions:
% \begin{macrocode}
\DeclareFontShape{EU1}{plk}{m}{sl}{<-> ssub * plk/m/n}{}
\DeclareFontShape{EU1}{plk}{m}{it}{<-> ssub * plk/m/sl}{}
@@ -214,8 +302,8 @@
%</EU1plk>
% \end{macrocode}
%
-% \section*{Acknowledgement}
-% Firts of all, I thank Ioannis Gamvetas for his collaboration back in the years 2002-2003.
+% \section*{Acknowledgements}
+% First of all, I thank Ioannis Gamvetas for his collaboration back in the years 2002-2003.
% Also, I would like to thank George Williams, the designer of FontForge, the free font-editor, for all his
% valuable help, Adam Twardoch for explaining to me how to implement the contextual ligature, and Dimitrios
% Philippou for his comments and suggestions. Last, but certainly not least, I thank my son for his help!