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

VSFilter/GDI truncate font name to 31 characters #18

Closed
moi15moi opened this issue Feb 26, 2023 · 1 comment
Closed

VSFilter/GDI truncate font name to 31 characters #18

moi15moi opened this issue Feb 26, 2023 · 1 comment

Comments

@moi15moi
Copy link
Owner

moi15moi commented Feb 26, 2023

Problem

VSFilter/GDI truncate font name to 31 characters.

Currently, Libass doesn't emulated this behaviour. See: libass/libass#459
Since it doesn't emulated it, this won't be implemente until libass does.

Which test I did to know how GDI works.

All the test I did was with this font: A-Farzian-2-Regular.zip
I rename the font with different name to see what name GDI would return me:

from fontTools.ttLib.ttFont import TTFont

font = TTFont("A-Farzian-2-Regular.ttf")

names = [
    "a"*30 + "😋"
    "a"*31 + "😋",
    "a"*32,
    "😋" * 20,
]

for name in names:
    font["name"].setName(name, 1, 3, 1, 0x409)
    font.save(f"{name}.TTF")
moi15moi added a commit that referenced this issue Apr 8, 2023
@moi15moi
Copy link
Owner Author

Closed by #34
For more information, see: #22 (comment)

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

Successfully merging a pull request may close this issue.

1 participant