Hot answers tagged

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 ...


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 ; ...


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} \...


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 ...


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}


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? ...


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 \...


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 ...


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} \...


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 ...


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\...


3

Use the newunicodechar package to redefine a single glyph. Also load the surrogate font using fontspec instead of \font. I downloaded the OpenType variant of Fontin from here (No worries, Fontin is free!). \documentclass{article} \usepackage{fontspec} \setmainfont[ Extension = .otf, UprightFont = *-Regular, SmallCapsFont=*-SmallCaps ]{Fontin} \...


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).


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 ...


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{...


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 ...


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 ...


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 ...



Only top voted, non community-wiki answers of a minimum length are eligible