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

Get the right family name on windows #3

Open
wants to merge 8 commits into
base: feature
Choose a base branch
from

Conversation

moi15moi
Copy link
Owner

@moi15moi moi15moi commented Jan 6, 2025

No description provided.

arch1t3cht and others added 8 commits January 6, 2025 14:56
NSUInteger was defined by older wxWidgets versions but is removed
in newer versions, so this would fail to compile when not using
wxWidgets from a subproject.

In font_file_lister_coretext.mm, some mac version number defines
in wxWidgets were clashing with static const variables for the same
version numbers in AppKit. Moving the wx includes after the AppKit
include works around this for now.
CGDisplayCreateImageForRect is deprecated starting from macOS 15.0
onwards, so use wx's built-in color picker there for the time being.
It won't actually work, but it'll at least compile, so this is better
than nothing. In the future, a new implementation using ScreenCaptureKit
can be added. Or the color picker can be reworked entirely, seeing as
at this point it's broken on pretty much every modern platform that's not
Windows.

By setting MACOSX_DEPLOYMENT_TARGET to 14.0 or earlier, binaries using
CGDisplayCreateImageForRect can be compiled even on Sequoia (or later),
and the color picker will still work on those.
Of course, MAC_OS_VERSION_15_0 is not defined on older OS versions
or with older SDKs.
…s to display incorrectly/as garbage.

Signed-off-by: Ryan Lucia <ryan@luciaonline.net>
…e GDI, which truncates the face name to 31 characters.

Because of this, some users like in libass/libass#710 may think they have retrieved the correct face name, but that is not the case.

It use the same method has GetMSWFaceName to get the family name: https://github.com/wxWidgets/wxWidgets/blob/44068b5550bc82ac535e82680d158d3e03d7aa5f/src/msw/font.cpp#L269-L303
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.

4 participants