Jeff Young
2fe7219474
Support translation in tool context menus that are long-lived.
(The specialized ones are OK as they're created
for each use.)
Also, enum maps must be untranslated.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21859
1 week ago
Seth Hillbrand
6929f86b98
Guard EDA_TEXT bbox cache
Attempt to fix QA segfault
3 weeks ago
Seth Hillbrand
a857ea77d9
ADDED: Text expression evaluation
Arbitrary text strings now support full evaluation with a rich
functional language
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6643
1 month ago
Jeff Young
c6fcf7e0b8
Allow easier code searching for property names.
1 month ago
Jeff Young
1e9da4684a
Move properties inspector font-listing to SetChoicesFunc().
2 months ago
Jeff Young
e230d5164d
Honour renderSettings' default font.
This still leaves a few things out in the cold,
such as hit-testing and polygon generation.
But at least it allows us to plot with a default
font.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19031
3 months ago
Jeff Young
34139ae305
Push generalised sketch-mode support down into DXF_PLOTTER.
5 months ago
Jeff Young
5371312c6f
Make auto text thickness active.
6 months ago
Jeff Young
ac616b8c19
Restore visibility editing for fields.
(It got accidentally thrown out with visibility
for text items.)
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20560
6 months ago
Jeff Young
a8a1b08013
Make sure protobuf API stays consistent.
8 months ago
Jeff Young
5edae8250d
Finish eradication of visibility flag on text items.
Import/read previously-hidden symbol/footprint
text items as hidden fields.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19875
8 months ago
Jeff Young
d30f507fd8
Cache bboxes for all lines.
(Otherwise iterating over them makes the cache useless.)
Also fixes two bugs where the cache pos wasn't copied.
9 months ago
Wayne Stambaugh
5c8f4697ca
Common folder housekeeping part 1.
9 months ago
Seth Hillbrand
0b2d4d4879
Revise Copyright statement to align with TLF
Recommendation is to avoid using the year nomenclature as this
information is already encoded in the git repo. Avoids needing to
repeatly update.
Also updates AUTHORS.txt from current repo with contributor names
9 months ago
Jeff Young
80885ec774
Abandon the fontTextMap.
It's too fragile due to the way we move things around. Instead
store the unresolved name in the EDA_TEXT item and then scan the
whole document to resolve the EDA_TEXT items.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19383
10 months ago
Jeff Young
61dac76224
Don't discard render cache when substituting font.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18672
10 months ago
Jon Evans
13625daeca
API: Implement dimension serialization
10 months ago
Jon Evans
3129e072c4
API: Move graphics and text handling to common
Required moving API_HANDLER_COMMON out of kicommon
11 months ago
Jeff Young
6686ade45b
Remove (somewhat atrophied) manual pretty printing.
Also fixes a bug where the pretty printer didn't insert
linebreaks for a forest (it assumed a single tree root).
Also further regularises bool and quote formatting.
11 months ago
Dhineshkumar S
43b1bc52db
Fix switching bold option on and off alters text thickness
Currently, unselecting the bold option resets the thickness to the
standard size instead of reverting to the original thickness.
To address this, the original thickness should be preserved so it
can be restored when bold is turned off.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18975
11 months ago
John Beard
4bad76825c
Standardise clamp function
std::clamp and alg:clamp had different argument orders.
Since std::clamp is constexpr, we might as well just use
that now we have it.
1 year ago
John Beard
f4eb173c43
BOX2: By-value GetInflated method
This allows better value-semantics and const correctness.
This is a common method, as the Inflate method is
in-place:
BOX2I inflated = other;
// 'Inflated' is not inflated yet
inflated.Inflate( delta );
// Now it is inflated, but it's not const
This is annoying, as the 'inflated' box cannot easily
be made const. Instead:
const BOX2I inflated = other.GetInflated( delta );
1 year ago
John Beard
b043f334de
Update font when needed on italic/bold change
When the italic or bold nature is changed, text using outline fonts may
need to change its font. Add this to the SetItalic/SetBold functions.
Also add a counterpart SetItalicFlag function (following SetBoldFlag)
when you only need to set the flag (e.g. when importing or changing
everything in the text properties dialog).
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18592
1 year ago
jean-pierre charras
3bacfacf95
Ensure non handled text properties are never written in .kicad_pcb files
ctl_flags.h: fix two duplicate flag values.
1 year ago
jean-pierre charras
a075a80b3c
Move all CTL_OMIT_xxx flags definitions into a new file ctl_flags.h
Previously, they were defined in different files, and sometimes redefined.
This change should not create an actual code change.
However, this move shows there are the same value used for different flags,
so another fix should be made later.
1 year ago
Jeff Young
e332320108
Handle font when reading render cache.
(Also fixes a bug where the cache's triangulation wasn't
cached.)
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17666
1 year ago
Seth Hillbrand
72eee002aa
Add effective display for fields
1 year ago
Seth Hillbrand
c8375c151c
Launch default URI handler if exists
Otherwise, handle as a normal file
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17902
1 year ago
Jeff Young
c59ed0bbb7
Flip symbol editor's Y axis to match other editors.
1 year ago
Jeff Young
fc572bfbc6
Make sure users don't run into min text size.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17543
2 years ago
Jeff Young
d08e0e9eaa
_() -> _HKI() for group names.
2 years ago
Jeff Young
aef87b9796
Push thickness handling down into EDA_TEXT::SetBold().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17077
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14875
2 years ago
Jeff Young
e7abeb3c38
Cleanup.
2 years ago
Jeff Young
8efd90e6e8
Allow reading of 0 text sizes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16902
2 years ago
Marek Roszko
740c7a73a2
Add missing color prop for text
2 years ago
Jeff Young
a5ee614ae8
Comments.
2 years ago
Jeff Young
65b89116e1
Clean up formatting.
2 years ago
Jon Evans
7470ec80e4
Fix some issues with Font property
Prevent out-of-bounds access
Make sure list is initialized in symbol editor frame
Don't re-init the list more frequently than necessary
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16399
2 years ago
Jon Evans
786a4ce675
Use explicit booleans for schematic format
2 years ago
Jeff Young
67d8b13b02
And Font to properties manager for EDA_TEXT items.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16004
2 years ago
Seth Hillbrand
d99641be40
ADDED: Git integration support
Adds support for project-based git integration, branch support, commit,
revert and updates
Fixes https://gitlab.com/kicad/code/kicad/issues/10441
2 years ago
Jeff Young
f2c0f4c87f
Fix logic screw-up in earlier commit.
2 years ago
Jeff Young
6fbbf981f0
Handle justification when hit-testing fields.
This steals the algo used in SCH_PAINTER to get the right coords
for the text.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15722
2 years ago
Jeff Young
0310973e3f
Push TEXT_SPIN_STYLE from SCH_TEXT out to SCH_LABEL_BASE.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15444
2 years ago
Jeff Young
7b71e55ab9
Don't allow updates to shown_text outside of cacheShownText().
But also don't use cacheShownText() in c'tors, as it will not call
the subclass's version.
2 years ago
Jeff Young
5e112ca78e
ADDED: parameterize font metrics and allow customization of overbar height.
2 years ago
Jeff Young
eedf319ba4
Don't double-offset effective text shapes.
Also fixes several bugs with intersheet ref fields. (It's possible for
other fields to have an ID of 0.)
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15165
2 years ago
Jeff Young
782c73300b
Move drawing sheet datastructures to EDA_IU_SCALE.
Or mostly, at least. Plotters still define their own mils-to-iu scale.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14934
2 years ago
Jeff Young
5875f89531
Centralize text size clamping.
Also introduces alg::clamp to improve readability of
std::max( min, std::max( value, max ) )
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14876
2 years ago
Jeff Young
570978fa7f
Replace larger text bboxes now that we're not using them for knockouts.
2 years ago