Seite 1 von 1

Fontspec-Error: Optische Schriftgrößen definieren

Verfasst: Di 19. Sep 2017, 23:27
von Seccerony
Achtung: Da hier keine Antworten kamen, ist dies ist ein cross-post zu diesem Thread: https://tex.stackexchange.com/questions ... es-xelatex
Ich teile Ergebnisse/Lösungen auf beiden Plattformen :wink:


Mit XeLaTeX und fontspec erhalte ich bei der Definition der optischen Größen der Schrift Minion Pro diesen Error nur für den letzten Schnitt SemiboldItalicDisplay. Die Datei ist vorhanden und auch richtig betitelt, ist dies also ein Fontspec-Bug?
! fontspec error: "font-not-found"
! 
! The font "--" cannot be found.
! 
! See the fontspec documentation for further information.
! 
! For immediate help type H <return>.
!...............................................  
                                                  
l.39 ...-,      Font = *-SemiboldItalicDisplay}}}]
                                                  
? H
|'''''''''''''''''''''''''''''''''''''''''''''''
| A font might not be found for many reasons.
|  Check the spelling, where the font is installed etc. etc.
| 
|  When in doubt, ask someone for help!
|...............................................
? 
Es folgt ein MWE... Für das Kompilieren sind die Schriftschnitte im Verzeichnis /fonts/ (ausgehend von dem Ordner mit der MWE.tex) nötig.
% !TeX program = xelatex 
% !TeX encoding = UTF-8 Unicode 
\documentclass[paper=a4]{scrbook} 


\usepackage[no-math]{fontspec}
\setmainfont{MinionPro}[Path=fonts/,Extension=.otf,
    UprightFeatures={
      SizeFeatures={
           {Size =       -8.41, Font = *-Caption},
  			{Size =  8.41-13.01, Font = *},
  			{Size = 13.01-19.91, Font = *-Subhead},
  			{Size = 19.91-,      Font = *-Display}}},
    BoldFeatures={
      SizeFeatures={ 
           {Size =       -8.41, Font = *-SemiboldCaption},
  			{Size =  8.41-13.01, Font = *-Semibold},
  			{Size = 13.01-19.91, Font = *-SemiboldSubhead},
  			{Size = 19.91-,      Font = *-SemiboldDisplay}}},
    ItalicFeatures={
      SizeFeatures={ 
           {Size =       -8.41, Font = *-ItalicCaption},
  			{Size =  8.41-13.01, Font = *-Italic},
  			{Size = 13.01-19.91, Font = *-ItalicSubhead},
  			{Size = 19.91-,      Font = *-ItalicDisplay}}},
    BoldItalicFeatures={
      SizeFeatures={ 
           {Size =       -8.41, Font = *-SemiboldItalicCaption},
  			{Size =  8.41-13.01, Font = *-SemiboldItalic},
  			{Size = 13.01-19.91, Font = *-SemiboldItalicSubhead},
           {Size = 19.91-,      Font = *-SemiboldItalicDisplay}}}]


\usepackage{blindtext} 
\begin{document} 
\chapter{Irrelevante Überschrift} 
\blindtext[5]
\end{document} 
%%% Local Variables: 
%%% mode: latex 
%%% TeX-engine: xetex 
%%% TeX-PDF-mode: t 
%%% coding: utf-8 
%%% TeX-master: t 
%%% End:

Fehler in meiner Schreibweise?

Verfasst: Mi 20. Sep 2017, 22:29
von Seccerony
Es ist immer die letzte Zeile... müssen da Lücken oder Kommata rein? :-x
Hier mal heruntergebrochen:
\setmainfont{MinionPro}[... ,
    UprightFeatures = {SizeFeatures = {
  			{Size = 13.01-19.91, Font = *-Subhead},
  			{Size = 19.91-,      Font = *-Display}}}]

LÖSUNG

Verfasst: Do 21. Sep 2017, 19:21
von Seccerony
UprightFont = *-Regular,
BoldFont = *-Bold,
ItalicFont = *-Italic,
BoldItalicFont = *-BoldItalic,
hinzufügen... :oops:
es sieht dann so aus:
\setmainfont{MinionPro}[Path=fonts/serif/,Extension=.otf,Kerning=On,Numbers={Proportional,OldStyle},Style=Historic,Scale=1,Ligatures=Common,
						UprightFont=*,ItalicFont=*-Italic,BoldFont=*-Semibold,BoldItalicFont=*-SemiboldItalic,
    UprightFeatures = { SizeFeatures = {
        	{Size =     {-8.4},  Font = *-Caption},
        	{Size =  {8.4-13},   Font = *},
        	{Size =   {13-19.9}, Font = *-Subhead},
        	{Size = {19.9-},     Font = *-Display}}},
    ItalicFeatures = { SizeFeatures = { 
        	{Size =     {-8.4},  Font = *-ItalicCaption},
        	{Size =  {8.4-13},   Font = *-Italic},
        	{Size =   {13-19.9}, Font = *-ItalicSubhead},
        	{Size = {19.9-},     Font = *-ItalicDisplay}}},
    BoldFeatures = { SizeFeatures = { 
        	{Size =     {-8.4},  Font = *-SemiboldCaption},
        	{Size =  {8.4-13},   Font = *-Semibold},
        	{Size =   {13-19.9}, Font = *-SemiboldSubhead},
        	{Size = {19.9-},     Font = *-SemiboldDisplay}}},
   BoldItalicFeatures = { SizeFeatures = { 
        	{Size =     {-8.4},  Font = *-SemiboldItalicCaption},
        	{Size =  {8.4-13},   Font = *-SemiboldItalic},
        	{Size =   {13-19.9}, Font = *-SemiboldItalicSubhead},
        	{Size = {19.9-},     Font = *-SemiboldItalicDisplay}}}]