Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add LOGFONT struct #16

Merged
merged 3 commits into from
Jul 11, 2024
Merged

Add LOGFONT struct #16

merged 3 commits into from
Jul 11, 2024

Conversation

damiansalvia
Copy link
Collaborator

I added the LOGFONT struct used by ToLogFont and FromLogFont methods.

I also added a set of related constants defined by GDI (see LOGFONTA structure). They are not used, that's why are defined as internal, except in those Font constructors that receive gdiCharSet parameter (so I removed the FONT_CHARSET private enum that were defined in the Font class and now it uses the GDI_CHARSET static class values).

@damiansalvia damiansalvia requested a review from cinthamo July 10, 2024 15:19
Copy link
Contributor

@cinthamo cinthamo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
I wonder, why are you implementing these functions?
It is not necessary to complete all System.Drawing interface, just respect the part we need. Is this needed for something?

@damiansalvia
Copy link
Collaborator Author

I don't think anyone is using these methods, but just in case, I noticed it doesn't make sense to call ToLogFont or FromLogFont without having a reference to the LOGFONT struct from the System.Drawing library. Additionally, the new GDIDEFS source file, which stores GDI_CHARSET (among others), provides a clearer and more organized location for the possible gdiCharset values (in the Font constructor) instead of defining them in the Font class.

@damiansalvia damiansalvia merged commit 5cc2652 into main Jul 11, 2024
1 check passed
@damiansalvia damiansalvia deleted the feature/LOGFONT branch July 11, 2024 13:34
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