Commit Graph

1407 Commits

Author SHA1 Message Date
Josh Tynjala
f4d2965426 Merge branch 'develop' into 8.3.0-Dev 2025-06-04 11:36:03 -07:00
Josh Tynjala
bc8f9df60f zlib 1.2.13
Upgrading required to compile with latest Xcode and macOS SDK
2025-04-14 15:28:26 -07:00
Josh Tynjala
97466c6360 png 1.6.46
Upgrading required to compile with latest Xcode and macOS SDK
2025-04-14 15:28:01 -07:00
Josh Tynjala
241edd9d10 efsw 1.4.1
Upgrading required to compile with latest Xcode and macOS SDK
2025-04-14 15:27:24 -07:00
Chris Speciale
236e143a8e [fix] Extract values before locking to avoid deadlock with GC
Attempts to fix reported freezes/crashes related to possible gc contention related to: https://github.com/openfl/lime/issues/1943
2025-04-10 11:20:12 -04:00
Barış Yıldırım
12d3ee5916 curl encoding support added 2025-03-21 10:56:23 -04:00
Chris Speciale
844222e99d Merge branch 'develop' into 8.3.0-Dev 2025-03-14 06:53:14 -04:00
Chris Speciale
6f5bc336f3 Merge branch 'develop' into 8.3.0-Dev 2025-03-14 06:47:14 -04:00
Tobiasz Laskowski
52072d1f21 Apply -std=c++11 to openal-soft build on android
openal-soft assumes that aligned_alloc is available with c++17. Newer
android ndks set c++17 by default, however they do not expose
aligned_alloc without setting min sdk version to 28.

We can avoid this issue by forcing openal to be compiled with c++11.

Also note, we have HXCPP_CPP11 defined, however, hxcpp ignores this for
the android toolchain.  This means we must set it explicitly

See:
f5e0eef34d/common/almalloc.cpp (L15)
2025-03-14 10:04:25 +00:00
Chris Speciale
1dd2acf479 Merge branch 'develop' into 8.3.0-Dev 2025-03-14 05:30:43 -04:00
Chris Speciale
20c9bec3bc Update Build.xml
Hxcpp doesn't respect HXCPP_CPP11 for android. We can avoid this issue just by adding -std=c++11 here. This resolves a conflict with openal soft 1.20.1 for android builds. This works because the library assumes c++17 and invokes a function that isn't available in android sdk below 28.
2025-03-14 05:29:18 -04:00
Chris Speciale
e41dc949fe Revert "Merge pull request #1924 from tobil4sk/update-openal-1.21.1"
This reverts commit 3f0179657b, reversing
changes made to 80aaaaef9f.
2025-03-14 05:16:24 -04:00
Tobiasz Laskowski
755781fdf2 Fix mac -stdlib=libstdc++ compilation error
clang: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
2025-03-13 21:15:45 +00:00
Tobiasz Laskowski
a13b3c37bb Avoid hxcpp overriding openal_soft's c++14 2025-03-13 21:15:34 +00:00
Tobiasz Laskowski
ea2bbd0be3 Update OpenAL Soft to 1.21.1 2025-03-13 21:15:18 +00:00
Chris Speciale
855996e122 Remove PLATFORM from Build.xml
We shouldn't need it anymore following this commit: 46aab0c80e
2025-03-13 05:59:14 -04:00
Chris Speciale
8d21626297 set PLATFORM to android 28 2025-03-12 18:55:09 -04:00
Chris Speciale
63b9a88e34 Merge pull request #1921 from tobil4sk/fix/get_glyphs_infinite_loop
Fix Font.getGlyphs returning zeros and looping
2025-03-11 01:34:41 -04:00
Tobiasz Laskowski
23b90dff3f Fix loop in GetGlyphIndices with invalid input
If the text is invalid, then readNextChar returns -1 and does not
progress to the next character. This previously meant that we got stuck
and looped indefinitely.
2025-03-11 01:23:29 +00:00
Tobiasz Laskowski
f495b777ab Remove old comment for hl GetGlyphIndices
The array size is already determined by the first loop
2025-03-11 01:19:58 +00:00
Tobiasz Laskowski
6283017adb Fix GetGlyphIndices returning array of 0 on hl
Previously, the first for loop would reach the end of the characters, so
no further characters were read in the second loop. This meant that the
array remained filled with 0 values.
2025-03-11 01:19:43 +00:00
Tobiasz Laskowski
70e55b1fa5 Fix rebuild warning about unknown option on msvc
cl : Command line warning D9002 : ignoring unknown option '-std=c11'
2025-03-10 14:20:55 -07:00
Tobiasz Laskowski
ca770337cb Add hb_buffer_add_hxstring
To properly handle encoding conversions, we need to do it in native
code. This new function performs this role.

This is useful for hxcpp which may have either ascii or utf16 encoding,
but this can only be checked via the native api and it is not possible
on the haxe side.
2025-03-10 02:37:52 +00:00
Tobiasz Laskowski
0ca7c392e0 Fix length for hl_hb_buffer_add_utf8
This function wants the utf8 length, but text->length does not give
this. We can instead use -1 to tell harfbuzz to treat it as null-
terminating, which is the case with all hashlink strings anyway.
2025-03-10 01:45:37 +00:00
Tobiasz Laskowski
504df5e0d0 Add missing utf8 conversion for hb_buffer_add_utf8
A HxString is not guaranteed to be utf8 on hxcpp, so we need to use
hxs_utf8 to convert it otherwise it incorrectly displays any utf16
encoded string.

Unfortunately, hxs_utf8 doesn't give us the length of the utf8 string.
The best thing we can do is to tell harfbuzz it is null terminated. This
isn't perfect because technically hxcpp strings are allowed to contain
NULL, but it's better than all utf16 strings being broken.
2025-03-10 01:17:41 +00:00
Josh Tynjala
9f9a5b9f31 Merge branch 'develop' into 8.3.0-Dev 2025-03-03 13:19:35 -08:00
Tobiasz Laskowski
00edf47529 Add support for linking mbedtls on latest hxcpp
The latest hxcpp makes it easier to link against the internal mbedtls,
however we still need backwards compatibility.

https://github.com/HaxeFoundation/hxcpp/pull/1133
2025-02-10 09:24:47 -08:00
Tobiasz Laskowski
c9ad850578 Update curl submodule
Hxcpp's mbedtls has MBEDTLS_NET_C disabled, which meant that older
versions of curl which use this feature cannot be linked against it.
This version of curl no longer requires this feature, which avoids the
issue.
2025-02-10 09:24:47 -08:00
Tobiasz Laskowski
7df96b53d7 Support hxcpp older than 4.3.0 for mbedtls linking
Hxcpp 4.3.0 has an mbedtls_config.h file in ${HXCPP}/src/hx/libs/ssl,
which we have to ensure is included, but older versions do not.

To support both 4.3.0 and older versions, we can add an empty
mbedtls_config.h and add the include path at the end. This way it will
only be used if it does not exist in the previous include paths.
2025-02-10 09:24:47 -08:00
Tobiasz Laskowski
22fb016d95 Link against hxcpp's mbedtls in static builds
This avoids lime's mbedtls overwriting hxcpp's, which has caused issues
in the past.
2025-02-10 09:24:47 -08:00
unknown
a926989d44 Update to SDL 2.30.12
Remove broken Windows HDPI support

Fix submodule?

try to fix CI

Add some missing files

Update to SDL2 2.30.12

Include khronos headers

Enable EGL on macOS

Enable GLES on Mac
2025-02-07 09:28:43 -08:00
Josh Tynjala
af2299670f Display: add safeArea property
display.safeArea is a subset of display.bounds that accounts for notches, holes, or other display cutouts.
2025-01-30 15:56:27 -08:00
Josh Tynjala
70efb2a4ec ExternalInterface: fix number of members in _TORIENTATION_EVENT 2025-01-30 14:34:46 -08:00
Josh Tynjala
8f0b8f356e Application: onDisplayOrientation and onDeviceOrientation events for iOS and Android
Device orientation is the orientation of the phone/tablet.

Display orientation is the orientation of what is rendered on the display.

By default, they should usually be the same. If orientation is locked, device orientation will update, but display orientation usually won't.
2025-01-29 09:38:00 -08:00
Tobiasz Laskowski
5fd2b560c4 Add missing harfbuzz hb-face-builder file 2025-01-29 01:28:22 +00:00
Tobiasz Laskowski
a9347de8ce Update hb-coretext to hb-coretext-shape
The name of this file was changed, see:
064b24177b
2025-01-28 13:04:18 -08:00
Tobiasz Laskowski
077ba7e5ca Update harfbuzz to 10.2.0 2025-01-28 13:04:18 -08:00
Chris Speciale
8af219fb54 Merge pull request #1899 from tobil4sk/fix/update-cairo
Update cairo to 1.18.2
2025-01-28 01:41:24 -05:00
Tobiasz Laskowski
65e2c6ba45 Add missing files to freetype build
These are required by newer versions of cairo
2025-01-27 19:12:06 +00:00
Tobiasz Laskowski
9bda9ecb32 Update cairo to 1.18.2
The previous version 1.17.6 was an unstable snapshot release. Updating
to 1.18.2 seems to resolve some font size bugs on windows.
2025-01-27 19:12:06 +00:00
Josh Tynjala
44dd331801 libjpeg: fix rendering on 32-bit platforms
Fixes SIZEOF_SIZE_T on 32-bit platforms that should be 4 instead of 8

Tested on Windows x86_32 and Android armv7
2025-01-07 09:43:21 -08:00
ACrazyTown
45505f433a Fix ImageDataUtil.copyPixels crash on Hashlink (#1875)
* Fix copyPixels crash on Hashlink

* Move nullcheck to C++

* Simplify further

* Avoid unneccessary object allocation

* Formatting

* Simplify by using an if statement
2024-12-16 07:41:37 -08:00
Josh Tynjala
9c4fa35361 Font: a little extra null safety for hhea and os2 font data, just to be safe
Followup to 62ab8eb6fc
2024-12-13 14:46:58 -08:00
Josh Tynjala
0db3c7c095 Font: experimental LIME_FREETYPE_SWF_METRICS define that more closely matches SWF behavior for font metrics like ascent/descent
We're currently using freetype 2.9.1's algorithm for choosing font metrics, but it's not exactly the same as SWF (but it is closer than freetype 2.10's new algorithm).

This algorithm should more closely match the font metrics used by AS3 compilers when embedding fonts with [Embed] metadata in AS3.
2024-12-13 14:26:38 -08:00
Josh Tynjala
62ab8eb6fc Font: fall back to using freetype's 2.9.1 algorithm for calculating font metrics like ascent/descent
This allows us to upgrade freetype beyond 2.9.1 (actually, 2.8.1 due to a bug in freetype 2.9) without wildly different font metrics. The reason that we don't want to change font metrics algorithms is that freetype's new algorithm is very different than the algorithm used for SWF fonts. The older freetype algorithm is closer to SWF, so we want to stick with it.

Thankfully, freetype supports accessing various metrics stored in font files in a more raw form, so we can provide our own custom algorithm in a way that is fully supported by freetype. I just copied the existing algorithm straight from 2.9.1 to restore our preferred behavior.

I confirmed that, after this change, OpenFL renders metrics like Lime 8.1.3. But we have the same upgraded freetype as Lime 8.2.0 that we had to revert for 8.2.1.

I plan to experiment with a mode that matches SWF even more closely, now that I have a better understanding of how fonts and freetype work.
2024-12-13 13:47:19 -08:00
Josh Tynjala
27d1d8b9d4 Revert "freetype: roll back to freetype version 2.9.1"
This reverts commit c4faf58ff0.
2024-12-13 13:37:16 -08:00
Josh Tynjala
90b2b1fa80 Revert "freetype: roll back to 2.8.1 to fix issues with character spacing"
This reverts commit ac3040c1ed.
2024-12-13 13:36:56 -08:00
Josh Tynjala
ac3040c1ed freetype: roll back to 2.8.1 to fix issues with character spacing 2024-12-12 10:41:08 -08:00
Joseph Cloutier
a03c0c31f3 Fix whitespace. 2024-11-19 20:09:22 -05:00
win11
c0e1a1b4a4 Clean up PNG and JPEG encoding properly 2024-11-19 14:45:25 -08:00