Page MenuHome

Expose text objects' kerning to the RNA
ClosedPublic

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

Details

Summary

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 C.object.data.body_format:
    bf.kern = 100

Diff Detail

Repository
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.

source/blender/makesrna/intern/rna_curve.c
1225

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.
https://en.wikipedia.org/wiki/Kerning

1227

Provide a description.

1228

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.