8.6 Customizing Ipe8 Advanced topics8.4 Using Truetype fonts8.5 Unicode text

8.5 Unicode text

If you make figures containing text objects in languages other than English, you will need to enter accented characters, or characters from other scripts such as Greek, Hangul, Kana, or Chinese characters. Of course you can still use the LaTeX syntax K\"onig to enter the German word "König", but for larger runs of text it's more convenient to enter text in a script supported by your system. When Ipe writes the Pdflatex source file, it writes the text in UTF-8 encoded Unicode. You only have to make sure that Pdflatex can handle this file.

An easy solution, sufficient for German, French, and other languages for which support is already in a standard LaTeX-setup, is to add the line

\usepackage[utf8]{inputenc}
in your Latex preamble (set in the Document properties dialog, available on the Edit menu).

When setting this up, you have to keep in mind that Ipe can only handle scalable fonts, such as Postscript Type1 fonts. You'll have to choose a setup that uses such scalable fonts.

For instance, to use UTF-8 encoded Russian in LaTeX, it is sufficient to put this in the preamble:

\usepackage[utf8]{inputenc}
\usepackage[russian]{babel}
However, this will not work with Ipe: This setup uses Metafont fonts, which are included in the PDF output as bitmaps, and Ipe cannot use these fonts. In this case the solution is to install the PsCyr package, and the following preamble:
\usepackage[utf8]{inputenc}
\usepackage[russian]{babel}
\usepackage{pscyr}

For some languages a LaTeX-setup is available that does not support UTF-8. For instance, Korean Hangul can be typeset using the hfont package, but this requires that the input file is encoded in the EUC-KR encoding. Ipe can convert the LaTeX source to a desired encoding if this is specified in a style sheet. For instance, the following style sheet would enable the use of Korean in the Ipe document:

<ipestyle name="hangul">
<preamble encoding="euc-kr">
\usepackage{hfont}
</preamble>
</ipestyle>

8.6 Customizing Ipe8 Advanced topics8.4 Using Truetype fonts8.5 Unicode text