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

1151 commits

Author SHA1 Message Date
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
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
589d9940ed
Direct2D: Add support for bitmaps spanning multiple texture pages 2024-09-18 15:44:04 +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
Anthony Nicholls
1dd2b3c90e Formatting: Whitespace 2024-09-06 15:40:39 +00:00
attila
83720ac462 EdgeTable: Fix assertion caused by unnecessarily storing prepending zero levels
This partially restores the behaviour prior to commit
dda0719d56, in that we will never store a
segment if its level equals the last stored level.
2024-09-05 17:36:51 +02:00
reuk
add3a5de0d
Android: Fix issues with input stream special members
Fixes bugs in AndroidInputStreamWrapper introduced in
0d2e34f34c

- Now that AndroidInputStreamWrapper is moveable, its destructor must be
  able to handle the situation where stream is null
- The move assignment operators of AndroidInputStreamWrapper and
  AndroidContentUriInputStream could previously end up calling
  themselves recursively
2024-09-05 12:17:12 +01:00
reuk
25e2fa44ff
Direct2D: Correctly recreate ID2D1DeviceContext when moving transparent windows between devices 2024-09-05 12:16:02 +01:00
reuk
14d52769dc
Direct2D: Revert to using grayscale text antialisaing exclusively
Reverts b12088a1f6

After some investigation, it appears that ClearType rendering is
unsuitable when
- the render target has translucent pixels underneath rendered text, or
- the render ouput is rotated, scaled, subpixel-translated, or otherwise
  transformed before display.

This necessitates avoiding ClearType when rendering into transparent
bitmaps.

Unfortunately, a commmon use-case for transparent bitmaps is buffered
component images. Even if ClearType were enabled for opaque targets,
ClearType text could then end up displaying next to non-ClearType text
rendered to an intermediate texture, leading to an inconsistent
appearance.

There's also not a straightforward way of exposing a ClearType rendering
option in all of the places that it would be required, and a change of
this size is difficult to justify given that subpixel text rendering
controls would only have an effect on Windows.
2024-09-05 12:15:31 +01:00
reuk
109ec550b9
Direct2D: Fix typo in tests
This typo caused the Graphics tests to fail when the random seed was
0xb14c264a426e6987.
2024-09-05 12:14:03 +01:00
reuk
5befcd43a9
EdgeTable: Use CopyableHeapBlock in implementation 2024-09-05 12:10:33 +01:00
reuk
c49fe0b6be UnicodeGenerated: Improve memory usage during compilation with gcc-7 2024-09-04 14:56:29 +01:00
Anthony Nicholls
2d360165c5 macOS: Prevent negative corner sizes for rounded rectangles 2024-08-28 11:53:21 +01:00
Anthony Nicholls
514ac22d6d macOS: Prevent an image mask from filling outside the clipping bounds 2024-08-23 15:53:43 +00:00
reuk
9a93fb03a4 Direct2D: Add null check in PresentationQueue 2024-08-23 13:51:40 +01:00
reuk
b12088a1f6 Direct2D: Match system preferences for text antialiasing 2024-08-23 13:51:40 +01:00
reuk
6cd018a679
Direct2D: Fix implementation of Direct2DPixelData::fromDirect2DBitmap
Previously, this function didn't store/copy the provided bitmap, so the
resulting image was blank. This also broke createSnapshot(), which would
always return a blank image.
2024-08-22 18:18:17 +01:00
reuk
348d638581
Direct2D: Temporarily disable window transparency for D2D windows 2024-08-22 18:18:17 +01:00
reuk
d344c2bf71
Direct2D: Allow drawing to arbitrary bitmaps using Direct2DImageContext
This change also moves the startFrame and endFrame calls out of the
plain Direct2DImageContext and into a special-purpose "flushing" context
that is private to Direct2DPixelData.
2024-08-22 18:18:15 +01:00
reuk
8a1bf07f14
Direct2D: Adjust return type of getPaintAreas in Direct2DHwndContext 2024-08-22 18:18:15 +01:00
reuk
570fd4b65c
Direct2D: Track UpdateRegions in D2DContext rather than the Direct2DHwndContext 2024-08-22 18:18:15 +01:00
reuk
c94b8e1712
Direct2D: Refactor paintAreas handling in graphics contexts 2024-08-22 18:18:15 +01:00
reuk
e2b9dd9a05
Direct2D: Remove redundant adapter member from Direct2DGraphicsContext 2024-08-22 18:18:15 +01:00
reuk
45305dbfa7
Direct2D: Remove redundant adapter member from SavedState 2024-08-22 18:18:15 +01:00
reuk
68441e0726
Direct2D: Refactor DeviceResources helper 2024-08-22 18:18:15 +01:00
reuk
58c267106f
Direct2D: Move UpdateRegion helper to shared DirectX header 2024-08-22 18:18:14 +01:00
reuk
8bbcfe4d6b
Direct2D: Move DeviceContext helpers to shared DirectX header 2024-08-22 18:18:14 +01:00
reuk
f3a74896fc
Direct2D: Move bitmap helpers to shared DirectX header 2024-08-22 18:18:14 +01:00
reuk
f0f77db261
Direct2D: Share more implementation headers between modules 2024-08-22 18:18:14 +01:00
reuk
bb53174196
Direct2D: Add null check before reading from D2D texture 2024-08-22 18:18:14 +01:00
reuk
025a05d210
Windows: Remove clearWindowRedirectionBitmap() 2024-08-22 18:18:14 +01:00
reuk
1b69ba3997
Direct2DResources: Refactor CompositionTree 2024-08-22 18:18:13 +01:00
attila
5ce2fc388e Fix C++23 compilation 2024-08-15 11:15:15 +02:00
Anthony Nicholls
25ee1b9e68 macOS: Simplify the CoreGraphics pointer types and add some new ones 2024-08-09 17:20:36 +01:00
Anthony Nicholls
997c92797c macOS: Improve performance for some graphics draw functions 2024-08-09 14:29:53 +01:00
attila
29327144db
StackBasedLowLevelGraphicsContext: Prefer using RectangleListRegion clip when possible
This reverts a tiny part of 19061e6d17.
2024-08-06 17:36:19 +01:00
attila
dda0719d56
EdgeTable: Fix buggy clipToRegion corner case 2024-08-06 17:36:10 +01:00
attila
22ee31f3ff EdgeTable: Use HeapBlock instead of vector for better Android Debug drawing performance
This is reverting 417d97b36e.
2024-08-02 14:48:52 +00:00
Anthony Nicholls
cc96592e7c Graphics: Improve drawing performance for stroking paths on macOS 2024-08-02 10:28:15 +01:00