New answers tagged

4

Don't use inputenc or fontenc with xetex. Use fontspec and then specify any opentype font you have on your system. I used one example below. \documentclass[10pt,foldmark,notumble]{leaflet} %\usepackage[utf8]{inputenc} \usepackage[frenchb]{babel} \renewcommand*\foldmarkrule{.3mm} \renewcommand*\foldmarklength{5mm} \usepackage{url} \usepackage{amsmath} %\...


5

The convertor from DVI to HTML doesn't support OpenType fonts, which is automatically selected when the Fontspec package is loaded. This is well known tex4ht bug and also one which is hardest to fix. There are two possible workarounds, both of them require modification of the document, unfortunately. First is to use conditionally luainputenc package: \...


4

You have to confine the font selection only where needed. \documentclass{article} \usepackage{fontspec}% typeset with xelatex \usepackage{tikz} \usepackage{xstring} \usepackage{multicol} \defaultfontfeatures{Extension=.otf} \usepackage{fontawesome} \begingroup\lccode`\|=`\\ \lowercase{\endgroup\def\removebs#1{\if#1|\else#1\fi}} \newcommand{\macroname}[1]{\...


1

Disclaimer: I am the author of the package discussed below. This does not answer the question as such. Rather, it answers a related question which is how the same thing may be done using pdfLaTeX or, indeed, LaTeX. I assume this is legitimate since when people ask how to use a font, even if they specifically say they can't use Xe/LuaTeX, enthusiasts ...


3

luatex has removed the fontforge libraries and with them dfont support. https://github.com/lualatex/luaotfload/blob/master/NEWS there seem to be many sites and applications offering free dfont conversions, so if the font licence allows it that is a possibility, or you could use one of the many Helvetica style fonts such as Tex gyre heros or URW Nim­bus ...


0

Solution - perhaps should be obvious for people more use to latex, but it was not to me after looking at previous posts: After downloading expl3 packages, run latex on l3.ins in the directory to extract .sty files from .dtx ones. (Thanks to Andy Swann)


3

Before fontspec is loaded the document class defines all font sizes, the reason why Latin Modern is used here as a default. However, after loading fontspec and using \setmainfont everything is redefined. Compare the output: in the left column there is Minion Pro and in the right Latin Modern. \documentclass[twocolumn]{article} \usepackage{fontspec} \...


4

Section 8.6 of the fontspec manual says: [...] OpenType fonts with optical scaling will exist in several discrete sizes, and these will be selected by XETEX and LuaTEX automatically determined by the current font size [...] But it can only do so, if it gets the information it needs to make this automatical selection. What information does it need? ...


1

My advice is to not use Scale in this way. You'll note that you are defining a 'new font family' with \newfontfamily, so it is not reasonable to expect it to intuit that this 'new' family is in fact not new. Perhaps a better way is to use the regular LaTeX2e font command, \DeclareTextCommand: \documentclass[10pt]{article} \parindent 0pt \usepackage{...


5

use the SizeFeature instead of Scale. The last line shows that the two 10pt lines have the same height: \documentclass[10pt]{article} \usepackage{fontspec} \parindent=0pt \setmainfont{DejaVu Serif} \setsansfont[Scale=MatchLowercase]{Latin Modern Sans} \newfontfamily\dejavuseriften[SizeFeatures={Size=10}]{DejaVu Serif} \newfontfamily\dejavuseriftwelve[...


5

If I reorganize the preamble like below, the \Gamma appears. \documentclass[12pt]{article} \usepackage[spanish,es-nodecimaldot,es-lcroman]{babel} \usepackage[export]{adjustbox} \usepackage{amsmath} \let\hbar\relax \usepackage[lite]{mtpro2} \usepackage{sectsty} \usepackage{subcaption} \usepackage{arydshln} \usepackage{fontspec} \setmainfont{Baskerville} \...


1

This can help until issue will be fixed and uploaded to distributions. \documentclass{book} \usepackage{fontspec} \setmainfont{arial}[ %Need such long loading because of luaotfload issue Extension = .ttf, UprightFont = *, BoldFont = *bd, ItalicFont = *i, BoldItalicFont = *bi] \newfontfamily\cyrillicfont{arial}[ %for Cyrillic users ...


4

Adapting the code by Andrey Vihrov to your needs and to the changed number of character classes, I can offer \documentclass{article} \usepackage{fontspec} \XeTeXinterchartokenstate=1 \newXeTeXintercharclass \uppercaseclass \makeatletter % Assign the new class to all Latin capital letters \@tempcnta=`\A \loop\unless\ifnum\@tempcnta>`\Z \...


8

With luatex/luaotfload you can (in texlive 2016 and up-to-date miktex) build a combo font. Imho there is no high-level interface yet, but beside this it works: \documentclass[]{article} \usepackage{fontspec} \font \one = file:EBGaramond12-Italic.otf \font \two = file:EBGaramond12-Regular.otf \font \onetwo = "combo: 1 -> \fontid \one ; ...


3

You could make use of the selnolig package. Its main purpose is to let users suppress ligatures selectively, e.g., to suppress ligatures if they cross morpheme boundaries in composite words. (For instance, in the TeXbook, Don Knuth mentions the word "shelfful" as a word in which the ff ligature shouldn't be used.) However, the selnolig package can also be ...


3

If "LaTeX" means pdflatex you can use microtype: \documentclass[10pt]{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{microtype} \begin{document} ABC \textls[500]{ABC} \end{document}


3

It should work using \r or just using m̊ \documentclass{article} \usepackage{fontspec} \setmainfont{Charis SIL} \begin{document} \r{m}abcdefgh m̊abcdefgh \end{document} (Using luatex from texlive 2016)


3

You don't need to give an explicit path, so long as the font is in a directory searched by XeTeX. The relevant (pseudo)environment variables are % TrueType outline fonts. TTFONTS = .;$TEXMF/fonts/{truetype,opentype}//;$OSFONTDIR// % OpenType outline fonts. OPENTYPEFONTS = .;$TEXMF/fonts/{opentype,truetype}//;$OSFONTDIR// A user can set in the environment ...


2

Use \setmonofont{Inconsolatazi4} or \setmonofont[ BoldFont=Inconsolatazi4-Bold.otf]{Inconsolatazi4-Regular.otf} By default fontconfig, which is used by xetex/xelatex for searching font files do not scan the TeX font directories. But xetex/xelatex use kpsewhich, the reason why it will find fonts with the full name. One can put these files into ...


3

There's nothing more than a visual comparison, showing that ptm is exactly the same as what you get with TeX Gyre Termes. \documentclass{article} \usepackage{amsmath} \usepackage{fontspec} \setmainfont{TeX Gyre Termes} \newfontfamily{\OTIMES}{Times New Roman} \def\fn"#1/#2"{#1}% \begin{document} {\OTIMES abcdefghijklmnopqrstuvwxyzfifl \expandafter\fn\...


5

I know the OP wants Xelatex solutions, and here I give a pdf solution, so i don't expect any votes, but wanted to show it anyhow, because it is so less grainy than the other answer of mine. For this different answer, I steal from our most excellent LaTeX colleague Malipivo, extracting bits of \pdfliteral code from his answer at TikZ: halo around text? that ...


8

Once you download the font, extract the .zip contents to your ~/.fonts directory and run fc-cache. Then, you can use the \fontspec package, loading the font with \setmainfont{Coolvetica} (if you want your entire document to use Coolvetica) or \setsansfont{Coolvetica} (if you want Coolvetica to appear only when you call \sffamily). Your document should look ...


1

The file is quite old, in comparison to the big developments on XeTeX and fontspec that have been made in the last eight years. Here's a fixed version that works well. Note that I'm on a Mac OS X machine, where Zapfino is provided along with the operating system. However, the font is not free, so you have to buy it in order to be able of exploiting its ...


4

\QPCSymbols doesn't take an argument, it is a switch. So with \QPCSymbols{\XeTeXglyph 32} you are actually activating your font for the rest of the document and as it hasn't much glyphs you don't see anything. Move the brace before the command to group the effect: {\QPCSymbols\XeTeXglyph 32}


2

This is probably just a typo: The font's name is Linux Libertine O with the letter O for OpenType and not 0 (zero).



Top 50 recent answers are included