The document body font is Times New Roman-like. Sans serif font
is Helvetica-like. Both regular and condensed variant of sans serif is used.
With fontspec
package it can be obtained with:
\RequirePackage{ifxetex} %% \ifxetex %% xetex \RequirePackage{fontspec} \usepackage{polyglossia} \setdefaultlanguage{polish} \setmainfont{TeX Gyre Termes} \setsansfont{TeX Gyre Heros} \defaultfontfeatures{Mapping=tex-text} \newfontfamily\PM@SansCondensed{TeX Gyre Heros Cn} %% \usepackage{xunicode,xltxtra} \else %% conventional TeX \RequirePackage{tgtermes,txfonts,qtxmath} %% txfonts \def\PM@SansCondensed{\fontfamily{qhvc}} \fi
With the help of \ifxetex
command from ifxetex
package
the code above works when compiled both with xetex
as well as conventional pdflatex
.
The example below illustrates how \PM@SectionFont
can be used
to switch to condensed variant of sans serif:
\renewcommand{\section}{\@startsection{section}{1}{\z@}% {-3.5ex \@plus -1ex \@minus -.2ex}% {2.3ex \@plus.2ex}% {\reset@font \PM@SectionFont \raggedright}}
Finally, a few words how to configure system (a Linux one, BTW strictly speaking MS Windows is not a system) to work with OpenType fonts.
Providing the TeX Gyre fonts package is installed (with tlmgr
in case of TeXLive for example)
all .otf
files are located in
~/2011/texmf-dist/fonts/opentype/public/tex-gyre
(where ~
denotes
the root of TeXlive distribution).
To add all TeX Gyre fonts to system resources it suffice to
create /etc/fonts/local.conf
with the following content:
<?xml version='1.0'?> <!DOCTYPE fontconfig SYSTEM 'fonts.dtd'> <!-- /etc/fonts/local.conf file for local customizations --> <fontconfig> <!-- Font directory list --> <dir>/usr/local/texlive/2011/texmf-dist/fonts/opentype/public/tex-gyre</dir> </fontconfig>
Or similar, if root of TeXlive distribution is not /usr/local/
.
Now run as root
fc-cache
Check if everything is OK:
fc-list | grep -i Heros
Information on TeX Gyre Heros should be displayed on screen:
TeX Gyre Heros Cn:style=Bold TeX Gyre Heros Cn:style=Bold Italic TeX Gyre Heros:style=Regular TeX Gyre Heros Cn:style=Regular TeX Gyre Heros:style=Bold Italic TeX Gyre Heros:style=Italic TeX Gyre Heros Cn:style=Italic TeX Gyre Heros:style=Bold
Poniżej skrypt zamieniający font w formacie OpenType na TrueType.
#!/usr/local/bin/fontforge # Quick and dirty hack: converts a font to truetype (.ttf) # cf. http://www.stuermer.ch/blog/convert-otf-to-ttf-font-on-ubuntu.html Print("Opening "+$1); Open($1); Print("Saving "+$1:r+".ttf"); Generate($1:r+".ttf"); Quit(0);
Czy konwersja jest w 100% OK nie jest do końca pewne bo podobno gubiona jest informacja na temat par kernowych.