我如何知道 LyX 使用哪种字体文件?

我如何知道 LyX 使用哪种字体文件?

当我在 LyX 上编译文件时,我想知道它使用了哪些字体文件。
我之所以问这个问题,是因为我的一些字体出现了一些问题 - 我当然知道它们的名字,但我不确定 LyX 使用了哪些文件......

我在 TeXWorks 也遇到了同样的事情,所以如果有人知道如何从中得到它 - 那也会很好!

目前我从 TeXWorks 获得的唯一东西是:

LaTeX Font Warning: Font shape `TU/DavidCLM(0)/m/it' undefined
(Font)              using `TU/DavidCLM(0)/m/n' instead on input line 56.

以下是 MWE:

 % Preview source code

%% LyX 2.3.1-1 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[a4paper,english,hebrew]{article}
\usepackage{fontspec}
\usepackage{fancyhdr}
\pagestyle{fancy}
\setlength{\parindent}{0bp}

\makeatletter

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
\pdfpageheight\paperheight
\pdfpagewidth\paperwidth


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
\usepackage{theorem}
\theorembodyfont{\upshape}
\newtheorem{theorem}{\R{משפט}}[section]
\AtBeginDocument{\make@lr\thetheorem}

% The following chunk fixes export with XeTeX.
% It is needed because polyglossia is used by default
% and \make@lr is only defined by babel.
\@ifundefined{make@lr}
{\def\make@lr#1{\begingroup
    \toks@=\expandafter{#1}%
    \edef\x{\endgroup
  \def\noexpand#1{\noexpand\@number{\the\toks@}}}%
  \x}}{\relax}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\newfontfamily\hebrewfont[Script=Hebrew]{David CLM}
\newfontfamily\hebrewfonttt[Script=Hebrew]{Miriam Mono CLM}
\newfontfamily\hebrewfontsf[Script=Hebrew]{Simple CLM}
\AtBeginDocument{
\renewcommand\footnoterule{%
  \kern -3pt
  \hbox to \textwidth{\hfill\vrule height 0.4pt width .4\textwidth}
  \kern 2.6pt
}}

\setmainfont{DavidCLM-Medium.otf}[
BoldFont = DavidCLM-Bold.otf ,
ItalicFont = DavidCLM-MediumItalic.otf ,
BoldItalicFont = DavidCLM-BoldItalic.otf ]


\makeatother

\usepackage{polyglossia}
\setdefaultlanguage{hebrew}
\setotherlanguage{english}
\begin{document}

\emph{שלום}
\end{document}

字体(不是.otf.ttf)可以从这里下载:http://www.ma.huji.ac.il/~sameti/tex/culmusmiktex.html
直接链接:http://www.ma.huji.ac.il/~sameti/tex/culmusmiktex0.2.2.zip

ttf可以otf从这里下载:
https://sourceforge.net/projects/culmus/files/culmus/0.133/
(第二個文件....)

谢谢你!!

答案1

我认为我解决了这个问题。
我不知道 LyX(或 TeXWorks)使用哪些文件,但我用斜体形式解决了这个问题:

这一行:\newfontfamily\hebrewfont[Script=Hebrew]{David CLM}应该被这些行替换:

    setmainfont{DavidCLM-Medium.otf}[
    BoldFont = DavidCLM-Bold.otf ,
    ItalicFont = DavidCLM-MediumItalic.otf ,
    BoldItalicFont = DavidCLM-BoldItalic.otf ]

也许存在问题,因为文件的名称(中等的单词),但我不知道具体原因。当我改变它时 - 我得到了斜体形式。这是 MWE:

% Preview source code

%% LyX 2.3.1-1 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[a4paper,english,hebrew]{article}
\usepackage{fontspec}
\usepackage{fancyhdr}
\pagestyle{fancy}
\setlength{\parindent}{0bp}

\makeatletter

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
\pdfpageheight\paperheight
\pdfpagewidth\paperwidth


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
\usepackage{theorem}
\theorembodyfont{\upshape}
\newtheorem{theorem}{\R{משפט}}[section]
\AtBeginDocument{\make@lr\thetheorem}

% The following chunk fixes export with XeTeX.
% It is needed because polyglossia is used by default
% and \make@lr is only defined by babel.
\@ifundefined{make@lr}
{\def\make@lr#1{\begingroup
    \toks@=\expandafter{#1}%
    \edef\x{\endgroup
  \def\noexpand#1{\noexpand\@number{\the\toks@}}}%
  \x}}{\relax}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\setmainfont{DavidCLM-Medium.otf}[
BoldFont = DavidCLM-Bold.otf ,
ItalicFont = DavidCLM-MediumItalic.otf ,
BoldItalicFont = DavidCLM-BoldItalic.otf ]
\newfontfamily\hebrewfonttt[Script=Hebrew]{Miriam Mono CLM}
\newfontfamily\hebrewfontsf[Script=Hebrew]{Simple CLM}
\AtBeginDocument{
\renewcommand\footnoterule{%
  \kern -3pt
  \hbox to \textwidth{\hfill\vrule height 0.4pt width .4\textwidth}
  \kern 2.6pt
}}

\makeatother

\usepackage{polyglossia}
\setdefaultlanguage{hebrew}
\setotherlanguage{english}
\begin{document}

\emph{שלום}
\end{document}

在此处输入图片描述

相关内容