Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use Extension with .ttc files and FontIndex #431

Open
4 tasks done
adamliter opened this issue Sep 3, 2020 · 0 comments
Open
4 tasks done

Cannot use Extension with .ttc files and FontIndex #431

adamliter opened this issue Sep 3, 2020 · 0 comments

Comments

@adamliter
Copy link

Description

I'm not sure if this is a bug or the intended behavior, but it does not seem to be possible to use the Extension keyword with a .ttc file and using the *Features keywords with FontIndex when trying to set the main font.

Check/indicate

Minimal example demonstrating the issue

The following document does not correctly set the bold, italic, and bold italic fonts for me, even though I am able to directly set a bold font by defining a new font and using the UprightFeatures keyword.

\documentclass{article}

\usepackage{fontspec}
\setmainfont[
  Ligatures=TeX,
  Extension=.ttc,
  UprightFeatures={FontIndex=0},
  BoldFeatures={FontIndex=4},
  ItalicFeatures={FontIndex=2},
  BoldItalicFeatures={FontIndex=5}]{GillSans}

\newfontfamily\SemiBold[
  Ligatures=TeX,
  Extension=.ttc,
  UprightFeatures={FontIndex=4}]{GillSans}

\begin{document}
\textbf{asdf}
\textit{asdf}
asdf
\textbf{\textit{asdf}}

{\SemiBold asdf}
\end{document}

Output from compiling document where "asdf" appears in the same font, except when switching to the \SemiBold font

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant