fontspec
fontspec copied to clipboard
Not working option `Vertical=RotatedGlyphs'
The option `Vertical=RotatedGlyphs' is not working since I updated the package recently. I used the following example code.
\documentclass{article} \usepackage{fontspec} \setmainfont{SimSun% any font supporting Chinese character }[Vertical=RotatedGlyphs% this option is not working since a recent package update ] \begin{document} 中國 \end{document}
XeLaTeX
I get the warning
*************************************************
* fontspec warning: "icu-feature-not-exist-in-font"
*
* OpenType feature 'Vertical=RotatedGlyphs' (vrt2) not available for font
* 'SimSun' with script '' and language ''.
*************************************************
It may depend on the fact my copy of SimSun is a .ttc file
DVI Comment: XeTeX output 2017.02.19:1619
<AGL:texglyphlist.txt><AGL:pdfglyphlist.txt><AGL:glyphlist.txt>[1</Library/Fonts/[email protected]<NATIVE-FONTMAP:/Library/Fonts/simsun.ttc/0/H/65536/0/0>
On the other hand, if I use PCMyungjo Regular instead of SimSun, I get rotation:
LuaLaTeX
I get the warning also with PCMyungjo Regular
*************************************************
* fontspec warning: "icu-feature-not-exist-in-font"
*
* OpenType feature 'Vertical=RotatedGlyphs' (vrt2) not available for font
* 'PCMyungjoRegular' with script '' and language ''.
*************************************************
and no rotation.
@mcpark3141 — are you using XeTeX or LuaTeX? If you're using XeTeX, does writing
Renderer=AAT,Vertical=RotatedGlyphs
help at all?
I'm using XeLaTeX under Windows 7 x86, TeX Live 2016 environment.
@eg9 Did you use the latest version? I guess it is not a problem of the font. I also got (desired) rotated characters before I update all packages installed on my computer.
@wspr `Renderer=AAT' does not affect the result, unfortunately.
@wspr I didn't examine the source code thoroughly.
It seems that the following code in fontspec-xetex.sty does not work:
\keys_define:nn {fontspec-aat}
{
Vertical .choice: ,
Vertical / RotatedGlyphs .code:n =
{
\__fontspec_update_featstr:n {vertical}
}
}
And we can add RawFeature={vertical} as a workaround.
@wspr RawFeature=vertical is not an AAT exclusive feature, but an XeTeX feature, right? On my Windows 8.1 I can (and have to) manually specify RawFeature=vertical in order to typeset vertically. Moreover, the scope of this feature is very strange.
\documentclass{article}
\usepackage{graphicx}
\usepackage{fontspec}
\newcommand\test{%
\rotatebox{-90}{%
\parbox{60pt}{人人生而自由}%
}%
}
\begin{document}
\begin{center}
\begin{minipage}{115pt}
Wrong:
\fontspec{SourceHanSerifSC-Regular.otf}[
Script=CJK Ideographic,
Language=Chinese Simplified,
Vertical=RotatedGlyphs
]
\test
\end{minipage}%
\begin{minipage}{115pt}
Still wrong?:
\fontspec{SourceHanSerifSC-Regular.otf}[
Script=CJK Ideographic,
Language=Chinese Simplified,
Vertical=RotatedGlyphs,
RawFeature=vertical
]
\test
\end{minipage}%
\end{center}
\begin{center}
\begin{minipage}{115pt}
Correct:
\fontspec{SourceHanSerifSC-Bold.otf}[
Script=CJK Ideographic,
Language=Chinese Simplified,
Vertical=RotatedGlyphs,
RawFeature=vertical
]
\test
\end{minipage}%
\begin{minipage}{115pt}
Still correct?:
\fontspec{SourceHanSerifSC-Bold.otf}[
Script=CJK Ideographic,
Language=Chinese Simplified,
Vertical=RotatedGlyphs
]
\test
\end{minipage}%
\end{center}
\end{document}

texlive-fontspec-svn50387-19.fc31 doesn't work neither