POV-Ray : Newsgroups : povray.beta-test : Weird text spacing bug : Re: Weird text spacing bug Server Time
4 Nov 2024 17:29:13 EST (-0500)
  Re: Weird text spacing bug  
From: Anders K 
Date: 4 Oct 2001 18:33:32
Message: <3bbce3bc$1@news.povray.org>
> Hey, I just thought of what is probably happening. Because of kerning,
> POV-Ray is moving the "o" towards the "Y", but is not moving the "u" as
> well. If this is the case, it should definately be fixed.

And the patch is simple. In TRUETYPE.C, change these lines:

/* Shift next glyph by the width of this one */
total_offset[X] += ffile->hmtx_table[glyph->myMetrics].advanceWidth *
funit_size;

to:

/* Shift next glyph by the width of this one + any kerning amount */
total_offset[X] += (ffile->hmtx_table[glyph->myMetrics].advanceWidth +
kern_value_x) * funit_size;

I tested this with the POV-Ray 3.1 source, and it seems to work properly.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.