Feature Request (easy one) - Text thickness

I’m loving the update to v9.0. One new feature I absolutely love is the “Update Thickness According to Text Size” button on the Text Properties dialog. I’ve always found this a little difficult to estimate, and now KiCAD will do it for me.

So I thought, let’s make all my silkscreen text the same ratio of thickness so it looks uniform even if sizes are different. I tried highlighting all the text and pressing E, no go. I went to edit and found the Edit Text and Graphics Properties dialog, but it only has an option for setting a single thickness across all text. That’s not horrible, but when I have different height text, it won’t look uniform, plus the automatic portion is missing, so either I am back to estimating, or I have to go to an individual text property dialog and first get it to tell me the correct thickness, then set it ALL to that thickness, then go back through and change the outliers… I think you see where I’m going with this.

Let’s make a button that will do the same automatic thickness setting according to text height for everything at once. It should save a few minutes for every small board you design, and for larger boards, it could save quite a lot of time, and it should be pretty easy to implement (relatively speaking).

Any thoughts?

It is only my thoughts…
I am surprised seeing someone edits text sizes.
As I remember I have decided text sizes once (when KiCad was 4.0.7 or 5.0.1) and what I have set is going with me since then.
When I started to use KiCad I was trying to make template but failed (KiCad wanted from me something (kind of (not text file) description, I think) what I didn’t understood what it wants).
So I decided to start each new design from previous one. If it is something totally new (rare situation) my first step is to delete everything from schematic and PCB.
This way I have all my defaults (once set) always with me.
I have references and values at Courtyard layers and at Silk I write only PCB name and revision. As I don’t remember editing them I suppose default sizes for these both come from different places.

I see what you’re saying. Set it and forget it. =)

Unfortunately I am often making completely new boards and if possible, I download footprints from mouser or digikey while searching for parts to build the devices. If not possible, I make my own, and I don’t always use the same text settings. It depends on the size of the part for me.

So due to my habits, I often have text that comes out smaller or larger, and often too thick to be legible once printed. So the new feature is great for me, and going forward I may not need my feature request since I can click the button every time I add a new part, but at the very least when editing an older project, a button to do them all at once would be a great time saver.

Still, if no one else likes the idea. Maybe I’ll have time to code it out one day. Surely I must eventually retire, right? Right??

I use only my own footprints and texts with the same size. If I start new footprint from copying one of my footprints than I have all settings correct. If I start new footprint from copying KiCad footprint I have to move reference and value to Courtyard layer and at the same time I set its sizes to my standard (don’t remember - just check in the other footprint).
At PCB if texts for smaller footprints are readable (have to be) then I see no need to have them bigger for bigger footprints.

I didn’t moved to V9 yet. I will do it when 9.0.3 (or 9.0.2) will be released. As I have read that V9 gives us user layer pairs I will probably move references and values to such pair. To do it I will have to edit all my footprints and it will probably be not possible by just automatic replace texts in files.
KiCad V4 and V5 had nothing against my texts at courtyard layers and placing footprints touching each other with their courtyard rectangles. Since V6 I have to switch off several Courtyard DRC checkings.
When I will move with texts and pin1 marking from courtyard to user layer pair I will be able to switch them back on. But I’m not sure if will find time to make this step.

First, best to have clarity that Text attributes can be set in various ways depending upon the goal;
• Footprint defaults are Setup in Preferences>Footprint-Editor for W, H, T
• Silk (1, 1, 0.1)
• Copper (1.5, 1.5, 0.3)
• Fab (1, 1, 0.15)
• Other (1, 1, 0.15)

Regarding this topic (apparently for the PCB), given the Text has the three meaningful attributes (Width, Height, Thickness) poses this question, What should the Ratio be based on, H/W or W/H ?

For my Kicad default’s, the PCB Defaults for W, H, T are different for the (Silk, Fab, Other) Text items (without respect for the Copper and the overriding Footprint Text setting’s).

Thus, Default’s for Silk, Fab, Other, the W and H are 1.0 but, the Thickness’s are 0.1 and 0.15). Thus, the Ratio’s are different.

Further, what to base the Ratio on as it’s a function of W and H, and they can be different for the bazillion footprints created by different people.

But, let’s say (assume) that, given W and H Defaults are both ‘1.0’ and thus, if Default Thickness, T = 0.15 then, let’s call the 0.15 our Coefficient, C.

So, Ratio R = C(W/H), thus, R = 0.15(W/H)

By Example: If W=1.25, H=1.4, then R = 0.15(1.25/1.4) = 0.134

But, if R = C(H/W), then, R = 0.15(1.4/1.25) = 0.168

So, a decision needs to be made (and can be implemented in Code. For example, have Code decide based on the Larger (or Smaller) for the H and W.

Video shows Both Choices via changing them in the Panel for:
• Single Footprint and Multiple Footprints
• Changing them for All Footprints (having their Default WHT of 1.25, 1.4, 0.15, as seen, not All have the Same Default’s, so they don’t get changed… hence my comment re bazillion footprints) on the PCB by using Code (my App but can be done in any Text-Editor, not shown)
(Note: Can change All Footprints in Bulk, too. Not shown). And, can use Wildcard’s to bulk change Unknown/Known values…)

BlackCoffee, you have a ton of great questions here. The impetus for my suggestion was silkscreen text, however your reply does point out very pertinent information of which I was ignorant. There are several types of text that clearly have different ways of being calculated, but the new feature of version 9, as far as I can tell, only works on certain types of text. “Draw Text Boxes” tool, no. “Draw Text” tool, yes. “Footprint Reference Properties”, yes. “Text Properties”, yes.

I don’t mind that there are different defaults for the different texts on different physical layers. That is clearly for the best as it’s easier to screen print some silkscreen text at smaller thicknesses than it is to etch copper at those same thicknesses. For this suggestion, I don’t think it’s that important to worry about. The new button makes my life better as it is and using the default ratios that it is currently using. Let’s just take that new button, put it on whichever dialog box / menu you want, use those already applied default ratios, and extend it a bit. Stick a For statement in there and make all the text use the suggested thickness for the appropriate layer.

My point is that I like the current suggestion and would like a way to use that suggestion more liberally. Especially since I often write things in Japanese, a thickness that’s a little too fat makes words look like smudges once actually printed.

If someone doesn’t want to use the default suggested thickness, it’s easy not to click it. I can imagine anyone wanting to play with PCB art would probably not use the button, but neither is it for them. It would be for people who want clearly legible text without having to change every different location manually and without having to know that each layer has a different ideal thickness ratio. If you want to add a bunch of preferences for which text, where, when, and user inputtable ratios, great. I’d be happy with just a second button that does the current thing to more text at once.

Raise a bug report (Feature request) and state your requirements for the Feature . . . if it gets enough thumbs up it may get implemented.

Put a link here so people know where to go to vote.

Or code it up yourself and submit it . . .

Don’t rush into reporting, try this first…

image

It’s not what the OP is asking for, the OP requires a constant “weight” option, so as the size is increased the thickness is automatically adjusted to keep the same wight.

Then the OP will want the ability to change the setting for that automatic weight ratio . . . “because it’s not quite bold enough”

I do have some sympathy, when I want to make some text bigger it’s a small inconvenience to have to also adjust the thickness, would be nice to be able to make them linked.

2 Likes

Right, it’s not the same, but related. At least it’s good to be aware of the available options, so that one can possibly adjust the workflow even though it would be to another imperfect one.

In the Defaults section of the Board Settings it’s possible to set also text thickness, and if Formatting → “When adding footprints” is active, all footprint texts will automatically have the Default sizes.

At least for some users this would make automatic thickness adjustment, apart from automatic adjustment to the Default values, less needed.

But I’m not against a small feature request at all. UI-wise this would be a small change, and I don’t think it would be difficult in code implementation, either. It might only need one more checkbox to the Edit Text and Graphics dialog.

The OP can comment for themselves, but I didn’t read the wish that way. Just that there’s no way to go through all text items to set them to their automatically calculated relative weight, all at once. So that instead of setting one thickness value in Edit Text and Graphics dialog you could check “Update Thickness According to Text Size” checkbox and apply the dialog.

For full featured thickness setting with changeable ratio etc. I would rather have a plugin to do it than have more complex built-in UI.

I Agree!

I spent a few minutes laying out a GUI and thinking about what to include, I decided perhaps to make it very simple by making it do only Linear Scaling (e.g., H,W,T all get scaled by the same value. Thus, it all get proportionally changed. Makes the most sense to me).

Example below…

That’s a nice feature, eelik, but it doesn’t address the automatic setting of the thickness of the text. I’d still have to figure out which thickness is best for a particular height, width, and layer of text, and set that in board defaults for every board I make. I don’t have to do any of that with the new auto thickness button. I just click the button and .15 turns into .125, then the text looks nice. Of course .125 is not a panacea. That number would change across text sizes and layers. Having to figure all that out is what I don’t want.

Let me describe this in a different way since my words somehow seem difficult to interpret, but first let me make sure everyone is on the same page. The “Update Thickness According to Text Size” button is here to the left of the OK button. This is a new button that was added in version 9. In version 8 and prior I had to try several different thicknesses until I got something that didn’t look like a smudge. Now I click this button and my text is legible. This is a nice feature.

スクリーンショット (189)

One could argue that the Thickness field is a cluttering of the UI with unneeded customizable settings, because who would want illegible text? There’s a Bold button right there. If you want thicker text, click bold, right? Now that this thickness button has been added, things are easier, but even more cluttered. However, now I don’t have to try a bunch of different thicknesses. I can click the button and it’s done. But why is the button necessary? I just want legible text that doesn’t require calculations every time I dare type something in. The button is necessary because it is assumed that people want to modify the text thickness. I honestly do not want to modify text thickness. I want legible text. The auto text thickness button gives me legible text. The Thickness field alone does not do it. I also need to figure out what the ideal thickness is. I don’t want to spend time thinking about the thickness of my text. I want to think about creepage or SNR or whether my footprint will line up with a hole in an enclosure or even just what I’ll have for dinner tonight. Basically I want to think of anything except the ideal thickness for my text so that people can read what is written on a PCB, Is that R1 or R7? Is that 電源 or 発電?Who knows!

So, this button is good. I like this button. Let’s keep the button. If we get rid of anything, get rid of the Thickness text input field. Set a constant ratio of H-W-T per layer and text type and if someone wants it thicker, they can click on the bold button.

So right now we have an easy way to set text to a legible thickness: click that button. But what about all my other reference text on my silkscreen layers? I have to go through and fix them all one at a time. Click the appropriate text item, press e, click the update text thickness button, click ok or hit return. Do that for every single bit of text that I can’t read or that isn’t uniform, because while I don’t really want to change the thickness of my text, I do want to be able to read it, and I do want it to look uniform. I’m trying to make something nice here, not throw trash on a pcb. So finally, here’s the feature request. Let’s add a simple little thing somewhere. A checkbox would be fine. Something like: “Apply automatic thickness across all text on this layer”, for example.

Now all the text on my board can look just as uniform and legible as if I clicked on every single text item and pressed e and clicked the update button and pressed return.

That is it.

Nope, you’re projecting.

There ya go. You seem to find the presence of the Thickness field unnecessary, too.

Yes! This is what I’m talking about.

In this case, you’re both sorta right. I would prefer a preset (not quite constant) weight (just like the update text thickness button does right now) so I don’t have to think about it, but if others wanted to be able to adjust that weight, it would be a single variable in code that you link to another text input box somewhere (probably also in some settings saving code too I guess). That’s relatively easy if you already know the code base. I do not, but I’ve made persistent settings dialogs before.

I also agree that a plugin would be better if someone wanted to change a ton of things about the thickness. I’m not trying to ask that the UI become more complex. I’m asking that it become more convenient. There are clearly ways to avoid having to do all of this manually, one text item at a time, but none of them involve a single click to make everything that already exists the same. They involve figuring out the ideal thickness for the given text then setting those defaults in one or more places for every board you design or if you realize your ideal calculation was wrong once everything is on the board, you are back to changing them all individually. We have a button that does what I want for a single instance. It seems logical to me that someone might want that same button (or one just like it on a different page) to apply its effects in multiple instances instead.

I don’t really have much more to say about this. If no one wants to do it, I’ll probably get around to making a plugin for it at some point. It just seemed like an easy thing to do that a lot of people might appreciate in the same way I appreciate the new thickness button. Seeing the new button made me realize how much effort I’m currently spending on text thickness because I suddenly started saving that time instead. Extending those time savings seemed like the next step.

1 Like

@JustTryingToWork have you done this yet ?

Not yet, I’ve spent most of the day trying to get creepage drc checks to work. I’ll submit a bug report feature request tomorrow. Thanks to everyone for their input.

1 Like

For what it’s worth I see your point and it’s a good one. For me I found it very annoying to constantly be told the thickness is wrong :face_with_symbols_over_mouth: But I haven’t seen the new button yet I found out about it reading your post :boom:Awesome ! So you have my vote I will add my thumbs up and I will use your plugin, if you make one, and I would like to see what you have outlined implemented. That’s my 2 pence worth :smiley:
:mouse:

1 Like

Thank you mousey. I hope I don’t have to make the plugin, but a mass text customizer is a pretty good idea for a plugin if someone wants to run with it. I won’t mind.

I’ve opened an official Feature Request over on gitlab. Please give it a thumbs up if you think it would be helpful.

https://gitlab.com/kicad/code/kicad/-/issues/20313

2 Likes

I took a break from other projects to spend five minutes having programming fun…

Half of my Plugin action’s are run from the Code within the Plugin.
The other half of my Plugin’s are from an App (made from the Code).

I do it both ways for fun but, sometimes it makes more sense to do it one way or the other…

I haven’t set any real Action’s for the Text - just got the GUI/Plugin done while drinking moring coffee…

That said, you can see my intent and, if ‘you/others’ have suggestion, post it and I’ll consider it…

2 Likes

Nice! My main suggestion at the moment would be to add in a button to suggest an ideal thickness depending on which types of text are selected via your check boxes. It could be a button to the left of “Set It” maybe called “Suggested Thickness” or “Auto-Thickness” or something more succinct. Then I’m ready to download and start using it!

If I really put my mind to it, I bet we can come up with something creative that might draw PCB artists to the plug-in, maybe a few more font selection settings either via an additional dialog that can pop up after clicking a select font button, or just make the dialog a bit bigger and have the complete font selection/style/color options there on the same screen.

A way to manipulate the text visually might be interesting, but would take considerably more work. Adding noise for example if someone wanted to make a cyberpunk themed PCB. Again… that would probably take a whole heap of work and would probably be best done by selecting a font that already has the visual changes baked in. Hmm… This is probably not possible since fonts are displayed, not bitmaps. Unless you want to make a text to footprint style converter function. Vectorizing raster images? Ok… lots of bad ideas here maybe.

Colors would be good, but you’d have to hook into the board setup and change the silk colors per layer. This is probably aiming a little too high, but the more I think about it, the more I think it could probably work. This is more or less how they do PCB art in general: different layers of different colored screen printing.

@JustTryingToWork Thank you for the input

I’ll respond to specific’s but, first…

I use Kicad version 7 (v7) and won’t upgrade. I suspect most of my comments/opinions still apply to v8 and v9

Two years ago I posted (this) and, thus, you can imagine problems arising from different fonts and tweaking them.

New Kicad projects get the Font-Settings from the kicad_pro file and the resulting New PCB implements them into the Project’s kicad_pcb file. It is this file that the Code-Actions will modify.
(Note: Could make it happen on Single project or All the Project files in your selected Directory).

As it stands now, my intent for Linear will simply multiply the Currently saved HWT settings in the kicad_pcb file by some value.
Thus, if Linear=1.75 and H=1, W-0.85, T=-.15, then the new values will be H=1.75, W=1.488, T=0.263.

I could have a Reset-Button to reset to (? some default)

Suggested or Auto would require lookup table for a multitude of fonts, so, this is Not something I want to bother with (too many fonts and too much work…).

Thus, it seems best to have User Enter desired individual HWT (as shown in the GUI)

As indicated above, not all Fonts are usable by Kicad and, though Kicad can be used someone with Artistic Font’s interest, it’s a tiny user population to bother with.
That said, Kicad current can nicely deal with using Artistic/Fonts/etc via the Image-Converter tool in the Main-Panel - See Example below of some Fonts exported to Footprint’s Silk-Layer

As indicated above…

In v7, colors are those of the Layer they’re placed on and Not something I care to bother with… and I suspect not many PCB fab houses can do Color…

Below shows three Footprints from the Converter (used BMP, PNG, TIFF). I did Not bother to tweak their Quality or Size (just loaded as-is, exported from LibreOffice’s Draw)