Viertelgeviertstrich/hyphen 与 UnifrakturMaguntia 和 XeLatex

Viertelgeviertstrich/hyphen 与 UnifrakturMaguntia 和 XeLatex

我正在尝试让 Fraktur 字母在 Texstudio 中工作。它大部分工作正常,但“Viertelgeviertstrich”/ 不工作,-它应该变成一个简短的=

https://ibb.co/Wtv363S 图片顶部显示了 3 种连字符类型应该是什么样子。然后中间是两个示例,它们在文本中应该是什么样子,一个在中间,一个在末尾。但底部是我得到的结果,控制台中没有错误。

甚至在这个简单的文档中都不起作用:

% !TeX program = xelatex
\documentclass{minimal}
\usepackage{fontspec}
\defaultfontfeatures{Ligatures=TeX}
\setmainfont{UnifrakturMaguntia19}
\begin{document}
H-Milch
i-Punkt
100-prozentig
\end{document}

日志:

This is XeTeX, Version 3.14159265-2.6-0.999992 (MiKTeX 20.11) (preloaded format=xelatex 2020.11.27)  27 NOV 2020 21:13
entering extended mode
**./document.tex
(document.tex
LaTeX2e <2020-10-01> patch level 2
L3 programming layer <2020-10-27> xparse <2020-03-03>
(C:\Users\User\AppData\Local\Programs\MiKTeX\tex/latex/base\minimal.cls
Document Class: minimal 2001/05/25 Standard LaTeX minimal class
) (C:\Users\User\AppData\Local\Programs\MiKTeX\tex/latex/fontspec\fontspec.sty
(C:\Users\User\AppData\Local\Programs\MiKTeX\tex/latex/l3packages/xparse\xparse
.sty (C:\Users\User\AppData\Local\Programs\MiKTeX\tex/latex/l3kernel\expl3.sty
Package: expl3 2020-10-27 L3 programming layer (loader) 

(C:\Users\User\AppData\Local\Programs\MiKTeX\tex/latex/l3backend\l3backend-xete
x.def
File: l3backend-xetex.def 2020-09-24 L3 backend support: XeTeX
\g__graphics_track_int=\count171
\l__pdf_internal_box=\box47
\g__pdf_backend_object_int=\count172
\g__pdf_backend_annotation_int=\count173
))
Package: xparse 2020-10-27 L3 Experimental document command parser

(C:\Users\User\AppData\Local\Programs\MiKTeX\tex/latex/l3packages/xparse\xparse
-generic.tex))
Package: fontspec 2020/02/21 v2.7i Font selection for XeLaTeX and LuaLaTeX

(C:\Users\User\AppData\Local\Programs\MiKTeX\tex/latex/fontspec\fontspec-xetex.
sty
Package: fontspec-xetex 2020/02/21 v2.7i Font selection for XeLaTeX and LuaLaTe
X
\l__fontspec_script_int=\count174
\l__fontspec_language_int=\count175
\l__fontspec_strnum_int=\count176
\l__fontspec_tmp_int=\count177
\l__fontspec_tmpa_int=\count178
\l__fontspec_tmpb_int=\count179
\l__fontspec_tmpc_int=\count180
\l__fontspec_em_int=\count181
\l__fontspec_emdef_int=\count182
\l__fontspec_strong_int=\count183
\l__fontspec_strongdef_int=\count184
\l__fontspec_tmpa_dim=\dimen138
\l__fontspec_tmpb_dim=\dimen139
\l__fontspec_tmpc_dim=\dimen140
 (C:\Users\User\AppData\Local\Programs\MiKTeX\tex/latex/base\fontenc.sty
Package: fontenc 2020/08/10 v2.0s Standard LaTeX package
)
(C:\Users\User\AppData\Local\Programs\MiKTeX\tex/latex/fontspec\fontspec.cfg)))

Package fontspec Info: Could not resolve font "UnifrakturMaguntia19/BI" (it
(fontspec)             probably doesn't exist).


Package fontspec Info: Could not resolve font "UnifrakturMaguntia19/B" (it
(fontspec)             probably doesn't exist).


Package fontspec Info: Could not resolve font "UnifrakturMaguntia19/I" (it
(fontspec)             probably doesn't exist).


Package fontspec Info: Font family 'UnifrakturMaguntia19(0)' created for font
(fontspec)             'UnifrakturMaguntia19' with options
(fontspec)             [Ligatures=TeX,Ligatures=TeX].
(fontspec)              
(fontspec)              This font family consists of the following NFSS
(fontspec)             series/shapes:
(fontspec)              
(fontspec)             - 'normal' (m/n) with NFSS spec.:
(fontspec)             <->"UnifrakturMaguntia19/OT:script=latn;language=dflt;ma
pping=tex-text;"
(fontspec)             - 'small caps'  (m/sc) with NFSS spec.: 

(document.aux)
\openout1 = `document.aux'.

LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 6.
LaTeX Font Info:    ... okay on input line 6.
LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 6.
LaTeX Font Info:    ... okay on input line 6.
LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 6.
LaTeX Font Info:    ... okay on input line 6.
LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 6.
LaTeX Font Info:    ... okay on input line 6.
LaTeX Font Info:    Checking defaults for TS1/cmr/m/n on input line 6.
LaTeX Font Info:    Trying to load font information for TS1+cmr on input line 6
.

(C:\Users\User\AppData\Local\Programs\MiKTeX\tex/latex/base\ts1cmr.fd
File: ts1cmr.fd 2019/12/16 v2.5j Standard LaTeX font definitions
)
LaTeX Font Info:    ... okay on input line 6.
LaTeX Font Info:    Checking defaults for TU/lmr/m/n on input line 6.
LaTeX Font Info:    ... okay on input line 6.
LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 6.
LaTeX Font Info:    ... okay on input line 6.
LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 6.
LaTeX Font Info:    ... okay on input line 6.

Package fontspec Info: Adjusting the maths setup (use [no-math] to avoid
(fontspec)             this).

\symlegacymaths=\mathgroup4
LaTeX Font Info:    Overwriting symbol font `legacymaths' in version `bold'
(Font)                  OT1/cmr/m/n --> OT1/cmr/bx/n on input line 6.
LaTeX Font Info:    Redeclaring math accent \acute on input line 6.
LaTeX Font Info:    Redeclaring math accent \grave on input line 6.
LaTeX Font Info:    Redeclaring math accent \ddot on input line 6.
LaTeX Font Info:    Redeclaring math accent \tilde on input line 6.
LaTeX Font Info:    Redeclaring math accent \bar on input line 6.
LaTeX Font Info:    Redeclaring math accent \breve on input line 6.
LaTeX Font Info:    Redeclaring math accent \check on input line 6.
LaTeX Font Info:    Redeclaring math accent \hat on input line 6.
LaTeX Font Info:    Redeclaring math accent \dot on input line 6.
LaTeX Font Info:    Redeclaring math accent \mathring on input line 6.
LaTeX Font Info:    Redeclaring math symbol \colon on input line 6.
LaTeX Font Info:    Redeclaring math symbol \Gamma on input line 6.
LaTeX Font Info:    Redeclaring math symbol \Delta on input line 6.
LaTeX Font Info:    Redeclaring math symbol \Theta on input line 6.
LaTeX Font Info:    Redeclaring math symbol \Lambda on input line 6.
LaTeX Font Info:    Redeclaring math symbol \Xi on input line 6.
LaTeX Font Info:    Redeclaring math symbol \Pi on input line 6.
LaTeX Font Info:    Redeclaring math symbol \Sigma on input line 6.
LaTeX Font Info:    Redeclaring math symbol \Upsilon on input line 6.
LaTeX Font Info:    Redeclaring math symbol \Phi on input line 6.
LaTeX Font Info:    Redeclaring math symbol \Psi on input line 6.
LaTeX Font Info:    Redeclaring math symbol \Omega on input line 6.
LaTeX Font Info:    Redeclaring math symbol \mathdollar on input line 6.
LaTeX Font Info:    Redeclaring symbol font `operators' on input line 6.
LaTeX Font Info:    Encoding `OT1' has changed to `TU' for symbol font
(Font)              `operators' in the math version `normal' on input line 6.
LaTeX Font Info:    Overwriting symbol font `operators' in version `normal'
(Font)                  OT1/cmr/m/n --> TU/UnifrakturMaguntia19(0)/m/n on input
 line 6.
LaTeX Font Info:    Encoding `OT1' has changed to `TU' for symbol font
(Font)              `operators' in the math version `bold' on input line 6.
LaTeX Font Info:    Overwriting symbol font `operators' in version `bold'
(Font)                  OT1/cmr/bx/n --> TU/UnifrakturMaguntia19(0)/m/n on inpu
t line 6.
LaTeX Font Info:    Overwriting symbol font `operators' in version `normal'
(Font)                  TU/UnifrakturMaguntia19(0)/m/n --> TU/UnifrakturMagunti
a19(0)/m/n on input line 6.
LaTeX Font Info:    Overwriting math alphabet `\mathit' in version `normal'
(Font)                  OT1/cmr/m/it --> TU/UnifrakturMaguntia19(0)/m/it on inp
ut line 6.
LaTeX Font Info:    Overwriting math alphabet `\mathbf' in version `normal'
(Font)                  OT1/cmr/bx/n --> TU/UnifrakturMaguntia19(0)/b/n on inpu
t line 6.
LaTeX Font Info:    Overwriting math alphabet `\mathsf' in version `normal'
(Font)                  OT1/cmss/m/n --> TU/lmss/m/n on input line 6.
LaTeX Font Info:    Overwriting math alphabet `\mathtt' in version `normal'
(Font)                  OT1/cmtt/m/n --> TU/lmtt/m/n on input line 6.
LaTeX Font Info:    Overwriting symbol font `operators' in version `bold'
(Font)                  TU/UnifrakturMaguntia19(0)/m/n --> TU/UnifrakturMagunti
a19(0)/b/n on input line 6.
LaTeX Font Info:    Overwriting math alphabet `\mathit' in version `bold'
(Font)                  OT1/cmr/bx/it --> TU/UnifrakturMaguntia19(0)/b/it on in
put line 6.
LaTeX Font Info:    Overwriting math alphabet `\mathsf' in version `bold'
(Font)                  OT1/cmss/bx/n --> TU/lmss/b/n on input line 6.
LaTeX Font Info:    Overwriting math alphabet `\mathtt' in version `bold'
(Font)                  OT1/cmtt/m/n --> TU/lmtt/b/n on input line 6.
Missing character: There is no - in font UnifrakturMaguntia19/OT:script=latn;la
nguage=dflt;mapping=tex-text;!
Missing character: There is no - in font UnifrakturMaguntia19/OT:script=latn;la
nguage=dflt;mapping=tex-text;!
Missing character: There is no - in font UnifrakturMaguntia19/OT:script=latn;la
nguage=dflt;mapping=tex-text;!
 [1]
(document.aux) ) 
Here is how much of TeX's memory you used:
 2582 strings out of 414107
 90154 string characters out of 2880832
 402076 words of memory out of 3000000
 22042 multiletter control sequences out of 15000+200000
 535144 words of font info for 36 fonts, out of 3000000 for 9000
 14 hyphenation exceptions out of 8191
 78i,4n,86p,267b,224s stack positions out of 5000i,500n,10000p,200000b,50000s

Output written on document.pdf (1 page).

答案1

您不应该使用19变体字体,而应该使用标准字体。

我从 SourceForge 下载了字体并解压了存档。在顶层目录中,我准备了文件

\documentclass{article}
\usepackage{fontspec}
\setmainfont{UnifrakturMaguntia}[Path=./,Extension=.ttf]
\newfontfamily{\nineteen}{UnifrakturMaguntia19}[Path=./switched-on_features/,Extension=.ttf]
\begin{document}
H-Milch
i-Punkt
100-prozentig

\nineteen
H-Milch
i-Punkt
100-prozentig
\end{document}

我得到了

在此处输入图片描述

目录中的字体switched-on_features已根据下表启用功能

在此处输入图片描述

你可以通过将选项传递给 来启用每个功能\setmainfont。例如,为了启用,ss01你可以这样做

\setmainfont{UnifrakturMaguntia}[
  Path=./, % adjust the path or remove this if the font is installed system-wide
  Extension=.ttf, % remove if the font is installed system-wide
  StylisticSet=1,
]

StylisticSet={1,2}您启用ss01和时ss02

对于cv变体,您可以添加以下选项

CharacterVariant={11,14}

同时启用cv11cv14。对于lnum选项是Numbers=Lining,对于hlig它是Ligatures={TeX,Historical}(您还想保留 TeX 样式的连字)。

答案2

根据您的日志,您使用的字体版本不包含连字符减号。

当我用完整版字体并根据文档设置与 UnifrakturMaguntia19 相同的选项,它对我有用,使用双连字符:

% !TeX program = xelatex
\documentclass{minimal}
\tracinglostchars=2
\usepackage{fontspec}
\defaultfontfeatures{Ligatures=TeX}
\setmainfont{UnifrakturMaguntia.ttf}[
  Ligatures={Common,Historic},
  CharacterVariant={11,13,14,19},
  Numbers=Lining] % 19th-century options.

\begin{document}
H-Milch
i-Punkt
100-prozentig
\end{document}

这应该会按照您加载的字体应有的方式工作,并且不会损坏。(编号变体实际上适用于作者无法单独选择 OpenType 功能的应用程序。)

您可能还想看看是否有更新的版本UnifrakturMaguntia19.ttf可以解决此问题。

相关内容