latex3 / fontspec

Font selection in LaTeX for XeTeX and LuaTeX
http://latex3.github.io/fontspec/
LaTeX Project Public License v1.3c
275 stars 33 forks source link

Not working option `Vertical=RotatedGlyphs' #279

Open mcpark3141 opened 7 years ago

mcpark3141 commented 7 years ago

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}

eg9 commented 7 years ago

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/simsun.ttc@9.96pt<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:

screen shot 2017-02-19 at 16 29 11

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.

wspr commented 7 years ago

@mcpark3141 — are you using XeTeX or LuaTeX? If you're using XeTeX, does writing

Renderer=AAT,Vertical=RotatedGlyphs

help at all?

mcpark3141 commented 7 years ago

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.

leo-liu commented 7 years ago

@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.

RuixiZhang42 commented 4 years ago

@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}

vert

hizukiayaka commented 4 years ago

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