Page MenuHome

Expose text objects' kerning to the RNA

Authored by Damien Picard (pioverfour) on Mar 30 2019, 1:26 PM.



I need to manually kern a long text, and doing it for each letter using ALT + LEFT/RIGHT is rather tedious. So this patch exposes the CharInfo kern attribute to the Python API so it can be slightly automated by setting bpy.types.TextCurve.body_format.kern, for example:

for bf in
    bf.kern = 100

Diff Detail

rB Blender

Event Timeline

Damien Picard (pioverfour) edited the summary of this revision. (Show Details)
Damien Picard (pioverfour) edited the summary of this revision. (Show Details)
Brecht Van Lommel (brecht) requested changes to this revision.Mar 30 2019, 8:45 PM

Seems reasonable.


Should it be kerning instead of kern I think. It's called that way internally but seems that as a noun the meaning of kern and kerning is not exactly the same.


Provide a description.


Don't leave in any commented out code.

This revision now requires changes to proceed.Mar 30 2019, 8:45 PM
  • Replace kern with kerning
  • Remove comment
  • Add property description
This revision is now accepted and ready to land.Apr 2 2019, 7:14 PM
This revision was automatically updated to reflect the committed changes.