{"id":123,"date":"2009-11-10T12:50:55","date_gmt":"2009-11-10T11:50:55","guid":{"rendered":"\/Blog\/?p=123"},"modified":"2019-01-16T12:08:28","modified_gmt":"2019-01-16T11:08:28","slug":"truetype-and-type1-fonts-in-texlivexetex","status":"publish","type":"post","link":"https:\/\/seegras.discordia.ch\/Blog\/truetype-and-type1-fonts-in-texlivexetex\/","title":{"rendered":"TrueType- and Type1-Fonts in Texlive\/Xetex"},"content":{"rendered":"<p>Font-Management in TeX is a huge mess. It&#8217;s such a mess that there is not even one coherent tutorial on how to install fonts exists, and nobody ever automated it. Imagine: You put your TrueType or Type1 fonts somewhere into \/usr\/share\/fonts, your system regenerates its font-cache, and they not only are available for KDE, Gnome, Mozilla and OpenOffice, but also for TeX? You wish. Instead you&#8217;re expected to produce custom font-encoding files by hand, extract font-metric-files (tfm) out of TrueType-files, invent 6-letter font-shortcut-names, and edit some other files in order that TeX can find them with these shortcut-names. In other words, the whole thing should be burned at the stake, shredded, buried and shot into outer space.<\/p>\n<p>The only thing that actually works out of the Box is XeTeX\/XeLaTeX:<\/p>\n<p><code>apt-get install texlive-xetex<\/code><\/p>\n<p>Now you need to know the correct name of the font you want to use, as reported by fc-list:<\/p>\n<p><code>$ fc-list | grep Bastarda<br \/>\nMA Bastarda1 15th:style=Normal<\/code><\/p>\n<p>And you can use this in TeX-documents:<\/p>\n<p><code>\\documentclass{article}<br \/>\n\\usepackage{fontspec,xunicode,xltxtra}<br \/>\n\\setmainfont{MA Bastarda1 15th}<br \/>\n\\begin{document}<br \/>\nTest. Umlauts need to be UTF-8 encoded: \u00c3\u20ac\u00c3\u00b6\u00c3\u0152<br \/>\n\\end{document}<\/code><\/p>\n<p>If your TeX-document happens to use utf8mb4 instead of utf8, recode will help:<\/p>\n<p><code>recode utf8mb4..utf8 whetever.tex<\/code><\/p>\n<p>Now you need to use xelatex instead of texi2pdf or pdflatex to produce a pdf-file:<\/p>\n<p><code>$ xelatex whatever.tex<\/code><\/p>\n<p>That&#8217;s it, and that&#8217;s how it should bloody work everywhere, with every TeX-util of the day you might want to use.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Font-Management in TeX is a huge mess. It&#8217;s such a mess that there is not even one coherent tutorial on how to install fonts exists, and nobody ever automated it. Imagine: You put your TrueType or Type1 fonts somewhere into \/usr\/share\/fonts, your system regenerates its font-cache, and they not only are available for KDE, Gnome, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,94],"tags":[47,43,42,41,45,46,44],"class_list":["post-123","post","type-post","status-publish","format-standard","hentry","category-computers","category-latex-computers","tag-font","tag-latex","tag-tex","tag-texlive","tag-truetype","tag-type1","tag-xetex"],"_links":{"self":[{"href":"https:\/\/seegras.discordia.ch\/Blog\/wp-json\/wp\/v2\/posts\/123","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/seegras.discordia.ch\/Blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/seegras.discordia.ch\/Blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/seegras.discordia.ch\/Blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/seegras.discordia.ch\/Blog\/wp-json\/wp\/v2\/comments?post=123"}],"version-history":[{"count":7,"href":"https:\/\/seegras.discordia.ch\/Blog\/wp-json\/wp\/v2\/posts\/123\/revisions"}],"predecessor-version":[{"id":1172,"href":"https:\/\/seegras.discordia.ch\/Blog\/wp-json\/wp\/v2\/posts\/123\/revisions\/1172"}],"wp:attachment":[{"href":"https:\/\/seegras.discordia.ch\/Blog\/wp-json\/wp\/v2\/media?parent=123"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/seegras.discordia.ch\/Blog\/wp-json\/wp\/v2\/categories?post=123"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/seegras.discordia.ch\/Blog\/wp-json\/wp\/v2\/tags?post=123"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}