Usage with Freetype, wrong values returned
Alessandro Parisi
alessandro.parisi406 at gmail.com
Mon Nov 13 10:11:51 UTC 2023
Hello everyone,
In the recent weeks, I've been experimenting with Project Panama on JDK 21.
I'm trying to create a wrapper for the Freetype font library written in C,
but I'm having some issues, probably because I still don't understand very
well the FFM API.
While using the code generated by JExtract, I noticed that it fails to
parse the *charmaps* array from the FT_FaceRec
<https://freetype.org/freetype2/docs/reference/ft2-face_creation.html#ft_facerec>
struct.
With the TTF font, I'm testing, there are two *charmaps*, the values of the
first one are the same printed by the native code too, but for the second,
the values are completely randomic
Here is a little reproducer: FreetypeMRE
<https://www.dropbox.com/scl/fi/gitugnyxe3kyomm4m0pke/FreetypeMRE.zip?rlkey=tvnrsb5ernwasmxj6cgrjyqqq&dl=0>
Running the Test class will print the two *charmaps*. There is also a
little .exe I built to check the output of native code, it's located in the
src/native directory (there is also the C src code)
Am I doing something wrong, or is this a bug?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/panama-dev/attachments/20231113/d4f4a3a8/attachment.htm>
More information about the panama-dev
mailing list