The Group element is the only place kerning is set, but groups are the
right place. Eg \rm{hi mom} is a group. I just took a look and
noticed I commented out the place where the kern is set
def advance(self):
'get the horiz advance'
return self.metrics.advance # how to handle cm units?+ self.kern*self.widthm
It looks like I was a bit confused about how to best include the
kerning information, and was experimenting by treating it as a
fraction of the width of an "m". You may want to try some
alternatives. But this is where you would start hacking.
JDH
···
On Wed, 2005-10-19 at 12:08 -0500, John Hunter wrote:
>> Hi this looks very nice! I have to run now but I'll give you a
>> quick tip. kerning controls the inter-letter spacing, and your
>> Fonts class has to override "get_kern"; the base class always
>> returns 0
> I had missed this function - but as far as I can see it
> isn't actually called in the majority of cases (only
> where set_font is called on the parent GroupElement -
> which doesn't always happen in any of the common cases
> I've tried). Am I missing something?