The currently-hardcoded length is only readable for pins with 4-character numbers and no encroaching styles (such as the invert bubble), 3-character numbers with plain styles but minimal padding, or 2-character pin numbers with a nice amount of padding.
This patch makes the pin length dynamic. Feel free to tune the constants, but as it's written right now, it guarantees legibility but no whitespace (PIN_LENGTH_BASE could be set to 100 to force more whitespace). It should behave the same as kipart does today in the cases listed above.
Note that I've only tested the output by importing it into KiCad 6; not sure if the rendering is any different with KiCad 5 such that this is overly-conservative.
The currently-hardcoded length is only readable for pins with 4-character numbers and no encroaching styles (such as the invert bubble), 3-character numbers with plain styles but minimal padding, or 2-character pin numbers with a nice amount of padding.
This patch makes the pin length dynamic. Feel free to tune the constants, but as it's written right now, it guarantees legibility but no whitespace (
PIN_LENGTH_BASE
could be set to 100 to force more whitespace). It should behave the same as kipart does today in the cases listed above.Note that I've only tested the output by importing it into KiCad 6; not sure if the rendering is any different with KiCad 5 such that this is overly-conservative.