Tom Poole
ff0cb4ad5b
Use NullCheckedInvocation in more places
2023-10-02 13:40:10 +01:00
Tom Poole
7d45d498b9
Removed some superfluous consts from definitions
2023-09-20 16:31:10 +01:00
reuk
28414a6af8
Global: Avoid floating-point equality checks where possible
2023-04-04 19:55:11 +01:00
reuk
7c14c1fcd7
Use more concise stdlib type aliases
2022-09-26 18:03:47 +01:00
reuk
8b8ae10059
Build: Replace JUCE_NODISCARD with [[nodiscard]]
2022-09-12 16:14:57 +01:00
Tom Poole
2ec861d99e
Update licensing banners to JUCE 7
2022-05-16 17:55:48 +01:00
Tom Poole
68514d626c
Graphics: Added a global GlyphArrangement cache
2022-04-04 12:36:33 +01:00
Tom Poole
dea3fe60e4
Update copyright banners
2022-04-04 12:36:32 +01:00
reuk
e27fb35996
Fonts: Adjust attribute ranges correctly when rendering AttributedStrings
...
CFAttributedString ranges must be given in terms of 16-bit word offsets,
rather than codepoints.
2022-02-23 10:56:09 +00:00
reuk
6a1a96247b
GlyphArrangement: Avoid breaking on non-breaking spaces
2022-01-28 16:09:59 +00:00
reuk
b80927fc91
Nodiscard: Add to builder-pattern functions
2022-01-27 18:43:21 +00:00
ed
b9542ccc4c
Update code to use C++14 [[deprecated]] attribute
...
This commit removes the various compiler-specific JUCE_DEPRECATED macros and replaces them with C++14's deprecated attribute. It also removes the JUCE_CATCH_DEPRECATED_CODE_MISUSE flag as we can rely on the override specifier catching usage of these old virtual methods, and tidies up the DOXYGEN preprocessor checks as they were inconsistent across the codebase.
2021-09-29 16:14:00 +01:00
reuk
3768349a05
Font: Make Font and TypefaceCache threadsafe
...
Previously, it wasn't safe to access Font instances from multiple
threads because there was a chance that they might reference the same
shared internal state. In this case, calling getTypeface() or getAscent from
two threads simultaneously would cause a race on the typeface and ascent
data members, even though the Font instances appeared to be disjoint.
With this change in place, it is now safe to use Font instances from
multiple threads simultaneously.
It is still an error to modify the same Font instance from multiple
threads without synchronization!
// Fine:
Font a;
Font b = a;
auto futureA = std::async (std::launch::async, [&a] { /* do something with a */ });
auto futureB = std::async (std::launch::async, [&b] { /* do something with b */ });
// Bad idea:
Font f;
auto futureA = std::async (std::launch::async, [&f] { /* do something with f */ });
auto futureB = std::async (std::launch::async, [&f] { /* do something with f */ });
2021-09-23 10:28:47 +01:00
ed
b760620e05
TextLayout: Ensure that line origin is set correctly when line starts with whitespace or newline glyphs
2021-09-02 08:35:14 +01:00
ed
2be72f6acd
Partially revert e1366361
...
This fixes a bug when creating a TextLayout with whitespace at the start of lines.
2021-08-31 12:15:15 +01:00
ed
e1366361ed
TextLayout: Skip whitespace tokens in TokenList::createLayout() to fix misalignment when using horizontally centred justification
2021-07-07 10:21:38 +01:00
reuk
55f6f3227d
TextLayout: Tidy up special member functions
2021-07-05 12:21:36 +01:00
ed
a4d43c16e3
Added an underline toggle to FontsDemo
2020-08-04 10:26:41 +01:00
reuk
394c4fd475
Clang: Fix warnings when building with clang 10
2020-07-01 10:00:43 +01:00
ed
009d685179
Updated all license headers
2020-06-29 08:30:22 +01:00
reuk
3a9e26b26c
Font: Fix deadlock in findTypefaceFor
2020-06-11 12:38:11 +01:00
reuk
4cf66d6522
Cleanup: Remove redundant inlines
2020-04-27 10:22:06 +01:00
Tom Poole
894e7d2bd2
Updated all license headers
2020-04-23 17:30:39 +01:00
reuk
327f817b9b
Copyrights: Update commercial/gpl headers to be gpl-only
2020-04-09 15:22:56 +01:00
Tom Poole
47f138464f
macOS: Fixed a CoreGraphics text layout bug
2020-01-17 16:34:50 +00:00
ed
a54da0b832
Fixed some more typos
2020-01-07 08:53:23 +00:00
Tom Poole
1d2fc2ddd5
macOS: Fixed an issue restoring graphics state after drawing an AttributedString
2019-12-30 15:12:02 +00:00
ed
e262bfa531
Fixed a few documentation typos
2019-09-12 10:19:33 +01:00
Tom Poole
c6a4bb567e
Removed a leaking UnitTest
2019-08-14 12:26:09 +01:00
reuk
edf99d171f
TextLayout: Fixed some bugs setting stringRanges
2019-08-08 17:58:17 +01:00
Tom Poole
1b4042217a
macOS: Fixed an issue unregistering fonts
2019-07-11 15:48:49 +01:00
Tom Poole
79d3e8b3f5
Windows: Removed some VS2013 workarounds
2019-07-11 15:28:41 +01:00
ed
06da4f2daf
Added a font 'leading' parameter for multiline text layouts
2019-03-11 16:43:21 +00:00
ed
a234721110
Added various clang-tidy modernize-* fixes
2019-01-31 15:15:31 +00:00
jules
cadac817c6
Enabled some more warning flags in Xcode, and fixed the problems they caused
2019-01-11 09:52:10 +00:00
ed
eaf0f990d4
Replaced all uses of static_cast<Type&&> with std::move
2018-11-28 17:29:20 +00:00
ed
c723e56952
Defaulted some constructors and copy assignment operators in AttributedString
2018-11-28 17:01:45 +00:00
ed
9de863a272
Fix a typo
2018-11-28 16:39:46 +00:00
ed
7a41d53409
Fix some potential issues with using auto in a backwards loop in the previous commit
2018-11-28 15:49:08 +00:00
ed
f1d5e5c9cc
Avoid hitting an assertion in the splitAttributeRanges() method of AttributedString due to inserting a reference to an Array member into the Array + some misc clean up in the class
2018-11-28 15:39:18 +00:00
jules
1e6bbb8da9
Added some methods to allow ReferenceCountedObjectPtrs to be constructed or copied from references as well as pointers - as well as increasing safety, this actually makes things a bit more efficient as it skips a nullptr check. Updated lots of places in the code that could take advantage of this
2018-07-03 11:51:13 +01:00
jules
49aa9c9db4
Added flag JUCE_STRICT_REFCOUNTEDPOINTER which is recommended to avoid accidental leaks when using ref-counted pointers. Enabled this flag in the demo projects, and used it to help tidy up some dubious smart-pointer use
2018-06-26 14:06:52 +01:00
jules
974b4a8351
Removed some legacy friend class declarations that are no longer needed with modern compilers
2018-06-13 17:11:37 +01:00
jules
87042769b6
Tidied up some more old typedefs
2018-05-11 14:44:51 +01:00
jules
38295f332b
Converted some old typedefs to using declarations
2018-05-03 09:59:05 +01:00
Tom Poole
ab863a6dc2
Replaced all usage of ScopedPointer with std::unique_ptr
2018-04-19 20:27:47 +01:00
ed
cdbc28c18b
Add documentation tags
2018-03-15 12:10:32 +00:00
jules
48a5fbd333
Another batch of ScopedPointer cleanups
2018-01-10 14:49:57 +00:00
Tom Poole
cff37f5b6a
Fixed some const violation errors
2017-12-19 12:44:24 +00:00
jules
58a99ff139
Dragged the singleton macros into the 21st century.. Cleaned up their implementation and gave them new upper-case names to match juce official style. The old names are still defined to avoid breaking old code, but please update before they get deprecated!
2017-12-12 16:24:40 +00:00