Skip to content

Commit 5f1f080

Browse files
committed
fix(harfbuzz) load core before experimental libs
Close #1144
1 parent 44072b2 commit 5f1f080

5 files changed

Lines changed: 28 additions & 3 deletions

File tree

‎doc/notes/3.4.3.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ _Not Released Yet_
2525

2626
- Core: Fixed handling of `long` arguments in runtime-generated downcalls that require wrapping.
2727
- Core: Fixed deadlock that can occur when calling `DetachCurrentThread` on JVM exit. (#1140)
28+
- harfbuzz: Loading an experimental library now also automatically loads the core harfbuzz library. (#1144)
2829
- liburing: Fixed `io_uring_mlock_size(_params)` return type. (#1142)
2930
- mimalloc: `MemoryAllocator::getAlignedAlloc` now returns a compatible function. (#1135)
3031
- SDL: Fixed `SDL_GetDefaultLogOutputFunction` return type.

‎modules/lwjgl/harfbuzz/src/generated/java/org/lwjgl/util/harfbuzz/HarfBuzzGPU.java‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818

1919
public class HarfBuzzGPU {
2020

21+
static {
22+
HarfBuzz.getLibrary();
23+
}
24+
2125
private static final SharedLibrary HARFBUZZ = Library.loadNative(HarfBuzzGPU.class, "org.lwjgl.harfbuzz", Configuration.HARFBUZZ_GPU_LIBRARY_NAME.get(Platform.mapLibraryNameBundled("harfbuzz-gpu")), true);
2226

2327
/** Contains the function pointers loaded from the harfbuzz {@link SharedLibrary}. */

‎modules/lwjgl/harfbuzz/src/generated/java/org/lwjgl/util/harfbuzz/HarfBuzzRaster.java‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818

1919
public class HarfBuzzRaster {
2020

21+
static {
22+
HarfBuzz.getLibrary();
23+
}
24+
2125
private static final SharedLibrary HARFBUZZ = Library.loadNative(HarfBuzzRaster.class, "org.lwjgl.harfbuzz", Configuration.HARFBUZZ_RASTER_LIBRARY_NAME.get(Platform.mapLibraryNameBundled("harfbuzz-raster")), true);
2226

2327
/** Contains the function pointers loaded from the harfbuzz {@link SharedLibrary}. */

‎modules/lwjgl/harfbuzz/src/generated/java/org/lwjgl/util/harfbuzz/HarfBuzzVector.java‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121

2222
public class HarfBuzzVector {
2323

24+
static {
25+
HarfBuzz.getLibrary();
26+
}
27+
2428
private static final SharedLibrary HARFBUZZ = Library.loadNative(HarfBuzzVector.class, "org.lwjgl.harfbuzz", Configuration.HARFBUZZ_VECTOR_LIBRARY_NAME.get(Platform.mapLibraryNameBundled("harfbuzz-vector")), true);
2529

2630
/** Contains the function pointers loaded from the harfbuzz {@link SharedLibrary}. */

‎modules/lwjgl/harfbuzz/src/templates/kotlin/harfbuzz/HarfBuzzTypes.kt‎

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,31 @@ val HARFBUZZ_BINDING_DELEGATE = HARFBUZZ_BINDING.delegate("HarfBuzz.getLibrary()
5151
val HARFBUZZ_GPU_BINDING = simpleBinding(
5252
Module.HARFBUZZ,
5353
libraryExpression = """Configuration.HARFBUZZ_GPU_LIBRARY_NAME.get(Platform.mapLibraryNameBundled("harfbuzz-gpu"))""",
54-
bundledWithLWJGL = true
54+
bundledWithLWJGL = true,
55+
preamble = """
56+
static {
57+
HarfBuzz.getLibrary();
58+
}"""
5559
)
5660

5761
val HARFBUZZ_RASTER_BINDING = simpleBinding(
5862
Module.HARFBUZZ,
5963
libraryExpression = """Configuration.HARFBUZZ_RASTER_LIBRARY_NAME.get(Platform.mapLibraryNameBundled("harfbuzz-raster"))""",
60-
bundledWithLWJGL = true
64+
bundledWithLWJGL = true,
65+
preamble = """
66+
static {
67+
HarfBuzz.getLibrary();
68+
}"""
6169
)
6270

6371
val HARFBUZZ_VECTOR_BINDING = simpleBinding(
6472
Module.HARFBUZZ,
6573
libraryExpression = """Configuration.HARFBUZZ_VECTOR_LIBRARY_NAME.get(Platform.mapLibraryNameBundled("harfbuzz-vector"))""",
66-
bundledWithLWJGL = true
74+
bundledWithLWJGL = true,
75+
preamble = """
76+
static {
77+
HarfBuzz.getLibrary();
78+
}"""
6779
)
6880

6981
val hb_language_t = "hb_language_t".handle

0 commit comments

Comments
 (0)