Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[feat] add freetype bindings #45

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants