Dhineshkumar S
37b23ecf2d
Merge branch 'fix-text-bold-thickness-v2-18975' into 'master'
...
Draft: Fix for ensuring thickness reverts only when the user manually sets it.
Closes #18975
See merge request kicad/code/kicad!2182
2025-09-11 18:21:38 +00:00
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
2025-09-04 14:57:16 -07:00
Jeff Young
c6fcf7e0b8
Allow easier code searching for property names.
2025-08-30 19:09:15 +01:00
Jeff Young
1e9da4684a
Move properties inspector font-listing to SetChoicesFunc().
2025-08-07 11:44:47 +01:00
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
2025-07-17 09:35:21 +01:00
Jeff Young
34139ae305
Push generalised sketch-mode support down into DXF_PLOTTER.
2025-05-10 17:31:59 +01:00
Jeff Young
5371312c6f
Make auto text thickness active.
2025-04-20 19:59:05 +01:00
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
2025-04-05 22:18:17 +01:00
Dhineshkumar S
072c74caf2
Fix for ensuring thickness reverts only when the user manually sets it.
...
Fixes #18975
2025-03-05 00:01:23 +05:30
Jeff Young
a8a1b08013
Make sure protobuf API stays consistent.
2025-02-20 17:47:40 +00:00
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
2025-02-19 23:43:52 +00:00
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.
2025-01-14 12:24:24 +00:00
Wayne Stambaugh
5c8f4697ca
Common folder housekeeping part 1.
2025-01-12 12:06:45 -05:00
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
2025-01-01 14:12:04 -08:00
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
2024-12-27 18:59:22 +00:00
Jeff Young
61dac76224
Don't discard render cache when substituting font.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18672
2024-12-24 20:07:06 +00:00
Jon Evans
13625daeca
API: Implement dimension serialization
2024-11-30 17:22:15 -05:00
Jon Evans
3129e072c4
API: Move graphics and text handling to common
...
Required moving API_HANDLER_COMMON out of kicommon
2024-11-28 11:28:06 -05:00
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.
2024-11-28 11:08:16 +00:00
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
2024-11-13 02:14:19 +00:00
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.
2024-10-09 21:27:58 -06:00
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 );
2024-09-11 22:35:35 +01:00
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
2024-08-28 13:49:36 +01:00
jean-pierre charras
3bacfacf95
Ensure non handled text properties are never written in .kicad_pcb files
...
ctl_flags.h: fix two duplicate flag values.
2024-07-14 20:45:40 +02:00
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.
2024-07-14 18:10:37 +02:00
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
2024-05-21 11:31:35 +01:00
Seth Hillbrand
72eee002aa
Add effective display for fields
2024-05-07 17:59:13 -07:00
Seth Hillbrand
c8375c151c
Launch default URI handler if exists
...
Otherwise, handle as a normal file
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17902
2024-05-06 12:22:40 -07:00
Jeff Young
c59ed0bbb7
Flip symbol editor's Y axis to match other editors.
2024-04-27 13:47:56 +01:00
Jeff Young
fc572bfbc6
Make sure users don't run into min text size.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17543
2024-03-23 15:50:45 +00:00
Jeff Young
d08e0e9eaa
_() -> _HKI() for group names.
2024-02-28 17:50:51 +00:00
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
2024-02-25 17:28:52 +00:00
Jeff Young
e7abeb3c38
Cleanup.
2024-02-24 20:05:51 +00:00
Jeff Young
8efd90e6e8
Allow reading of 0 text sizes.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16902
2024-02-07 16:46:42 +00:00
Marek Roszko
740c7a73a2
Add missing color prop for text
2024-02-05 01:09:42 -05:00
Jeff Young
a5ee614ae8
Comments.
2024-01-24 14:51:41 +00:00
Jeff Young
65b89116e1
Clean up formatting.
2024-01-18 16:17:46 +00:00
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
2023-12-22 18:34:48 -05:00
Jon Evans
786a4ce675
Use explicit booleans for schematic format
2023-11-29 16:17:41 +00:00
Jeff Young
67d8b13b02
And Font to properties manager for EDA_TEXT items.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16004
2023-11-01 00:39:42 +00:00
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
2023-10-20 12:51:47 +00:00
Jeff Young
f2c0f4c87f
Fix logic screw-up in earlier commit.
2023-10-03 20:53:52 +01:00
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
2023-10-03 14:36:13 +01:00
Jeff Young
0310973e3f
Push TEXT_SPIN_STYLE from SCH_TEXT out to SCH_LABEL_BASE.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15444
2023-09-07 17:42:51 +01:00
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.
2023-08-07 23:22:09 +01:00
Jeff Young
5e112ca78e
ADDED: parameterize font metrics and allow customization of overbar height.
2023-08-06 20:57:41 +01:00
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
2023-07-10 19:32:00 +01:00
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
2023-06-12 22:34:25 +01:00
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
2023-06-03 20:29:51 +01:00
Jeff Young
570978fa7f
Replace larger text bboxes now that we're not using them for knockouts.
2023-05-28 18:17:24 +01:00