XelaTeX で文書のフォントを変更する

XelaTeX で文書のフォントを変更する

そこで、履歴書のテンプレートをダウンロードしました。XeLaTeX を使用しています。フォントを変更したいのですが、どうすればいいのかわからず、絶望しています。私の OS は Windows 7 です。ここに、オリジナルのフォント Fontin を使用する機能コードがあります。これをダウンロードして動作させましたが、別のフォント (アクセントを使用するフォント (私はフランス語を話します)) を使用したいと思います。

\documentclass[a4paper,10pt]{article} % Default font size and paper size
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{textpos}
\usepackage{fontspec} % For loading fonts
\defaultfontfeatures{Mapping=tex-text}
\setmainfont[SmallCapsFont = Fontin SmallCaps]{Fontin}

\usepackage{xunicode,xltxtra,url,parskip} % Formatting packages

\usepackage[usenames,dvipsnames]{xcolor} % Required for specifying custom colors

\usepackage[big]{layaureo} 

\usepackage{hyperref} % Required for adding links   and customizing them
\definecolor{linkcolour}{rgb}{0,0.2,0.6} % Link color
\hypersetup{colorlinks,breaklinks,urlcolor=linkcolour,linkcolor=linkcolour} % Set link colors throughout the document

\usepackage{titlesec} % Used to customize the \section command
\titleformat{\section}{\Large\raggedright}{}{0em}{} % Text formatting of sections
\titlespacing{\section}{0pt}{2pt}{2pt} % Spacing around sections
\usepackage{vmargin}
\usepackage{fullpage}

\begin{document}
\setmarginsrb{25mm}{0mm}{30mm}{0mm}{1cm}{5mm}{1mm}{10mm}
\pagestyle{empty} % Removes page numbering

\font\fb=''[cmr10]'' % Change the font of the \LaTeX command under the skills section

\par{\Huge TacTac \textsc{TicToc} - OncheOnche \bigskip\par} 
\par{\Huge \hspace{8mm}  huehuehue \bigskip\par}

\section{Données personnelles}
\begin{textblock}{.9}(0,0)
\rule{97mm}{0.09mm}
\end{textblock}
\begin{tabular}{rl}
\textsc{Date de naissance:} & 01 brumeneige 3030 \\
\textsc{Adresse:} & Somewhere, sometimes \\
\textsc{Téléphone:} & +123456789\\
\textsc{Email:} & what about
\end{tabular}


\section{Objectifs}\titlerule

I met a traveler from an antic land who said : Two vast and trunkless legs of stone stand in the desert... \\

%----------------------------------------------------------------------------------------
%   EDUCATION
%-------------------------------------------------------------------------------                      ---------



\end{document}

問題はラインから来ていると思う

\defaultfontfeatures{Mapping=tex-text}
\setmainfont[SmallCapsFont = Fontin SmallCaps]{Fontin}

しかし、何を変更する必要があるのか​​、コンパイラはどこでフォントを探すのかがわかりません... 私の質問と似たような他の質問も見ましたが、すべて Linux を使用していました。また、フォント名にスペースを使用すると問題が発生する可能性があることも知りました (本当ですか...?)... とにかく、誰かアイデアはありますか?

答え1

この質問に必要な最低限の文書に絞り込む(最小限の動作例 (MWE)詳細については、以下を参照してください)。ドキュメントのメインフォントを変更する方法は次のとおりです\setmainfont

\documentclass{article}
\usepackage{lipsum} % add nonsense text
\usepackage{fontspec}
    \setmainfont{Arial}

\begin{document}
\lipsum[1]
\end{document}

ここに画像の説明を入力してください

答え2

これは私にとってはうまくいきます:

\documentclass[a4paper,10pt]{article} % Default font size and paper size
\usepackage{fontspec} % For loading fonts
\setmainfont[SmallCapsFont=Fontin SmallCaps]{Fontin-Regular}

\usepackage{url,parskip} % Formatting packages
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{textpos}
\usepackage[usenames,dvipsnames]{xcolor} % Required for specifying custom colors    
\usepackage[big]{layaureo}     

\usepackage{titlesec} % Used to customize the \section command
\titleformat{\section}{\Large\raggedright}{}{0em}{} % Text formatting of sections
\titlespacing{\section}{0pt}{2pt}{2pt} % Spacing around sections
\usepackage{hyperref} % Required for adding links   and customizing them
\hypersetup{colorlinks,breaklinks,urlcolor=linkcolour,linkcolor=linkcolour} % Set link colors throughout the document
\definecolor{linkcolour}{rgb}{0,0.2,0.6} % Link color

\usepackage{vmargin}
\usepackage{fullpage}

\begin{document}
    \setmarginsrb{25mm}{0mm}{30mm}{0mm}{1cm}{5mm}{1mm}{10mm}
    \pagestyle{empty} % Removes page numbering

    \par{\Huge TacTac \textsc{TicToc} - OncheOnche \bigskip\par} 
    \par{\Huge \hspace{8mm}  huehuehue \bigskip\par}

    \section{Données personnelles}
    \begin{textblock}{.9}(0,0)
        \rule{97mm}{0.09mm}
    \end{textblock}
    \begin{tabular}{rl}
        \textsc{Date de naissance:} & 01 brumeneige 3030 \\
        \textsc{Adresse:} & Somewhere, sometimes \\
        \textsc{Téléphone:} & +123456789\\
        \textsc{Email:} & what about
    \end{tabular}

    \section{Objectifs}\titlerule

    I met a traveler from an antic land who said : Two vast and trunkless legs of stone stand in the desert... \\

    %----------------------------------------------------------------------------------------
    %   EDUCATION
    %-------------------------------------------------------------------------------                      ---------

\end{document}

ここに画像の説明を入力してください

関連情報