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

[TextServer] Add support for retrieving OpenType name strings. #75739

Merged
merged 1 commit into from
May 22, 2023

Conversation

bruvzg
Copy link
Member

@bruvzg bruvzg commented Apr 6, 2023

Add method to get OpenType name strings, which contain localized name and other font information. Was made to get sample texts for better font selection/preview, unfortunately seems like most fonts do not have samples (only 5 from 500 on my system do). But it might be useful for something else.

Example of the returned Dictionary:

{
    "en": {
        "copyright": "© 2012 DynaComware Taiwan Inc. All rights reserved.",
        "family_name": "HanziPen SC",
        "subfamily_name": "Regular",
        "unique_identifier": "HanziPen SC Regular; 14.0d1e1; 2018-06-12",
        "full_name": "HanziPen SC Regular",
        "version": "14.0d1e1",
        "postscript_name": "HanziPenSC-W3",
        "trademark": "HanziPenSC W3 is a trademark of DynaComware Taiwan Inc.",
        "designer": "DynaComware Taiwan Inc.",
        "vendor_url": "http://www.dynacw.com",
        "typographic_family_name": "HanziPen SC",
        "typographic_subfamily_name": "Regular" 
    },
    "zh-cn": {
        "family_name": "翩翩体-简",
        "subfamily_name": "常规体",
        "full_name": "翩翩体-简 常规体",
        "typographic_family_name": "翩翩体-简",
        "typographic_subfamily_name": "常规体" 
    },
    "zh-tw": {
        "family_name": "翩翩體 簡",
        "subfamily_name": "標準體",
        "full_name": "翩翩體-簡 標準體",
        "typographic_family_name": "翩翩體-簡",
        "typographic_subfamily_name": "標準體" 
    } 
}

@akien-mga akien-mga modified the milestones: 4.x, 4.1 May 22, 2023
@akien-mga
Copy link
Member

Could use a rebase for good measure, just for the sake of minimizing the diff between the original commit and latest master.

@bruvzg
Copy link
Member Author

bruvzg commented May 22, 2023

Could use a rebase for good measure

Done.

@akien-mga akien-mga merged commit 0fac233 into godotengine:master May 22, 2023
@akien-mga
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants