I could need some start-up aid with using fonts in lualatex
. I have 3 questions (sorry):
A) I want to use a nice mainfont for normal text. The lmodern
-default was nice with pdflatex
, but the default now looks ugly: the f
's overlap, see MWE and output. Seems not to be a ligature issue (I don't want to use ligatures at all!)
Update (solved): I'm a german writer, and I don't see ligatures anywhere in german texts, so I want to disable them in mine, too, of course. The link from phg (https://tex.stackexchange.com/a/103242/14066) does the trick!
\defaultfontfeatures{Ligatures={NoCommon, NoRequired, NoContextual, NoHistoric, NoDiscretionary}}
\setmainfont{Latin Modern Roman}
microtype
-package with command \DisableLigatures[f]{ encoding = * }
+ babel
-package doesn't give the expected output.
The selnolig
-package with commands \nolig{f[fil]}{f|x} \nolig{Th}{T|h}
also works.
B) Besides the mainfont I want something highlightning for musical compositions.
Update: To set this right: I want to have my default font in \textsc
, slightly slanted (\textsl
?) and with small letterspacing. I'm not sure, if I can use microtype
for this. I've tried it, but it doesn't change the letterspacing. Also it didn't work to combine \textsc
and \textsl
.
C) I need to write a lot of musical symbols, that's why I switched to lualatex
, so I can embed music fonts. But if I try it, I can't get it to work.
I've tried it with BravuraText
, found here: http://www.smufl.org/fonts.
The funny fact is, that I can't see any of the written letters in the output, and I can't see the font properly in the Win7-character map (charmap), but I can see it in OpenWriter…
Update (solved): Thx to Will Robertson, Bernard (see answers) and Thérèse.
fontforge or fontmatrix can be used to inspect the font.
The best things about B) and C) would be, if I could use simple commands like \composition{Brandenburgische Konzerte}
and \fortissimo
.
MWE:
\documentclass[ngerman]{article}
\usepackage{fontspec}
\begin{document}
asdfff asf aft afft
\fontspec{BravuraText}
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
\end{document}
Output:
Best Answer
As mentioned by Bernard, the only good way to access the music glyphs in this font is to ask for them by glyph slot. Depending on your use-case, it will probably make most sense to write a macro to simplify this to some degree; I'd recommend something like:
Note you choose whichever text font you wish with
\setmainfont
, and then the music symbols come explicitly from Bravura.If you end up writing a significant number of glyph definitions, I recommend somehow sharing that information to help other people in the same situation. For example, you could add this font to TeX Live (it's free enough, I believe) and provide a package that has the named glyph slot definitions.