Tag Info

Hot answers tagged

17

With \usepackage{fourier} you are simply ignoring fontspec and using a family of “classical” 256 character font. You can use classical fonts with LuaLaTeX, without loading fontspec, but luainputenc: \documentclass{article} \usepackage{ifluatex} \usepackage[TS1,T1]{fontenc} % load TS1 so luainputenc will know \ifluatex \usepackage{luacode} ...


11

You can use newunicodechar package and define \newunicodechar{€}{\texteuro} Code: \documentclass{article} \RequirePackage{ifluatex} \ifluatex \RequirePackage{fontspec} \RequirePackage{luacode} \else \RequirePackage[utf8]{inputenc} \RequirePackage[T1]{fontenc} \fi \let\hbar\hhhbar %% without this I get a warning \RequirePackage{fourier} ...


11

With XeTeX you can force the glyph with \XeTeXglyph: \documentclass{article} \usepackage{fontspec} \defaultfontfeatures{Ligatures=TeX} \setmainfont[Contextuals=Alternate,Ligatures=Rare]{EB Garamond} \newcommand\Qlong{\XeTeXglyph\the\XeTeXglyphindex "Q.long" \relax} \begin{document} \noindent \Qlong ui blablab \end{document}


9

From the usage of \RequirePackage I guess you're writing a package, so you'd like it to be as independent as possible on a particular user's setup. I'll assume that your users will be supposed to have an up-to-date TeX distribution, but not that they have the fonts available as system fonts. Setting Erewhon as the main font can be obtained by ...


6

The method for accessing a specific glyph using fontspec depends on the engine used. With XeTeX, an implementation is \XeTeXglyph554\relax (Thanks egreg). An example document, using the inaccessible glyph with ID 554 from Stevens Titling Pro, Sable Brush, is shown below: \documentclass{article} \usepackage{fontspec} ...


5

This is just an alternative to the above luatex solution of looping over the font table. Instead, we may also use the information from the raw font (with fontloader), where the glyphs are still accessible on the top level, and translate the internal glyph name into a char code via luaotfload's function slot_of_name: \documentclass{article} ...


5

I believe that if your system is set in a Latin locale, then fontspec automatically sets Script = Latin. \documentclass{article} \usepackage{fontspec} \setmainfont[Script = Latin]{CMU Serif} \begin{document} βγλθωχ \end{document} The font CMU Serif is designed so that it automatically substitutes certain Greek glyphs with more "Latin looking" glyphs if ...


5

Letter spacing can't work across font changes. You have to emulate it with an explicit kern. Since the font is at 12pt, LetterSpacing=40 corresponds to adding a 4.8pt kern between letters. \documentclass[12pt]{article} \usepackage{fontspec} \setmainfont[LetterSpace=40]{EB Garamond} \begin{document} % No swashes \emph{ANAGRAMME} % Two swashes ...


5

\renewcommand{\familydefault}{\sfdefault} That is: \documentclass{article} \usepackage{fontspec} \setmainfont{Latin Modern Roman} \setsansfont{Latin Modern Sans} \renewcommand{\familydefault}{\sfdefault} \begin{document} abc \textrm{abc} \textsf{abc} \end{document}


4

As it is already verified, I put also my solution, suggested in comments. \documentclass{article} \usepackage{fourier} \catcode`\€=\active \def€{\texteuro} \begin{document} 36 € \end{document}


4

To enable the TeX-Shortcuts, setting the fonts should look like this: \usepackage{fontspec} \defaultfontfeatures{Ligatures=TeX} \setmainfont{Linux Libertine} To your preamble.


4

You can use the style file created by Anurudha. He called it sinhala.sty. (In my code I renamed it sinhala1.) I used the remove thin space command to get two letters close together. I assume that there are ways to get two letters close together as precisely as you want. But, I have not found them yet. Below is my code and the output. (I used the Real ...


4

An acceptable workaround, which still let's you use \textsc without changing it, it defines a similar command \work which does have the desired spacing. I think that there's absolutely no reason to desire this spacing: letters overlap! They need room to breathe… \documentclass{scrartcl} \usepackage{blindtext} \usepackage{fontspec} \setmainfont{Latin ...


2

pxfonts is not “officially” deprecated, but it is so “typographically”, because there are several flaws in its design. Such flaws have brilliantly been fixed by Michael Sharpe who provided the package newpxtext and newpxmath instead. However, newpxtext isn't compatible with fontspec, because it's based on “classical” 256 slot fonts. You can obtain a very ...


1

Here, I introduce \spaceout{} where the argument can contain text, \color macros, and any other macro intercepts you build in (for demo purposes, I intercept \label as well). The parameter defined by \def\theLetterSpace{-15pt} determines the additional kern applied to interletter-space. The last of the lines in my output is the product of \spaceout with ...


1

After discovering the problem was related to my configuration (MiKTeX 2.9 on Windows 7 SP1 64 bit) I rebooted and then uninstalled the Fontin font from my computer. I redownloaded Fontin from http://www.exljbris.com/fontin.html and did an update of all MiKTeX packages. The problem still persisted until I noted that the Fontin filenames were ...



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