Tag Info

New answers tagged

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


0

You can define commands to apply the colors and add a negative kern between them. Putting the "magic number" of your letterspacing inside a macro makes it easier to adjust. (I didn't have your font so I used one in the TeXLive distribution.) \documentclass{article} \usepackage{fontspec} \usepackage{xcolor} \pagestyle{empty} \setlength{\parindent}{0pt} ...


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


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


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}


12

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


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


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

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


0

In principle, XeTeX works fine with .otf or .ttf font files. However, in some cases the .ttf version of a font lacks some metadata (for compatibility with older versions of Windows), so when both are available you should prefer the .otf. An older font format was Type 1, which consists of a pair of a data file .pfa or .pfb and a metrics file .afm. While ...


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


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


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


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}


4

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


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


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



Top 50 recent answers are included