Kerning not working for uppercase / smallcaps

I'm fixing a font to create GSUB and GPOS with FontForge on Linux Debian.
I have not touched anything concerning the metrics, apart from the symmetrical reduction of the bearing for the apostrophe.
As far as GSUB is concerned, I have filled in the order aalt lnum, tnum, pnum, onum, then smcp and finally liga.
In GPOS I created only one table:
'kern' Horizontal Kerning loopkup
and a single
'kern' subtable Horizontal Kerning loopkup 0-1
only for Latin. I put kerning for upper / uppercase and upper / lowercase and at end uppercase / small caps in this form:
A    | V W
V W  | A
F P | c e o
and so on. However, even if I see correctly all pairs in FontForge preview, using LibreOffice with real smallcaps (and not fake ones) or XeLaTeX, all kerning work fine except uppercase / smallcaps. The space between thw glyphs is determined only by metric, and kerning ignored. I realize that here I gave you only a few information, but at present I've no idea of the reason of this trouble. Any idea? Thank youyou


  • I have just checked a font of mine with FontForge and XeTeX: The kerning with smallcaps works. Without your *.sfd file I can just guess:
    • is your FontForge version up to date (I have 24-Sep-2017)?
    • do smcp and kern have the same "Scripts & Languages" (click "edit Metadata") activated? (like DFLT{dflt} cyrl{dflt} grek{dflt} latn{dflt})
    If this does not help, you may want to replace your glyphs by an open source font and submit the *.sfd file for testing.

  • mauro sacchettomauro sacchetto Posts: 353
    edited December 2018
    The answer to your both question is: yes.
    I tried to reproduce the problem adding a 'kern Horizontal kerning lookup 1 kerning class 11' with parossistic values for A / and V / After I saved the file and generated the font. But nothing changes...
    I submit an analogue experiment with EBGaramond-Regular. You can see the file here:
  • I can confirm, that I have the same problem with XeTeX and the submitted sfd file. I am quite sure, that this problem is connected with the following warning message that popped up when generating the otf (which is a message I have never seen before):

  • but in my original file the kerning table is very small,
    and in that case I don't receive that message...

  • Same problem in another case, both with XeTeX and with LibreOffice (with :smcp).
    See this other file with a very small kerning table:

  • Erwin DenissenErwin Denissen Posts: 291
    edited December 2018
    If you have more than one class based kern sub table, do ensure they don't overlap. E.g. individual glyphs used within the first of the pair should not be used in more than one class based sub table within the same lookup.
  • at the moment I've only this very simple subtable:

  • Erwin DenissenErwin Denissen Posts: 291
    edited December 2018
    B seems to work just fine when I test the generated font in Firefox.
  • The generated font works just fine for me in LibreOffice

  • mauro sacchettomauro sacchetto Posts: 353
    edited December 2018
    You've right! Activating and de-activating kerning in LibreOffice it works!
    And now it works with XeTeX too, because I discovered the reason: usually I write W\textsc{aterman} and actually this way no kerning is produced. The right way is to write: \textsc{Waterman} and all works fine.
    I don't know if there as another GSUB table which still allows kerning to be done even by writing the code in the first way
  • Your first XeTeX code internally uses two different fonts (one for “W” and one for “aterman”), so no kerning will be possible between the two. The same happens in LibreOffice if you activate smcp feature on “aterman” only.
    There is no way in XeTeX to activate features on part of the text without switching to a different font. In LibreOffice you can hack your way by specifying character indices in the feature, eg. smcp[1:7] (similar to Python’s [] operator).
  • mauro sacchettomauro sacchetto Posts: 353
    edited December 2018
    The main result is that there are no problems in the font, and kerning works fine.Thank you!
  • The screenshot from @AbrahamLee shows Garamond Simoncini. Which digital version are you workling with, @mauro sacchetto?
  • mauro sacchettomauro sacchetto Posts: 353
    edited December 2018
    an unofficial version (rip) for private learning. Just for it comes from a ripping, it's completely free from any setting
  • @mauro sacchetto what do you mean “it comes from a ripping”? Is it extracted off of a PDF or something?
  • I think so. It arrives from a member of another forum
    and it's useful for my learning. But I think it not so relevant for other people
Sign In or Register to comment.