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

1348 commits

Author SHA1 Message Date
attila
0474dacd31 Add Ranges::covers 2024-12-04 16:50:36 +01:00
attila
c69119a7b7 Add Ranges::find and RangedValues::find 2024-12-04 16:50:36 +01:00
attila
0dc97de993 Add Ranges::eraseUpTo 2024-12-04 16:48:12 +01:00
reuk
a889149cbd
PixelRGB: Fix pixel order issue when creating CGImages on iOS 2024-12-03 11:28:07 +00:00
reuk
4b9253dc76
DirectX: Make it easier to enable debug logging output 2024-12-02 17:20:42 +00:00
Anthony Nicholls
5e803ded5f Deprecations: Add ignore deprecation warning macros 2024-11-27 11:07:04 +00:00
reuk
01bfa98827 CoreGraphics: Fix incorrect behaviour of non-solid-colour text fills
Previously, filling a string containing a space or other non-rendered
character with a gradient would end up filling the entire clip region.

The correct behaviour is to completely skip filling any empty paths.
2024-11-20 13:11:36 +00:00
Tom Poole
71af005543 Bump version number to 8.0.4 2024-11-18 10:12:15 +00:00
無常
a784d5776b TextLayout: Fix getStringBounds of empty strings 2024-10-24 19:40:42 +01:00
reuk
90f37e27ea Windows: Fix DLL build
There were a few "ambiguous operator new/delete" errors that were due to
inheriting from a private base class that used the leak detector. These
errors are resolved by adding the leak detector to the derived classes.

JUCE_API was missing from a few useful types, notably the ARA hosting
types.
2024-10-22 13:24:46 +01:00
attila
82080f9372 ShapedText: Apply the horizontal scaling to the extra kerning
This fixes an undesired behaviour where squashing the text using
GlyphArrangement::addFittedText would only squash the visible glyphs but
not the additional kerning space between them.
2024-10-21 15:34:42 +02:00
attila
8693507ead ShapedText: Apply extra kerning only before clusters
This avoids inserting tracking between glyphs in a single cluster e.g. a
base glyph and diacritic marks.
2024-10-21 15:34:42 +02:00
attila
503788fd0c ShapedText: Fix falsely marking glyphs with missing extent information as whitespace 2024-10-21 15:34:42 +02:00
attila
bd14d47211 SimpleShapedText: Restore and tidy up earlier line breaking logic
This commit isn't fixing any known bugs, but restores the soft break
iteration logic to its state prior to
5e4016b4fb, which accidentally changed it.
2024-10-21 15:34:42 +02:00
attila
b545b79cb3 GlyphArrangement: Make drawFittedText squashing behaviour more similar to JUCE 7
This commit fixes a regression added during the ShapedText based rewrite
of the class. The minimumHorizontalScale parameter was mistakenly
interpreted as an absolute scale, whereas its meaning in the old
implementation was a relative scalar applied to the Font's horizontal
scale.
2024-10-21 15:34:42 +02:00
reuk
14f663bc0e
CoreGraphics: Fix issue where text using simulated italic could be drawn at the wrong point
This was evident in the FontsDemo when using the CoreGraphics renderer,
selecting a font without an italic face, and enabling the italic style.
The glyph anchor positions were incorrectly transformed by the text
matrix, causing the left margin of the text to become tilted.

We now correct for the slant and scale specified in the text matrix when
computing glyph anchor positions.
2024-10-20 22:59:38 +01:00
reuk
7f52509c78
Direct2D: Simplify SwapChain buffer creation 2024-10-16 10:36:53 +01:00
reuk
80ac9a78a0
Singleton: Add new macros to simplify singleton creation
The INLINE macros allow singletons to be declared and defined in one
line, without requiring a separate JUCE_IMPLEMENT_SINGLETON statement.
2024-10-16 10:36:52 +01:00
Tom Poole
14c8d06fb0 Bump version number to 8.0.3 2024-10-15 22:16:12 +01:00
Tom Poole
0f3bad8152 Font: Avoid a crash on systems with no fonts installed 2024-10-15 14:27:23 +01:00
reuk
f5cc7902b1 Direct2D: Avoid using dirty rects when painting full frame
This fixes an issue where Direct2D will emit an error when using dirty
rects on the first full frame after resizing.

The issue isn't present on all hardware/drivers, but was observed on a
Windows 11 computer with a 890M iGPU.
2024-10-14 11:13:26 +01:00
attila
83dc660a30 Fonts: MacOS: Return styles in the order reported by the system
This is more likely to place the regular/default style first in the list
of styles. This change partially reverts a behavioural change in
68d0ea9dfb.
2024-10-10 17:53:10 +02:00
reuk
97cd4fc162
Direct2D: Reinstate multithreading support for D2D factory
Partially reverts a change made in
362a1cc070.

The factory needs to be multithreading-enabled in order to support e.g.
drawing to the screen on the main thread and drawing to an Image on a
background thread, even when no resources other than the graphics device
are shared between the two threads.
2024-10-10 16:11:24 +01:00
reuk
362a1cc070
Direct2D: Convert unnecessary multi-threaded factory to single-threaded 2024-10-10 11:47:18 +01:00
reuk
fa0ab06d41 Direct2D: Fix performance issue caused by the entire window painting unnecessarily 2024-10-09 18:13:46 +01:00
reuk
d22d287c6f Direct2D: Avoid presenting incomplete buffers after startFrame fails 2024-10-09 13:15:45 +01:00
reuk
c57041e5bc
Direct2D: Simplify threading of swapchain presentation
Previously, IDXGISwapChain::Present was called on a background thread,
which made it difficult to avoid race conditions. e.g. during a
live-resize of a window, we would occasionally draw old incomplete
frames instead of new frames at the correct size.

The new approach moves the Present call to the main thread via
AsyncUpdater. We attempt to present whenever the swap event wakes, and
whenever a frame is drawn. Only a single Present call may be made after
the swap event wakes. Subsequent Present calls will be ignored until the
next time the swap event wakes.
2024-10-08 16:10:07 +01:00
reuk
c7f7a7c1bb
Direct2D: Remove setResizing and getResizing members from renderer
We instead query from the renderer whether the current render size has
changed since the last frame, and repaint the entire window if so.
2024-10-07 11:50:26 +01:00
Anthony Nicholls
c545ca0492 CoreGraphics: Prevent an assertion when creating a rounded rectangle 2024-10-03 08:36:14 +01:00
reuk
27d877c175
DirectWrite: Return styles in the order reported by the system
This is more likely to place the regular/default style first in the list
of styles.
2024-10-02 11:35:38 +01:00
reuk
14dc97a29e
DirectWrite: Attempt to match font styles manually before falling back to system implementation
This allows for styles other than normal/bold/italic/bold-italic to be
selected, and more closely matches the behaviour of font selection on
other platforms.
2024-10-02 11:35:38 +01:00
reuk
1a1dc90a24
Direct2D: Remove frameSize member from Direct2DHwndContext pimpl 2024-10-02 11:35:38 +01:00
reuk
9b36effbf4
Direct2D: Make checkPaintReady check more robust
This additionally ensures that we'll paint when the swap chain has just
been resized
2024-10-02 11:35:38 +01:00
reuk
d64e963b14
Direct2D: Tidy up rect/point creation 2024-10-02 11:35:38 +01:00
reuk
2a2ae47231
Fonts: Fix freetype compilation issues on Debian 10 2024-10-02 11:16:55 +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