Difference between revisions of "Palatino Linotype under MKIV"

From Wiki
Jump to navigation Jump to search
m (Adding \smallcaps to default style listing)
(add code for ancient Greek hyphenation)
Line 5: Line 5:
 
== Example file ==
 
== Example file ==
 
<texcode>
 
<texcode>
 +
\setuplanguage[en][patterns={en,agr}]
 +
\mainlanguage[en]
 
\definefontfamily[palatino][rm][Palatino Linotype][features={default, quality}]
 
\definefontfamily[palatino][rm][Palatino Linotype][features={default, quality}]
 
% by default all \it \bf \bi \smallcaps \oldstyle styles are ready to use as well as ligatures
 
% by default all \it \bf \bi \smallcaps \oldstyle styles are ready to use as well as ligatures
Line 55: Line 57:
  
 
\startTwoColumns
 
\startTwoColumns
Old greek\TwoColumns
+
Ancient Greek\TwoColumns
 
Ὅτι μὲν ὑμεῖς, ὦ ἄνδρες Ἀθηναῖοι,  
 
Ὅτι μὲν ὑμεῖς, ὦ ἄνδρες Ἀθηναῖοι,  
 
πεπόνθατε ὑπὸ τῶν ἐμῶν κατηγόρων,  
 
πεπόνθατε ὑπὸ τῶν ἐμῶν κατηγόρων,  

Revision as of 16:59, 1 April 2016

This page shows you how to use most of the typographical features of the Palatino Linotype font shipped with MS Windows.

The following code has been tested with ConTeXt 2013.12.20 / LuaTeX 0.77.0 on Windows 7. It takes advantage of recent fixes which simplified the font setup significantly.

Example file

\setuplanguage[en][patterns={en,agr}]
\mainlanguage[en]
\definefontfamily[palatino][rm][Palatino Linotype][features={default, quality}]
% by default all \it \bf \bi \smallcaps \oldstyle styles are ready to use as well as ligatures
% but superscript requires extra settings
\definefontfeature[f:superscript][sups=yes]
% an extra \sup macro is defined for our convenience
\define[1]\sup{\feature[+][f:superscript]#1}

\setupbodyfont[palatino]
% global protrusion and expansion settings - it is not inherited in custom paragraph definitions
\setupalign[hz, hanging]
% default 'verystrict' tolerance settings produces unwrapped greek text
\setuptolerance[strict]

\defineparagraphs[TwoColumns][n=2, align={hz, hanging}]
\setupparagraphs[TwoColumns][1][width=52pt, style=italic, align=left]

\starttext

\startbuffer[Plato]
How you, O Athenians, have been affected by my accusers, I cannot tell;
but I know that they almost made me forget who I was--so persuasively
did they speak; and yet they have hardly uttered a word of truth.
\stopbuffer

\startTwoColumns
Roman\TwoColumns
\getbuffer[Plato]
\stopTwoColumns

\startTwoColumns
Italic\TwoColumns
{\it\getbuffer[Plato]}
\stopTwoColumns

\startTwoColumns
Bold\TwoColumns
{\bf\getbuffer[Plato]}
\stopTwoColumns

\startTwoColumns
Bold italic\TwoColumns
{\bi\getbuffer[Plato]}
\stopTwoColumns

\startTwoColumns
Small caps\TwoColumns
{\smallcaps\getbuffer[Plato]}
\stopTwoColumns

\startTwoColumns
Ancient Greek\TwoColumns
Ὅτι μὲν ὑμεῖς, ὦ ἄνδρες Ἀθηναῖοι, 
πεπόνθατε ὑπὸ τῶν ἐμῶν κατηγόρων, 
οὐκ οἶδα· ἐγὼ δ' οὖν καὶ αὐτὸς ὑπ' 
αὐτῶν ὀλίγου ἐμαυτοῦ ἐπελαθόμην, 
οὕτω πιθανῶς ἔλεγον. 

\stopTwoColumns

Old style ffl figures \& superior characters: 567890 / {\oldstyle 567890} --- 1{\sup 1} o{\sup o} re{\sup re}

\stoptext

Palatino linotype under mkiv.png