We're going to need way more details about exactly what you're tweaking, which version of FontForge you're using, and how you're generating your font, because I have seen numerous cases of FF fucking up the kerning tables on export in strange and interesting ways

.
(This means this might be something best done with a redistributable font, and a specific testcase).
Do make sure you haven't changed the kerning mode from its default (which should be "best"), as anything else won't deal with modern kerning tables properly.
That's for ePubs, for PDFs, if you're not enabling reflow (and you shouldn't), we have no further control over how stuff gets rendered (and I'm unfamiliar with MuPDF's handling of typography rules).