4

In the spirit of this answer, is it possible in LuaLaTeX 0.95 to adjust side-bearing of a single character (for instance by adding a extra side-bearing on the left of this one specific character, thus increasing the effective spacing between this specific one and the character before)?

Edit: I wrongly used the term "kerning" (since microtype names it ExtraKerning) to refer to the effective spacing between two character. I slightly rewrote the question in order to use the terms "side-bearing" and "effective spacing".

  • Check this here http://tex.stackexchange.com/a/312160/2388 and the other answer to this question. But if you want to change the spacing in relation to every other character you should probably better change the bounding box of the glyph itself or look at the microtype package. – Ulrike Fischer Mar 07 '17 at 15:31
  • @UlrikeFischer: Yes, I want to change the spacing in relation to every other character. microtype has the option \SetExtraKerning I would need, but don't handle kerning (yet) in LuaTeX. – Kyle_the_hacker Mar 07 '17 at 15:58
  • @UlrikeFischer: Your answer is unfortunately not usefull neither, since font ranges are not (yet) implemented. – Kyle_the_hacker Mar 07 '17 at 16:06
  • 2
    Ah ok. Then check the code in frenchb.ldf. It contains lua-code to add "kerning" around punctuation. See \def\activate@luatexpunct{ – Ulrike Fischer Mar 07 '17 at 16:13
  • Sorry. Somebody will be able to help, but not me. If it was a traditional TeX font, that would be different. But TFM it is not .... – cfr Mar 19 '17 at 02:13

1 Answers1

2

I haven't used it in a while, but fontspec used to have a font feature file.

\setmainfont[FeatureFile=test.fea]{Minion Pro}

test.fea could look like this

languagesystem DFLT dflt;
languagesystem latn dflt;
feature kern {
    pos quoteright period 20;
    pos quoteright comma 20;
    pos quoteright semicolon 20;
    pos dblquoteleft \V -20;
} kern;

to adjust the kerning for the specified pairs.

uli
  • 4,315
  • Correct. But I do not want kerning for specific pairs, but for a specific character! – Kyle_the_hacker Mar 15 '17 at 18:59
  • 1
    It is it called „kerning pairs“ for a reason. In digital typography, kerning is applied to letter pairs. With True Type Fonts we had „kerning tables“ were the values fo each pair could be found. But with OTF and Unicode this is not feasible any more. – uli Mar 15 '17 at 19:42
  • Look at this specific point in the OpenType Feature File Specification and look at the comments from @UlrikeFischer. – Kyle_the_hacker Mar 15 '17 at 19:59
  • @Kyle_the_hacker That point (if you mean the first one) is not about kerning but side-bearings, which was perhaps already suggested above concerning changing the bounding box, which I think might amount to doing the same thing. – cfr Mar 18 '17 at 23:54
  • @cfr Sorry, English is not my mother tongue. It is indeed named side-bearings. How do I change the side-bearing of a single char? – Kyle_the_hacker Mar 19 '17 at 02:08
  • @Kyle_the_hacker In that case, have you tried using fontforge to edit the font? – uli Mar 20 '17 at 06:20
  • @uli I don't want to edit the font. – Kyle_the_hacker Mar 20 '17 at 10:57