Commit Graph

28 Commits

Author SHA1 Message Date
Marek Roszko 4746bde4b3 gal as a shared lib, gaasl! 2023-09-26 22:31:31 -04:00
Marek Roszko 050f812f5e Move fontconfig to kicommon for now to de-duplicate the font cache 2023-09-24 22:58:18 -04:00
Marek Roszko 22b733209d Fail GAL on its header leaking audit
Maybe we should rethink directly accessing GAL so much, but at least 600 files didn't need GAL leaked into them due to view_overlay.h
2023-09-18 19:52:27 -04:00
Jeff Young 5e112ca78e ADDED: parameterize font metrics and allow customization of overbar height. 2023-08-06 20:57:41 +01:00
Jeff Young 7e5fedef6a Markup fixes.
1) allow escape sequences inside markup sequences
2) keep overbar when inside nested markup
3) always place overbar at full height, not sub/superscript height

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

Fixes https://gitlab.com/kicad/code/kicad/issues/13449
2023-04-17 17:56:54 +01:00
Jeff Young 7b3e01ce52 Select correct face from a .ttc file.
Fixes https://gitlab.com/kicad/code/kicad/issues/13314
2023-03-13 18:29:55 +00:00
Seth Hillbrand 81256c0fa4 Prevent mutex deadlock
The overbar function in outline fonts recursively calls the text
function which already owns the lock.  To avoid this, we have an
unlocked variant that is wrapped by the exposed text function

Fixes https://gitlab.com/kicad/code/kicad/issues/14015
2023-02-23 14:59:59 -08:00
Mark Roszko 7b4abb1f7b FT_Face is also not thread, protect getTextAsGlyphs 2023-02-17 14:39:52 +00:00
Marek Roszko 65d5b34da3 freetype is not thread safe, zone filler can trigger multi-thread access
sentry KICAD-B1

https://freetype.org/freetype2/docs/reference/ft2-base_interface.html
[Since 2.5.6] In multi-threaded applications it is easiest to use one FT_Library object per thread.
In case this is too cumbersome, a single FT_Library object across threads is possible also, as long as a mutex lock is used around FT_New_Face and FT_Done_Face.
2023-02-17 07:26:52 -05:00
Seth Hillbrand cf52bfcc55 Handle missing Bold/Ital outline fonts
If the font face doesn't include a Bold or Italic version, we still want
to display the font as bold/italic, so we fake it with freetype.

This also prevents recurring error messages where the outline font warns
about "substitutes" within the same font family.

Also allows variants on the weight descriptor to be used without
throwing a substitution warning

Fixes https://gitlab.com/kicad/code/kicad/issues/13654
2023-01-25 13:13:38 -08: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
Jeff Young b4b16e7e0f Adjust overbar height for outline fonts. 2022-04-23 22:15:39 +01:00
Jeff Young fb1e1aec9a Add tab processing for outline fonts. 2022-04-20 12:00:19 +01:00
Ola Rinta-Koski 6196f2bdf0 Version info: report all font libraries 2022-03-07 14:01:37 +00:00
Jeff Young 5ce559176d Overhaul the font metrics calcs for overbar, italics and bboxes. 2022-02-07 17:36:40 +00:00
Jeff Young 5739505aa3 TextBoxes for PCBNew. 2022-01-31 20:00:47 +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
Jeff Young 6dc8cd3f18 Add FreeType version to version info.
Fixes https://gitlab.com/kicad/code/kicad/issues/10393
2022-01-21 13:21:21 +00:00
Ola Rinta-Koski da65fe0469 Font outline decomposition fixes 2022-01-15 12:51:09 +00:00
Jeff Young abd3f5bc2b Move footprints to EDA_ANGLE. 2022-01-14 16:08:18 +00:00
Jeff Young 8f7d2dd06a More VECTOR2D -> VECTOR2I and wxPoint cleanup. 2022-01-11 14:20:14 +00:00
Jeff Young a4349ae638 Cleanup and error reporting for fonts. 2022-01-09 11:34:20 +00:00
Marek Roszko 5621e49b21 vcpkg locates ft2build.h in the root of /include and not the freetype2 subfolder 2022-01-08 12:35:40 -05: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
Ola Rinta-Koski 9b406c1da4 Outline font support. 2022-01-08 16:47:45 +00:00