4

Does TeX process kerning so that sw reading dvi file does not need to do kerning as defined in tfm file but can run with character widhts information from tfm file only. I use TeX not LaTeX.

I am writing a dvi processor and the spacing in th is too wide in $2^{th}$ compared to dviout display.

  • 1
    You should type that as 4$^{\rm th}$, if you really want this obnoxious form. I'd simply prefer 4th. – egreg Nov 21 '15 at 22:36
  • Also check out the nth package. I'm pretty sure it has an option to superscript the th. – PTNobel Nov 21 '15 at 22:46
  • 1
    DVI handles kerning exactly as much as PDF does – that is to say not at all. – Sean Allred Nov 22 '15 at 14:40
  • I'll change my macros. I wanted to add images to my TeX using \special and I ended writing the whole Dvi processing in Java. I only have netbeans as IDE. Everything else is working. – Hannu Rouhiainen Nov 22 '15 at 17:38
  • The sizes in tfm file are relative to the font design size. I did not do this. Now I multiply the char width by the font design size and all works right. Even $15^{th}$. TeX handles kerning (as I was told), my mistake. My dvi-processor works now to the specification. – Hannu Rouhiainen Jun 10 '16 at 20:03
9

Yes by the time it gets to the dvi file user or font specified kerns come to the same thing, so you should only need the advance widths from the font metrics. In your example t h is incorrectly set in math italic font, which by design has wide side bearings to keep adjacent letters from looking like a word, as juxtaposition is assumed to be multiplication, usually.

  • It was my mistake. tfm units are relative to the 'design size'. When I multiplied the vertical width by the design size from the font metrics all was correct! Now $2^{nd}$ is layed out beautifully. – Hannu Rouhiainen Apr 1 '17 at 22:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.