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

1384 commits

Author SHA1 Message Date
Tom Poole
acc4b9c6d0 Bump version number to 8.0.12 2025-12-16 08:48:49 +00:00
Tom Poole
ae3b811c50 Bump version number to 8.0.11 2025-12-01 10:21:13 +00:00
reuk
eecf40ba95 Direct2D: Avoid creating multiple MemoryFontFileLoaders all referencing the same data 2025-11-27 13:25:55 +00:00
Anthony Nicholls
fc29df83b5 Direct2D: Fix an issue with excludeClipRectangle
Without this fix many of the component tests that appear in the
following commit will fail for the Direct2D renderer only.
2025-11-20 17:47:47 +00:00
Anthony Nicholls
c37c18c5b4 macOS: Prevent visual glitches in images
CGImages created from a juce Image may be drawn after or during
changes to the underlying data. This change copies the required
data into a new buffer to ensure the CGImage data is always
independent from the juce image data.
2025-11-20 15:04:46 +00:00
reuk
83e5264c86
Formatting: Remove double-dots from comments and other strings 2025-11-18 15:47:42 +00:00
attila
f257fef7f7 TextLayout: Fix hang when shaping text containing a zero-width glyph 2025-11-10 22:14:35 +00:00
reuk
a2a9c54e31
JPEG: Sort list of warnings 2025-10-27 13:31:40 +00:00
reuk
8a9713cfbf
JPEG: Suppress format-nonliteral warning in third-party code 2025-10-27 13:31:40 +00:00
attila
b72343cf8c Fix font sizing with the software and OpenGL renderers when ascent override is used 2025-10-24 11:22:15 +02:00
attila
39ff0f91f4 Docs: Add a note about ascent override to Font::getHeight() 2025-10-24 11:22:15 +02:00
reuk
bd5e4415f9
RectangleList: DRY implementation of subtract() and avoid unnecessary allocations for int-based rectangle lists 2025-10-21 14:26:35 +01:00
reuk
d10c5c36e3
RectangleList: Avoid infinite loops due to numerical precision issues 2025-10-21 14:23:59 +01:00
reuk
92573ca1ad
RectangleList: Remove some curly braces 2025-10-20 17:34:48 +01:00
reuk
e525e12061
JustifiedText: Fix caret positioning when clicking on a trailing whitespace
When clicking in a TextEditor to position the caret, the caret would be
placed at the penultimate position when clicking at the end of a line
with trailing non-newline whitespaces.

Co-authored-by: Aga Janowicz <aga@roli.com>
2025-10-20 17:34:48 +01:00
reuk
3a0135ffb7
SimpleShapedText: Fix detection of control characters
Newlines get removed in the sanitised string, so we need to take extra
steps to keep track of their positions.

Co-authored-by: Aga Janowicz <aga@roli.com>
2025-10-20 17:34:48 +01:00
reuk
de4696d891
SimpleShapedText: Reorganise function declarations 2025-10-20 17:34:48 +01:00
reuk
2f1c74981f
FreeType: Make font fallback slightly more robust
On Ubuntu 25.10, which includes Noto Color Emoji, I was seeing that the
FontsDemo would assert when attempting to render non-emoji text using
this font. It appears that FontConfig will tend to return Noto Color
Emoji when this family name is passed, even though the font may not
cover the required character set.

The new strategy is to use FontConfig as before, but then to check the
resolved font for coverage of the string. If the resolved font still
can't render the string, we relax the font matching constraints by
removing the family name from the pattern, then try matching again.
2025-10-20 17:34:48 +01:00
reuk
37cc73ad9f
FreeType: Avoid scanning pfb/pcf fonts
Harfbuzz doesn't support these font formats, so attempting to shape text
using these kinds of fonts will fail.

I noticed this on Ubuntu 25.10 for Arm, which seems to include pfb and
otf versions of some fonts. The FontsDemo would assert in cases where
the pfb font was selected instead of the otf font.
2025-10-20 17:34:48 +01:00
reuk
46f812034e
SheenBidi: Update internal include paths 2025-10-20 17:34:47 +01:00
reuk
e8beaa4a1f
SheenBidi: Update bundled sources to v2.9.0 2025-10-20 17:34:47 +01:00
reuk
7f22db449a
AffineTransform: Add horizontalFlip() 2025-10-20 17:34:47 +01:00
Anthony Nicholls
68f7ed4ecc Colour: Prevent an integer alpha value being processed as a float 2025-10-16 16:55:44 +01:00
reuk
e0faa5c255
PNGImageFormat: Avoid crashing when attempting to write an invalid image
The default error handler could cause crashes, so we now set up a custom
error handler both when reading and writing PNGs.

The HeapBlock and BitmapData automatic variables have moved, so that
their destructors will still run as expected in the failure case. Note
that it's UB to call longjmp to unwind the stack to the previous setjmp,
if said unwinding would normally cause non-trivial destructors to run.
2025-09-25 18:38:32 +01:00
Anthony Nicholls
a5dedd36d5 Android: Address some clang-tidy warnings in Android Studio 2025-09-25 14:56:34 +01:00
Anthony Nicholls
5b0a2b9b80 Font: Cache HarfBuzz fonts and font details 2025-09-25 14:56:34 +01:00
Anthony Nicholls
c0f164ee28 Text: Cache the display language 2025-09-25 14:56:34 +01:00
Anthony Nicholls
667b3fae86 LruCache: Make the LRU cache implementation thread safe 2025-09-25 14:56:34 +01:00
Anthony Nicholls
c1affc0a0e Unicode: Make it clearer that a lambda is being immediately invoked 2025-09-25 14:56:34 +01:00
Anthony Nicholls
e68627c9ed Smart Pointers: Add a new enum for indicating if a smart point should increment a reference count or not 2025-09-25 14:56:34 +01:00
reuk
50b51f512a
juce_audio_processors_headless: Remove juce_graphics dependency 2025-09-17 12:50:08 +01:00
reuk
1c9947b80e
Android: Use AFontMatcher to locate generic system fonts on supported platforms 2025-09-17 12:50:06 +01:00
Tom Poole
360dfe5f3d Bump version number to 8.0.10 2025-09-15 09:30:11 +01:00
reuk
81e4d59da2
Direct2D: Avoid unnecessarily transforming solid colour brush
The changes were not cleared between frames, so they could end up
accumulating and causing floating-point exceptions.
2025-09-11 14:28:23 +01:00
reuk
641497918c
Direct2D: Always call SetTransform for gradient/image brushes
This partly reverts commit ad28684b10.
Prior to that change, getBrush() would always end up calling
SetTransform on gradient/image brushes. This is important because, when
drawing text, we combine the current brush transform with the text
transform. If we don't reset the brush transform each time, these
transforms end up accumulating across frames.
2025-09-09 11:32:00 +01:00
reuk
5a02f5231d
SimpleShapedText: Silence conversion warning 2025-09-08 11:54:30 +01:00
Tom Poole
cb9ec7e38f Bump version number to 8.0.9 2025-09-01 14:44:25 +01:00
Oli
4263efb96a Jpeg: Disable "extern C" in jpeglib.h 2025-08-20 09:51:28 +01:00
attila
ad28684b10 Tidying: Remove unused code 2025-08-19 16:51:15 +01:00
attila
35fe3ac714 Direct2D: Fix gradient fill when the brush is transformed with not just translation
The code contains a performance optimisation for cases where the world
transform is translation only. In this case instead of applying the
brush transformation first and then the world translation, the order is
reversed. The translation is applied first and then the brush
transformation.

Flipping the transformations however is only correct in the special case
when both transformations are translation only.
2025-08-19 16:51:15 +01:00
attila
bb5a9cbac9 Direct2D: Fix wrong brush transform calculation
This change is practically a no-op, because if the affected branch is
taken, then the world transform was not applied, so transform is a
unity matrix. But if transform was non-unity, then the wrong ordering
would cause an observable error.

Logically the brush transformation is nested inside the world
transformation so the right order is applying the brush transform first
followed by the world transform.
2025-08-19 16:51:15 +01:00
reuk
2712f63628
Graphics: Use unique_ptr instead of raw pointers in RenderingHelpers 2025-08-14 14:13:09 +01:00
attila
fa0ed2801d Fix J8 vertical text placement regression in the software renderer 2025-08-13 17:28:30 +01:00
Oli
8dc4dcd56b TextLayout: Implement better line balancing algorithm
The previous implementation was unstable when 'by character' line
breaking was used on long lines of text.

Co-authored-by: Tom Poole <tom@juce.com>
2025-08-13 14:20:20 +01:00
Oliver James
7a30354ce9 TextLayout: Enforce character wrapping attribute 2025-08-13 14:20:20 +01:00
attila
f97355b9f6 Direct2D: Fix seams between tiles for large bitmaps 2025-07-25 20:45:17 +02:00
attila
19906c9d2f Direct2DGraphicsContextTests: Ignore the image edges to allow for differences in anti-aliasing 2025-07-25 20:45:17 +02:00
attila
3f898f6fee Direct2D: Fix jitter when drawing bitmaps with non-unity scaling
Reverts ca3abbb96d.

Prior to this fix gradually changing the Component scale would lead to
the jittery movement of drawn bitmaps, as their position would be
snapped to an arbitrary integral representation.
2025-07-25 20:45:17 +02:00
attila
5bc44c301f Make Direct2DGraphicsContextTests acceptance criteria stricter 2025-07-25 20:45:17 +02:00
Anthony Nicholls
36d07a6ce3 Docs: Replace doxygen preprocessor conditionals with @cond and @endconds 2025-07-21 18:11:43 +02:00