1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00
Commit graph

14317 commits

Author SHA1 Message Date
reuk
d7788100d5
ModalComponentManager: Remove friendship with Component
This change makes it slightly easier to audit invariants of
ModalComponentManager, as we can now be certain that only member
functions of ModalComponentManager can access its data members.
2024-05-31 11:43:28 +01:00
Anthony Nicholls
24f3a91a35 Timer: Add a leak detector 2024-05-30 18:33:03 +01:00
Anthony Nicholls
98acf79859 Timer: Prevent assertion from the Shutdown detector 2024-05-30 18:33:03 +01:00
Anthony Nicholls
9b44fa750b Timer: Stop the timer thread on shutdown to prevent a potential hang on windows
This commit reverts commit: 9e9da250 as it introduced a regression.
On windows when exit is called on a dll it forcibly kills any threads
still running before destroying any static objects. This means if a
Timer object is static the timer thread will be killed. Later when the
static object is destroyed it will wait for the thread to exit, which
because the OS forcibly killed it will never come true.
2024-05-30 18:33:03 +01:00
Oliver James
212d4631fc Resave all Projects 2024-05-30 12:24:20 +01:00
attila
51955453ef Remove TextLayout::createNativeLayout() 2024-05-30 12:21:35 +01:00
Oliver James
38f299a054 TextLayout: Respect the ReadingDirection parameter of AttributedString 2024-05-30 12:21:35 +01:00
Oliver James
03e79f8f12 TextLayout: Use new shaping engine
By utilising ShapedText in the TextLayout implementation.
2024-05-29 15:11:57 +02:00
attila
30daa356ca ShapedText::Detail: Add getSimpleShapedText() 2024-05-29 15:11:57 +02:00
attila
d794fac44c SimpleShapedText: Fix line break behaviour with text trailing whitespaces
This fixes an issue with the text wrapping logic for text chunks ending
in a whitespace.

When trying to fit a text chunk, the logic works with two values: width
with trailing whitespace, and width without trailing whitespace.

When the trailingWhitespacesShouldFit option is false, the logic
checks if "withoutTrailingWhitespace" can still fit inside the remaining
width.

Prior to this fix, it then decremented the remaining width with
"withoutTrailingWhitespace", but it should have used
"withTrailingWhitespace" for the decrement operation, always, regardless
of the value of the withTrailingWhitespacesShouldFit option.

This mistake only caused an observable issue when multiple fonts were
used for the shaping operation, and a different font would be used
immediately after a whitespace falling at the end of a line.
2024-05-29 15:11:57 +02:00
attila
aee65c147e JustifiedText: Fix line spacing for multi-font text
Prior to this change, the spacing between line N and line N + 1 would be
lineHeight (N).

This resulted in incorrect spacing when using multiple fonts in a text.

This commit uses the correct spacing, which is
maxDescent (N) + maxAscent (N + 1). This is also the same rule that was
used by TextLayout prior to JUCE 8, and the rule that CoreText's
AttributedString features are using as a general rule.

Note: lineHeight (N) = maxAscent (N) + maxDescent (N).
2024-05-29 15:11:57 +02:00
Matt Gonzalez
99adac2871
Direct2D: Skip invalid path elements when converting a Path to a Geometry 2024-05-28 16:08:55 +01:00
Matt Gonzalez
77f6eb00ff
Direct2D: Reset pending clip list after setting device space origin
https://forum.juce.com/t/the-juce-8-preview-branch-is-available-now/60950/144?u=matt
2024-05-28 16:08:55 +01:00
Matt Gonzalez
dfb21da572
Direct2D: Use axis-aligned clip layer when possible in clipToImageAlpha 2024-05-28 16:08:55 +01:00
Matt Gonzalez
6ca54e8c97
Direct2D: Add debug check for axis-aligned clip layers
This is similar to the check performed by the D2D debug layer that will still work with the debug layer disabled.
2024-05-28 16:08:55 +01:00
reuk
2ca5fdf18d
Direct2D: Avoid continuous repainting when moving but not resizing windows 2024-05-28 11:28:51 +01:00
reuk
be98c7eaea
Resave all projects 2024-05-23 18:39:58 +01:00
Tom Poole
722557693f
Add CHOC and QuickJS licensing information 2024-05-23 13:41:59 +01:00
Tom Poole
9883d0c48a
Add AAX license file 2024-05-23 13:41:59 +01:00
reuk
10f6bd34a7
AAX: Projucer, use bundled copy of the AAX SDK by default 2024-05-23 13:41:59 +01:00
reuk
430bddfb06
AAX: CMake, use bundled copy of the AAX SDK by default 2024-05-23 13:41:59 +01:00
reuk
6bd300fe78
AAX: Bundle files from the AAX SDK 2024-05-23 13:41:58 +01:00
Oliver James
345356b99d Resave all projects 2024-05-23 13:27:54 +01:00
Oliver James
44a750df40 Unicode: Ignore punctuation when resolving implicit characters
This commit implements fix for an issue where mixed punctuation can be rendered in the wrong order.

A regression test has been added to catch this in the future.
2024-05-23 12:54:13 +01:00
Oliver James
0b60559905 Unicode: Perform major refactor
This commit encapsulates the following:
* Removal of public Unicode classes.
* Move to new 'blob' generated data format.
* Fix issue where numerical characters would be assigned incorrect bidirectional levels, resulting in them rendering in the wrong order.
* Adds a unit test for the number ordering issue.
* Refactor of Bidirectional and Line breaking algorithms.
2024-05-23 12:54:13 +01:00
Anthony Nicholls
75e8c52d20 Licence: Fix a typo 2024-05-22 07:55:37 +00:00
reuk
6b89bb6f91
Font: Fix result of getDescent(), which was incorrect when font height was set in points 2024-05-20 12:49:56 +01:00
reuk
365e8a235d
Font: Remove unnecessary conversion from point-height to juce-height when using FontOptions 2024-05-20 12:49:56 +01:00
reuk
5b2f9d4019
GraphicsContext: Avoid attempting to paint empty rectangles in all renderers 2024-05-20 12:49:56 +01:00
reuk
06137fb7f5
Direct2D: Slightly shrink excluded clip regions in order to draw transformed opaque components without border artefacts 2024-05-20 12:49:55 +01:00
reuk
e11b8f5ccb
CoreGraphics: Slightly shrink excluded clip regions in order to draw transformed opaque components without border artefacts
Previously, drawing an opaque, scaled component with CoreGraphics could
lead to visible artefacts around the edge of the component.

When drawing the parent of an opaque component, the area covered by the
opaque component is excluded from the clip region. If the clip region is
non-integral when transformed into device space, anti-aliasing will be
applied on the edges of the clip region. Similarly, when drawing the
opaque component itself, anti-aliasing will be applied at the edges of
the component. When the two drawings are superimposed, the foreground
anti-aliased pixels will be blended with the background anti-aliased
pixels, leading to a noticeable border around the component. Ideally,
only the foreground anti-aliasing should be applied, and the background
should not be anti-aliased around its edges.
2024-05-20 12:49:55 +01:00
reuk
bd2aea9676
AffineTransform: Add isOnlyTranslationOrScale() helper 2024-05-20 12:49:55 +01:00
reuk
592df26ff0
ComponentHelpers: Refactor clipObscuredRegions 2024-05-20 12:49:55 +01:00
reuk
78521395f2
AAX Client: Add more ignored warnings for Clang on Windows 2024-05-20 12:49:55 +01:00
reuk
72c7fd3070
CoreAudio: Allow non-combined devices to restart successfully 2024-05-20 12:49:55 +01:00
reuk
f2449cb092
CoreAudioIODevice: Make stopAndGetLastCallback() private 2024-05-20 12:49:55 +01:00
reuk
0444e3d69c
EdgeTable: Avoid reinterpret_cast in multiplyLevels 2024-05-20 12:49:55 +01:00
reuk
ce0fe3dc1e
EdgeTable: Keep better track of buffer memory ranges
Occasionally, on Linux, Address Sanitizer can complain about a memory
region overlap in the arguments to memcpy, originating in
EdgeTable::intersectWithEdgeTableLine. I haven't been able to reproduce
this personally.

The final memcpy call in this function requires there to be
"srcNum1 * 2" valid entries after the current "src1" ptr, and none of
those entries may overlap with the area starting at "temp".

On inspection, I think that the memory region being read is too large.
At the point of the call, src1 will point to a LineItem::level, not
LineItem::x, so there will actually be (srcNum1 * 2 - 1) valid items
following it.

All this pointer arithmetic is very difficult to understand. In an
effort to make this function slightly more understandable, I've switched
to using Spans to delineate lines of the table, which makes it easier to
keep track of the size of each line.
2024-05-20 12:49:55 +01:00
reuk
417d97b36e
EdgeTable: Implement using vector to simplify special member functions 2024-05-20 12:49:54 +01:00
reuk
631b2ea2ba
Component: Cache effect images internally to Component, to avoid hash collisions in the ImageCache 2024-05-20 12:49:54 +01:00
reuk
d9a9356267
CameraDevice: Simplify data shared across threads, to reduce potential for data races 2024-05-20 12:49:54 +01:00
reuk
047f7aaad2
CMake: Avoid marking plugin SDK include directories as system includes 2024-05-20 12:49:53 +01:00
reuk
c0d0c1f9c6
VirtualDesktopManager: Avoid caching COM object which might be invalidated if COM is uninitialised and reinitialised 2024-05-20 12:48:11 +01:00
reuk
aeeb06ccb9
SafePointer: Avoid potential double-deletes
deleteAndZero now behaves more like unique_ptr::reset, which sets the
new stored value before freeing the old one.
2024-05-20 12:48:11 +01:00
reuk
5d2b1b7aa7
UnicodeData: Remove unnecessary pack pragmas 2024-05-20 12:48:11 +01:00
Anthony Nicholls
b9a1bfbc22 Formatting: Fix line endings in inl file 2024-05-10 14:30:44 +01:00
Matt Gonzalez
dfa94981e4 D2D: Pass the clearImage flag to the BitmapData backup image
https://forum.juce.com/t/the-juce-8-preview-branch-is-available-now/60950/123
2024-05-10 11:55:28 +01:00
Anthony Nicholls
9e9da250eb Timer: Ensure the timer thread is deleted before any static or global destructors run
In cases where there was a static or global instance of a class that
inherited from Timer, due to the order of events when a dll is unloaded
on windows, there was a risk of an infinite hang. Deleting the timer
thread before the dll is unloaded avoids this occurring.
2024-05-10 11:55:28 +01:00
Anthony Nicholls
7b4f71e700 DemoRunner: Fix c++20 warning 2024-05-10 11:55:28 +01:00
attila
dbd3b4f34b Place all choc types inside an anonymous namespace
This is to allow users to include choc in a JUCE project and not have
symbol collisions with our internally included copy of choc.
2024-05-10 11:55:28 +01:00