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

14651 commits

Author SHA1 Message Date
reuk
1798b12d4b VST3 Client: Fix build failure when JUCE_PLUGINHOST_VST3=1 is defined 2024-09-30 20:12:51 +01:00
reuk
f5f758c032 Partially revert "ComponentPeer: Add isShowing() member, which more closely matches expected behaviour of Component::isShowing"
This partially reverts commit 555b667d22.

Using ComponentPeer::isShowing instead of ComponentPeer::isMinimised
inside Component::isShowing can cause problems when displaying OpenGL
components.

Specifically, OpenGL components use a ComponentMovementWatcher to
determine when they should be attached/detached from the parent window.
The ComponentMovementWatcher updates whenever a component visibility
change event is emitted, which happens in two cases:
- Component::setVisible is called on the OpenGL component or an ancestor
- ComponentPeer::handleMovedOrResized is called in response to a
  minimisation state change

When handling either of these events, the ComponentMovementWatcher will
call Component::isShowing to determine whether or not the component is
really showing.

The problem is that the result of ComponentPeer::isShowing may change
independently of changes to the Component visiblity state or
ComponentPeer minimisation state, so the ComponentPeerWatcher might not
notify its listeners when a component is really shown/hidden.

One potential workaround would be for the ComponentPeer to send
notifications when the showing state of the window changes, so that the
ComponentMovementWatcher can forward those notifications. The main
problem with this approach is that on Windows, the window doesn't seem
to receive a message on hide/show, and it's not clear whether there
exists some other approach to detect a hide/show event.

If there were some event we could listen for on Windows, then we could
call Component::sendVisibilityChangeMessage in response to this event
and things would *likely* work at that point, but this may still have
unintended side-effect. As a result, I think the best approach to
restore the old behaviour is to revert the change to
Component::isShowing. The implementations of ComponentPeer::isShowing
have been left in place so that users can do still query the real
visibility state of native windows if necessary.
2024-09-30 19:50:37 +01:00
Anthony Nicholls
77d4198091 Text: Refactor UTF-8 test to prevent warnings 2024-09-30 12:49:57 +01:00
Tom Poole
7d3affbcb3 Merge master JUCE 8.0.2 branch 2024-09-26 12:43:39 +01:00
Anthony Nicholls
6c2d149ef3 Versioning: Add the JUCE version number to any internally created threads 2024-09-26 08:10:56 +00:00
Tom Poole
4ada2e1f4d JUCE version 8.0.2 2024-09-26 08:47:46 +01:00
reuk
c1c01616c9 DynamicObject: Make virtual functions non-virtual 2024-09-26 08:46:59 +01:00
Tom Poole
7a1f6acd61 Resave all projects 2024-09-26 08:35:30 +01:00
Tom Poole
c1d2846e47 Bump version number to 8.0.2 2024-09-26 08:31:50 +01:00
Anthony Nicholls
0e608f77fa SimpleShapedText: Avoid MSVC compiler bug for C++20 builds
There appears to be a bug in the MSVC compiler relating to cpaturing
a instance of a struct defined inside a lambda
2024-09-20 17:29:05 +01:00
attila
5e4016b4fb GlyphArrangement::addFittedText: Break words across multiple lines if necessary
This behaviour, previously available in JUCE 7, was missing since the
JUCE 8 changes related to Unicode text drawing.

With this commit, words that are too long to fit in a line are again
broken up, with the caveat, that we can expect this approach to produce
quirks with bidirectional text. We don't expect that such a feature
could be satisfactorily provided for bidirectional text, so this is a
stopgap measure for legacy applications.
2024-09-19 15:35:53 +02:00
attila
7cbdd14da9 GlyphArrangement::addFittedText: Fix scaling and squashing behaviour 2024-09-19 15:35:53 +02:00
reuk
29213e07a1
Font: Deprecate getStringWidth and getGlyphPositions 2024-09-18 19:13:09 +01:00
reuk
eddedc2d13
UnicodeGenerated: Remove redundant fields 2024-09-18 19:13:09 +01:00
reuk
9076639742
UnicodeBidi: Replace implementation with SheenBidi 2024-09-18 19:13:08 +01:00
reuk
107a383bb4
UnicodeLine: Use SBCodepointGetGeneralCategory for category analysis 2024-09-18 19:13:08 +01:00
reuk
7a78f1fc02
UnicodeScript: Use SBCodepointGetScript for script analysis 2024-09-18 19:13:08 +01:00
reuk
ee8d310e69
ShapedText: Refactor Impl constructor 2024-09-18 19:13:08 +01:00
reuk
2bdf510f49
SheenBidi: Remove emoji script type 2024-09-18 19:13:08 +01:00
reuk
e3489703f2
SheenBidi: Include in build of juce_graphics 2024-09-18 19:13:08 +01:00
reuk
d77d5801d9
SheenBidi: Add sources 2024-09-18 19:13:08 +01:00
reuk
a3a4813107
HarfBuzz: Add missing COPYING file 2024-09-18 19:13:08 +01:00
reuk
01614c0b18
UnicodeBrackets: Remove file 2024-09-18 19:13:07 +01:00
reuk
54b157bb8c
DirectWriteTypeface: Use GDI fallback behaviour for missing fonts
Previously, when attempting to create a font with a name different to
that of any font on the system, the returned typeface could be nullptr.
This could lead to crashes when attempting to use the typeface.

Now, if we fail to find a matching font using DirectWrite, we fall back
to the older LOGFONT and DC approach, which will generally locate a
usable typeface, though not necessarily an exact match.

The new behaviour more closely matches the behaviour of JUCE 7, which
would attempt to construct a DirectWrite typeface, but would fall back
to creating an HFONT on failure.
2024-09-18 15:44:05 +01:00
reuk
1e0f23baf8
DirectWriteTypeface: Add missing scoped_lock 2024-09-18 15:44:05 +01:00
reuk
1b105f9318
DirectWriteTypeface: Refactor using new fromFont function 2024-09-18 15:44:05 +01:00
reuk
646f5ad095
CMake: Enable hardened runtime options for console app targets 2024-09-18 15:44:05 +01:00
reuk
555b667d22
ComponentPeer: Add isShowing() member, which more closely matches expected behaviour of Component::isShowing 2024-09-18 15:44:05 +01:00
reuk
68d0ea9dfb
Fonts: Avoid calling deprecated CTFontManagerRegisterGraphicsFont
The main reason for removing this call is that this function is
deprecated, and is no longer needed now that we keep our own cache of
CTFonts that have been loaded from memory, and now that we no longer use
CoreText text layouts.

This also appears to fix an issue with garbled text which was
occasionally seen when different versions of the same font were
available, e.g. because differing versions of the font were
simultaneously embedded as BinaryData and installed on the system.
2024-09-18 15:44:05 +01:00
reuk
44e2d0343b
CoreGraphicsContext: Use CopyableHeapBlock for glyph positions 2024-09-18 15:44:05 +01:00
reuk
67fa9b11cd
Direct2D: Add an assertion to warn when multiple Graphics instances are active on the same image 2024-09-18 15:44:04 +01:00
reuk
c1c2e1d8d2
Direct2D: Invalidate deviceContext when adapters change, to avoid referencing missing devices 2024-09-18 15:44:04 +01:00
reuk
8a9fea51e5
Direct2D: Avoid rare crashes due to nullptr deref of swapChainThread 2024-09-18 15:44:04 +01:00
reuk
6374540f19
Direct2D: Fix bug where Image::clear did not respect the requested area 2024-09-18 15:44:04 +01:00
reuk
515c42db4b
VST3 Host: Use refcounting to automatically unload VST3 modules 2024-09-18 15:44:04 +01:00
reuk
36eb33bc39
VST3 Host: Refactor DLLHandle implementation to simplify ownership 2024-09-18 15:44:04 +01:00
reuk
bc59613ffb
CMake: Ensure generated files are written to different directories per-config to support Ninja multi-config builds 2024-09-18 15:44:04 +01:00
reuk
589d9940ed
Direct2D: Add support for bitmaps spanning multiple texture pages 2024-09-18 15:44:04 +01:00
reuk
470ada4454 ComSmartPtr: Update implementation slightly so that error codes can be inspected during debugging 2024-09-13 13:57:10 +01:00
reuk
8754d87900 Windows: Fix build warnings when JUCE_DISABLE_ASSERTIONS is set 2024-09-13 13:57:10 +01:00
reuk
6e9b7dad9a Direct2D: Refactor DxgiAdapter constructor 2024-09-11 17:09:41 +01:00
Oliver James
f78841e0d9
SimpleFFTDemo: Use BitmapData to improve performance when modifying pixel colours 2024-09-06 18:13:21 +01:00
Anthony Nicholls
1e5c88899e JSON: Use UTF8 encoding by default 2024-09-06 15:40:39 +00:00
Anthony Nicholls
379afb1e3f JSON: Fix encoding of BEL character 2024-09-06 15:40:39 +00:00
Anthony Nicholls
0a78fefecb Text: Improve string validation
- Reject surrogate code points for all unicode encodings
- Prevent out of bounds access in some cases
- Move ASCII and UTF character validation functions to CharacterFunctions
- Add more unit tests
2024-09-06 15:40:39 +00:00
Anthony Nicholls
1dd2b3c90e Formatting: Whitespace 2024-09-06 15:40:39 +00:00
Anthony Nicholls
1b0f45fa96 Formatting: Improve consistency of static inline word ordering 2024-09-06 15:40:39 +00:00
Anthony Nicholls
18d904c6f3 VST3: Work around a bug in the SDK when detecting C++20 support 2024-09-05 20:33:13 +01:00
Anthony Nicholls
99f81c3ece VST3: Remove an out of date comment 2024-09-05 20:32:22 +01:00
Anthony Nicholls
9f8abbd72c Core: Update compile time flags for checking C++ support 2024-09-05 18:59:05 +01:00