Skip to content

Conversation

@Snikimonkd
Copy link

@Snikimonkd Snikimonkd commented Jan 13, 2025

freetype bindings

@Snikimonkd
Copy link
Author

i'm not really sure about errors binding - i would better prefer something like a constant map where key is CInt code and value is a string descripion or maybe a macro with a huge switch case inside?

@lerno
Copy link
Contributor

lerno commented Jan 14, 2025

Is the error code always the same as the ordinal?

@Snikimonkd
Copy link
Author

not really, you can definitely see that some part is skipped here

@lerno
Copy link
Contributor

lerno commented Jan 15, 2025

If so it won't work to have Error as a return value. Instead you will need to model it like:

distinct Error = int;
const Error OK = 0;
const Error CANNOT_OPEN_RESOURCE = 0x01;
const Error UNKNOWN_FILE_FORMAT = 0x01;

@Snikimonkd Snikimonkd force-pushed the feat/add_freetype branch 2 times, most recently from 6ecb04e to b1f58e7 Compare January 18, 2025 16:05
@Snikimonkd
Copy link
Author

If so it won't work to have Error as a return value. Instead you will need to model it like:

distinct Error = int;
const Error OK = 0;
const Error CANNOT_OPEN_RESOURCE = 0x01;
const Error UNKNOWN_FILE_FORMAT = 0x01;

i've done it this way

@Snikimonkd Snikimonkd force-pushed the feat/add_freetype branch 4 times, most recently from 103987e to b932f42 Compare January 26, 2025 12:59
@lerno
Copy link
Contributor

lerno commented Jan 30, 2025

Is this solid now?

@Snikimonkd
Copy link
Author

thats not full port of freetype library, but this is pretty much usable now

@lerno
Copy link
Contributor

lerno commented May 8, 2025

I am very sorry I haven't gotten around to this until now. Could you update it to work with C3 0.7.1 and I'll approve it ASAP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants