freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft-devel] [Fontforge-devel] Peter Wiegel's auto spacing idea


From: Behdad Esfahbod
Subject: Re: [ft-devel] [Fontforge-devel] Peter Wiegel's auto spacing idea
Date: Fri, 15 Jun 2012 15:16:39 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.2.28) Gecko/20120306 Thunderbird/3.1.20

On 06/15/2012 01:49 AM, Werner LEMBERG wrote:
> 
>> I think, that could work like this: the software has to build and
>> you conture around any glyphe, in a way that the distance to the
>> outline of the glyphe is depending on its form, so that the  new
>> outline is closer to sharp edges then to straight lines. this could
>> be done in the way I have described in the attached graphic.
>>
>> First I have made a pixel copy of my letters. Then I have blurred
>> this little picture and after that I had reduced all the gray pixels
>> to black. this new picture can be traced, so I get a new outline
>> around my glyphes. The next step is to move all the glyphs to
>> gether, until the new outline we get in touch, so it must be
>> possible to calculate a good value for this kerning pair. this could
>> be done automatically with all glyphs in the font, or even with all
>> possible combinations in any language.
> 
> Sounds nice.  I think it's not necessary to trace at all: Since
> kerning for Latin fonts works in the horizontal direction only, it's
> fully sufficient to work with the blurred bitmaps, shifting two glyphs
> together until they touch.
> 
> It would be nice to see a font specimen sheets with kerns computed
> this way, using various blurring radii.

I've been thinking about this approach for a couple years.  Never got to try
it.  Mine is more mathematically rigorous, but really very similar.
Essentially: convolve the glyph with a gaussian, then for any two glyphs, you
want to set them next to eachother such that the integral of the gaussians for
the two glyphs shifted and multiplied is a certain number.  The width of the
gaussian, and the certain number give you two axes to adjust 1) general
spacing, and 2) how spacing functions around acute corners compared to
straight lines.

BTW, an approximation of it can be done using analytical algorithms instead of
bitmapping.  Maybe I give it a try finally.

At any rate, someone has explored this space extensively already.  I never got
to read what he exactly does, has been on my TODO list.  Checkout iKern.

behdad



reply via email to

[Prev in Thread] Current Thread [Next in Thread]