Commit Graph

24 Commits

Author SHA1 Message Date
Seth Hillbrand 5aba9b539f Revert font spacing/tabs to the v6 model
While convoluted, this model matches as best we have found so far, the
alignment with scintilla.  The spacing is character size for N-1 of the
characters in the 4-space tab stops.  The final character is sized for
the actual space character in the stroke font (0.761905)

Fixes https://gitlab.com/kicad/code/kicad/issues/13791

(cherry picked from commit bce402a01c)
2023-03-06 16:23:06 -08:00
Jeff Young b2241dca72 Adjust stroke font baseline offset to better match 6.0.
Fixes https://gitlab.com/kicad/code/kicad/issues/13886

(cherry picked from commit 4bb508eacf)
2023-02-26 21:59:43 +00:00
Jeff Young 387f1214f0 Add some heuristics to guess a better font overbar offset.
Fixes https://gitlab.com/kicad/code/kicad/issues/13010
2022-11-26 17:26:20 +00:00
Jeff Young 560dc7d2b6 Underline for hypertext rollovers. 2022-08-27 23:58:13 +01:00
Seth Hillbrand 7a8b188569 Fix Sentry crash for font loads
We cache newstroke loading, but if we have threaded loads, we might ask
multiple threads to load the newstroke font at the same time.  This
causes conflicts in the vector allocations->crashes
2022-08-23 09:51:20 -07:00
Jeff Young 9b6a10fa6a Fix mirrored overbars.
Also fixes a bug that we'd render too many glyphs when some glyphs
were combined.  (To test, render "text" in Apple Chancery.  The opening
"te" is combined into a ligature after which we render an extra 't' at
the end.

Fixes https://gitlab.com/kicad/code/kicad/issues/11441
2022-04-23 14:21:12 +01:00
Jeff Young 37a2ee7d03 Replace tab processing that got lost in move to new font engine.
Fixes https://gitlab.com/kicad/code/kicad/issues/11123
2022-04-20 00:06:34 +01:00
Jeff Young 5ce559176d Overhaul the font metrics calcs for overbar, italics and bboxes. 2022-02-07 17:36:40 +00:00
jean-pierre charras bc710e3d97 Rework on commit 6a9607bto fix non printable char codes 2022-02-07 12:37:36 +01:00
jean-pierre charras b042e8cc41 outline_decomposer.cpp: fix a typo from commit 0a5ddb8
stroke_font.cpp better fix for commit 6a9607b
2022-02-06 18:09:30 +01:00
jean-pierre charras 6a9607b76f Fix crash when trying to draw a text with non printable chars.
Fixes #10772
https://gitlab.com/kicad/code/kicad/issues/10772
2022-02-06 08:34:19 +01:00
Jeff Young 7dadc9d2f0 Fix text bounding boxes. 2022-02-03 23:07:41 +00:00
Jeff Young c6a8100d46 Schematic and symbol text boxes.
Also fixes some plot bugs with arcs.

Also moves polygonization of arcs (when required) in plotting code
from 5 degrees to calculated based on ARC_HIGH_DEF.

Fixes https://gitlab.com/kicad/code/kicad/issues/5017
2022-01-28 21:38:15 +00:00
jean-pierre charras f651e31965 Fix minor compil and Coverity warnings. 2022-01-25 12:52:13 +01:00
jean-pierre charras d0f2c20235 Define our kicad font name only once, and do not translate it.
Especially using a translated name breaks kicad config and files because
in non English languages both translated and not translated names were used in code.
2022-01-13 14:32:55 +01:00
Jeff Young 8f7d2dd06a More VECTOR2D -> VECTOR2I and wxPoint cleanup. 2022-01-11 14:20:14 +00:00
Jeff Young 7e18256386 Performance optimizations for building the stroke font. 2022-01-09 15:47:08 +00:00
Jeff Young 04c76f10e9 Performance enhancements for fonts. 2022-01-08 16:47:45 +00:00
Jeff Young 438c63f587 Fix outline font boundingbox issues. 2022-01-08 16:47:45 +00:00
Jeff Young eb58d7e44c Text glyph caches and bug fixes.
1) Unify metrics between stroke and outline fonts
2) Unify handling of rotation and mirroring
3) Bug fixes in collision handling
4) Use of VECTOR2I (instead of VECTOR2D) for world-coordinates
5) Generate outline font overbar with rounded ends and fix rotation
bugs
6) Generate wxEVT_CHOICE events from FONT_CHOICE::SetFontSelection
7) Change text-item PNS SOLIDs to use compound shapes
2022-01-08 16:47:45 +00:00
jean-pierre charras 2bfff9d4ce Fix crash when trying tp draw a text with over-bar.
(missing initialization of a pointer)
Fixes #10252
https://gitlab.com/kicad/code/kicad/issues/10252
2022-01-04 18:18:34 +01:00
Jeff Young cbd665db7b Remove markup_parser from headers so PEGTL doesn't leak windows.h. 2022-01-04 12:20:18 +00:00
Jeff Young 8e4a4306c7 Go back to using inter-character spacing from the stroke font.
Fixes https://gitlab.com/kicad/code/kicad/issues/1078
2022-01-04 00:46:08 +00:00
Jeff Young 89c0f8e297 Move to new font engine. 2022-01-02 14:57:03 +00:00