Xelatexでキャラクターの突出を有効にする適切な方法は何ですか?

StackOverflow https://stackoverflow.com/questions/3546742

  •  30-09-2019
  •  | 
  •  

質問

Xetex 3.1415926-2.2-0.9997.4(Tex Live 2010の一部)を使用しています。その新機能の1つはキャラクターの突出であり、ドキュメントで使用したいと思います。問題は、私がそれを機能させることができないということです。

Xetexサンプル xetex.tkからwikiは正しくコンパイルし、突出した文字を表示します。ただし、私が作成したXelatexファイルは、突出をまったく示していません。

誰かが私が何を間違えているのか教えてもらえますか?

\documentclass[12pt]{book}

\usepackage{xltxtra}
\usepackage{polyglossia}

\setmainfont[Mapping=tex-text]{Charis SIL}
\setmainlanguage{english}

\def\setprotcode#1{
    \rpcode#1 U"0021    55
    \rpcode#1 U"002C    194
    \rpcode#1 U"002D    233
    \rpcode#1 U"002E    194
    \rpcode#1 U"003B    138
    \rpcode#1 U"003A    138
    \rpcode#1 U"003F    94
    \lpcode#1 U"2018    194
    \rpcode#1 U"2019    194
    \lpcode#1 U"201C    250
    \rpcode#1 U"201D    250
    \rpcode#1 U"2013    150
    \rpcode#1 U"2014    200
}

\XeTeXprotrudechars=2
\font\f = "Charis SIL:mapping=tex-text"
\setprotcode{\f}

\begin{document}

In a genetic algorithm, a population of strings (called chromosomes or the
genotype of the genome), which encode candidate solutions (called individuals,
creatures, or phenotypes) to an optimization problem, evolves toward better solutions.
Traditionally, solutions are represented in binary as strings of 0s and 1s, but other
encodings are also possible. The evolution usually starts from a population of randomly
generated individuals and happens in generations. In each generation, the fitness of
every individual in the population is evaluated, multiple individuals are
stochastically  selected from the current population (based on their fitness),
and modified (recombined and possibly randomly mutated) to form a new population.
The new population is then used in the next iteration of the algorithm. Commonly,
the algorithm terminates when either a maximum number of generations has been produced,
or a satisfactory fitness level has been reached for the population. If the algorithm
has terminated due to a maximum number of generations, a satisfactory solution may or
may not have been reached.

\end{document}
役に立ちましたか?

解決

まあ、これを無視してください、私は愚かです。 Charisにマイクロタイプスタイルファイルを追加するのを忘れました。 同じWikiページで.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top