TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to use Linux Libertine as a letter font (and a bit more) in math with unicode-math and luaLaTeX.

It should be good to adjust some details, and I hoped to be able to do it with a .fea file, but unfortunately it does not work entirely. Have anybody some experience of this? Test file below.

%!TEX TS-program = lualatex
% !TEX encoding = UTF-8 Unicode
# Script and language coverage
languagesystem DFLT dflt;
languagesystem math dflt;
languagesystem latn dflt;
    feature mb01 {
        substitute v by v.alt;
    } mb01;         
    feature mb02 {
        position j <200 0 200 0>;
    } mb02;
\usepackage{unicode-math} \unimathsetup{math-style=TeX}
\setmathfont[range=\mathup/{num,latin,Latin,greek,Greek}]{Linux Libertine O} 
 {Linux Libertine O Bold} 
{Linux Libertine O Italic} 
 {Linux Libertine O Bold Italic} 
\setmathfont[range=\mathpunct]{Linux Libertine O} 
\setmathfont[range=\mathrel]{Linux Libertine O} 
\setmathfont[range=\mathbin]{Linux Libertine O}
\defaultfontfeatures[Linux Libertine O Italic]


    The letter v substitution in math mode :
\item    italic tex mode : \textit{v}
\item      math mode : $v$

But unfortunately, I found no way to adjust the left sidebearing of j in math mode!
share|improve this question
You can’t. Besides, what you want is adding italic correction not changing the side bearings unconditionally. Furthermore, italic correction is the least of your worries (you can adjust the spacing manually, but you can’t, say, adjust accent positions). You can, however, edit the Lua representation of the font directly, but that requires a bit of Lua code. – Khaled Hosny Jul 23 '13 at 16:33
@KhaledHosny Well, in the TFM world the italic correction in a math font is related to the superscript placement. I am not sure it is still pertinent in the opentype (math) world. On the other hand, if you want to convert an italic text font towards math, you will have to increase the left side bearing of the j letter (and the same for the f letter, at least). One can see that by comparing, say zits-italic and sits-math in a fontforge window. But you are right : mixing opentype fonts in math is probably not a good way if we have quality in mind. – Michel Bovani Jul 24 '13 at 6:18

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.