[NTG-context] Having difficulty getting unicode characters to display in ConTeXT output PDF
Pablo Rodriguez
oinos at gmx.es
Wed Apr 8 19:11:13 CEST 2015
On 04/07/2015 08:40 PM, david.boerschlein at juno.com wrote:
>
> I am having difficulty getting Unicode characters to display
> correctly in PDF output using ConTeXT. Also, the PDF Bookmarks are
> not showing inthis example.
>
> ConTeXt ver: 2014.12.11 12:02 MKIV beta fmt: 2014.12.15 int: english/english
>
> I am attaching a minimal example.
>
> Would you please give me some pointers and put a working
> multi-lingual example on the contextgarden.net website?
Hi David,
this sample (slightly modified from the one Hraban posted before) works
fine with latest beta from 2015.04.08 14:19 (and stable version from
2014.01.03 00:40):
\definefontfamily[mainface][rm][FreeSerif]
\setupbodyfont[mainface]
% Enables index in PDF document
\setupinteraction[state=start]
\setupinteractionscreen[option=bookmark]
\placebookmarks[section][force=yes]
% Let us say hello in many languages
\starttext
\setupfooter [state=start]
\page[1]
\startfrontmatter
{\midaligned {\tfc{\WORD{Hello World}}}}
\placecontent[extras={22=page},alternative=c]
\stopfrontmatter
\page[yes]
\startbodymatter
\section{1. Russian: Привет мир!} Russian: Привет мир! \\
\section{2. Punjabi: ਸਤਿ ਸ੍ਰੀ ਅਕਾਲ ਦੁਨਿਆ!} Punjabi: ਸਤਿ ਸ੍ਰੀ ਅਕਾਲ
ਦੁਨਿਆ! \\
\section{3. Arabic: مرحبا أيها العالم!} Arabic: مرحبا أيها
العالم! \\
\section{4. Hebrew: שלום העולם!} Hebrew: שלום העולם! \\
\section{5. Armenian: Բարեւ աշխարհ!} Armenian: Բարեւ աշխարհ! \\
\stopbodymatter
\stoptext
The FreeSerif font is available from https://ftp.gnu.org/gnu/freefont/.
I hope it helps,
Pablo
--
http://www.ousia.tk
More information about the ntg-context
mailing list