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}

여기에 이미지 설명을 입력하세요

관련 정보