EESchema: How to make overbar more visible in global label?

If you create a global label for an inverted signal using
… this does indeed apply an overbar, but that overbar is almost invisible as it blends visually with the global label outline. Is there a way to improve this?


This is in Kicad 6.0.7.

Kicad Version info:
Application: KiCad Schematic Editor (64-bit)

Version: (6.0.7), release build

wxWidgets 3.1.7
libcurl/7.83.1-DEV Schannel zlib/1.2.12

Platform: Windows 10 (build 19044), 64-bit edition, 64 bit, Little endian, wxMSW

Build Info:
Date: Jul 26 2022 02:49:38
wxWidgets: 3.1.7 (wchar_t,wx containers)
Boost: 1.79.0
OCC: 7.6.0
Curl: 7.83.1-DEV
ngspice: 37
Compiler: Visual C++ 1929 without C++ ABI

Build settings:

I did try, in the label’s properties, changing the size of the characters, but this just made the whole shape smaller to match, and didn’t help the overbar.

For labels with overlines, I think the program should automatically downgrade the font size by one level instead of manually adjusting the font size. It is estimated that the overline problem can be better solved.


Of course, the size of the label outline should remain the same.

Looks like this in 6.0.7:

Bildschirmfoto vom 2022-09-26 09-09-54

What version are you using?

I am using Kicad 6.0.7, on Windows, if that matters. That result you show looks significantly better. I wonder what makes the difference?

Schematic Setup → Formatting → Global label size

OK, I had not noticed that the Global Label Properties dialog actually provides a hint "The margins around the text are controlled by the “text offset ratio” in Schematic Setup > General > Formatting.

There we find three parameters:
Default Text Size in mils, originally set to 50 mils (1.27 mm)
Text offset ratio (percentage), originally set to 8%
Global Label Size (percentage) originally set to 25%

I could not find any documentation for these latter two. The first question is – percentage of what?

I am currently experimenting to see what these parameters do. My first conclusion is that the salient parameter is Global Label Size, not Text Offset Ratio.

Yes, try e.g. 10 and 80% to see the difference.

(Grrrr … why are the Schematic Settings > Text settings in mils, when the schematic editor is set to mm, and the Label properties dialog is in mm. Not a key part of the issue at hand, just causing head ache.)

Here’s a solution to my original problem, and some documentation for the “Text” parameters in Schematic Setup > Formatting.

In the “Text” area:

Default text size:

This provides a starting text height for:

  • Text tool text
  • Labels

The Text Height property of text corresponds to the height of a capital letter, not counting the thickness of the lines used to draw the letter. Actual text will occupy more vertical height due to the thickness of the lines, and due to descenders on lower case letters, and overbars on negated signals.

Text offset ratio:

Pertains to local labels. This specifies the distance of the label from the wire according to the following formula.

Actual distance of wire to label = TextHeight * (TextOffsetRatioPct +16.7)/100

… again, ignoring thickness of the lines of the letters and the wire and also ignoring descenders.

Global Label Size:

This defines the size of the box shape around a global label.

GlobalLabelBoxHeight = TextHeightmm * (GlobalLabelSizePct * 2 + 125) / 100

We typically want global labels to be able to fit adjacent to each other when attached to a component that may have leads spaced (on the schematic) at 100 mil (2.54 mm) pitch. Consequently, the height of global labels should not exceed a maximum height of 2.54 mm.

We also want sufficient space around the text so that overbars do not overlap the box, as that makes them difficult to see. For example, a Global Label Size = 25% results in overlap of the overbar with the box, so is hard to read.

Instead, the default GlobalLabelSizePct is 37.5%. With the standard default height set for text at 1.27 mm, the Global label box height is exactly 2.54 mm, so that the top and bottom lines of the boxes of adjacent global labels overlap exactly and don’t double up visually. This reduces visual conflict with the overbars, and gives those overbars maximum space, given the height constraint.
K6_GlobalLabelOverbar_37.5pct K6_GlobalLabelOverbar_37.5pct_Z3 K6_GlobalLabelOverbar_37.5pct_Z2

Strange, because the default seems to be 37.5%. It’s stored in the .kicad_pro file if changed. If you check your file, it’s “label_size_ratio”. That line can be deleted (preferably when the project isn’t open in KiCad) and the project re-opened, and the default value is used.

@eelik Ah — I think I see the problem. The projects I’ve been looking at are ones converted from Kicad 5.

I can confirm that if I start a new project in K6, the Schematic Setup dialog does indeed show 37.5% for Global Label Size.

However, revisiting K5 just now, I don’t see either the Schematic Setup dialog, nor a way to set Global Label Size.

If I create a new project in K5, and on the schematic put a global label with overbar on it, that looks very readable. Looking in the project file, (old format of course) I don’t see any variable that might correspond to label_size_ratio.

If I then open that schematic in K6, the Schematic Setup shows Global Label Size = 25%, and the global label overbar looks bad as a result.

This suggests that there is a bug in the K5 to K6 converter.

Evidently, for projects started in K6, the default of 37.5% is just what I calculated would be optimum :-).


You can append any unit to the quantity when entering values, like 2.54mm or 0.1" or 2.54mm+0.1" (when you click another field and back you can misuse it as a unit converter or simple calculator). The display unit is just the default when no units are used.

@mgyger – good to know, but it would be nice if the dialogs agreed with the measurement unit currently selected in the editor.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.