TransWikia.com

Default kerning around hyphens is ugly

TeX - LaTeX Asked by Jan Pokorný on April 20, 2021

I have noticed that default kerning of hyphenated words (like "Finite-Valued") looks like this:

e-V

e-V

As you can see, the hyphen is too close to the e and too far away from the V. Is there a way to fix this, so the hyphen has proper kerning?

2 Answers

The kern primitive is your friend.

enter image description here

documentclass{article}
begin{document}
Finite-Valued

Finitekern0.5pt-kern-2ptVkern-1.5ptalued % 1 postive kern, 2 negative kerns
end{document}

Answered by Mico on April 20, 2021

If you are using LuaTeX then you can declare more kerning pairs of used fonts. Example shows how to do it in OpTeX:

fontfam[lm]

directlua
  {fonts.handlers.otf.addfeature 
    {
    name = "khv",
    type = "kern",
    data = {
    ["-"] = { ["V"] = -150},
    }
  }
}

Finite-Valued.

setff{khv}rm Finite-Valued.

bye

Answered by wipet on April 20, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP