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

[Windows] Always get the non-truncated face name in the style editor and in the font picker #155

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

Conversation

moi15moi
Copy link

@moi15moi moi15moi commented Aug 15, 2024

On Windows, wxFontEnumerator::GetFacenames and wxFont::GetFaceName use GDI, which truncates the face name to 31 characters. This PR affects the font selection in the style editor and in the font picker.

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.

Tested on Windows 7 (Version 6.1.7601) and Windows 10 (Version 10.0.19045.4780).

src/font.cpp Outdated Show resolved Hide resolved
src/font.h Outdated Show resolved Hide resolved
src/font.cpp Outdated Show resolved Hide resolved
@moi15moi moi15moi force-pushed the Get-the-right-family-name-on-Windows branch from de57db5 to 692bed0 Compare September 14, 2024 16:27
…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
@moi15moi moi15moi force-pushed the Get-the-right-family-name-on-Windows branch from 692bed0 to db67a97 Compare September 14, 2024 16:30
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.

1 participant