Page MenuHome

Kerning table not read from TTF font
Closed, ArchivedPublic

Description

System Information
Ubuntu 15.10 Geforce GTX 970M

Blender Version
Broken: 2.76b official linux x64

Short description of error
This is an example where the kerning is not read from the TTF kerning table. It works fine in Inkscape 0.91 linux

Exact steps for others to reproduce the error
Download the following ttf, add a text object in Blender, type "av", apply this font:

Details

Type
Bug

Event Timeline

Gottfried Hofmann (gottfried) updated the task description. (Show Details)
Gottfried Hofmann (gottfried) raised the priority of this task from to Needs Triage by Developer.
Bastien Montagne (mont29) claimed this task.

Thanks for the report, but this is more a TODO than a bug, this feature has never been implemented for our 3DText object afaik. Added a note to our TODO list.

I had a look at adding kerning support and here is my approach:
https://developer.blender.org/P407

I don't think it is a very elegant approach. It adds a new Hashtable to the "VFontData" struct which is quite big up to (36481) for systemfonts and the blender default font which doesn't even support kerning.
The Hashtable saves all possible character pairs. If there is a better datastruct to store the necessary data let me know. (ghash is also quite confusing)
I will experiment with other approaches, only saving the kerning values > 0.

For now I'm happy about every bit of feedback!

Thanks for the work and patch, but would indeed really not go that way… Thing is, we already have kerning support for all our UI code, using iirc freetype lib helpers for that. So suggest you check code in blenfont dir and see how to hook it into 3D fonts code? Really don’t think we need to bake all possible kernings into own ghash.

Also, probably better to create a new diff to get review on your patch once ready, comments in closed bug report is not so handy to manage. ;)

Here is my new Approach, now in a diff. :)
-> https://developer.blender.org/D2282