[XeTeX] Character Variants

Andy Lin kiryen at gmail.com
Mon Mar 28 00:50:56 CEST 2011


On Sun, Mar 27, 2011 at 12:49, Bob Beckett <sealbeam01 at yahoo.com> wrote:
> Result:  This didn't work. It produced only the base character, not the
> variant. I also tried +aalt and +salt. No go.

Access All Alternates is something that needs to be supported by the
software you're using.
Stylistic Alternates don't apply to CJK characters.

I'm not sure which variant you're looking for. E0100 selects the first
variant offered for that glyph by the font. In this case, the
difference is that it has a single dot on the left hand side instead
of two.

I'm not sure how to access glyphs by their variant index. However,
where multiple variants exist, you should be able to access them the
"normal" way, i.e. by selecting the character set to which the variant
belongs. Kozuka Mincho Pr6N supports the following sets: regular,
expert, hojo, jis78, jis83, jis90, nlc kanji, traditional.

The following code should allow you to test for variants of a
character and how to access them. I've attached a sample output. In
addition to the sets that KMPr6N supports, I've also included
traditional naming and simplified in case you have other fonts that
use them.

\documentclass{article}
\usepackage{fontspec}
\newcommand\varchar{辻}
\begin{document}
\fontspec{Kozuka Mincho Pr6N}辻
{\addfontfeature{RawFeature=+expt}\varchar} %Single Dot Variant
{\addfontfeature{RawFeature=+hojo}\varchar}
{\addfontfeature{RawFeature=+jp78}\varchar}
{\addfontfeature{RawFeature=+jp83}\varchar} %Single Dot Variant
{\addfontfeature{RawFeature=+jp90}\varchar} %Single Dot Variant
{\addfontfeature{RawFeature=+nlck}\varchar}
{\addfontfeature{RawFeature=+trad}\varchar}
{\addfontfeature{RawFeature=+tnam}\varchar}
{\addfontfeature{RawFeature=+simp}\varchar}
\end{document}

HTH
-Andy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: KMinTest.pdf
Type: application/pdf
Size: 3691 bytes
Desc: not available
URL: <http://tug.org/pipermail/xetex/attachments/20110327/b444b14e/attachment.pdf>


More information about the XeTeX mailing list