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

Declare supported export formats in backend #1879

Merged
merged 5 commits into from
Jan 6, 2025

Conversation

simoncozens
Copy link
Contributor

@simoncozens simoncozens commented Dec 20, 2024

Fixes #1878. FontraPak PR incoming.

Also makes "find-glyphs-that-use-glyph" conditional on the server supporting it.

@justvanrossum
Copy link
Collaborator

I'm not sure I like the addition of the supportedExportFormats field to the protocol while exportAs() is entirely optional. Perhaps it's better to have an additional optional partner method called getSupportedExportFormats().

Ideally the changes should not affect https://github.com/googlefonts/fontra-rcjk/blob/main/src/fontra_rcjk/projectmanager.py

@simoncozens
Copy link
Contributor Author

Fair enough, yes. Will rethink.

@simoncozens simoncozens force-pushed the declare-export-formats branch from 4ac8113 to 9008780 Compare January 6, 2025 08:16
@simoncozens simoncozens force-pushed the declare-export-formats branch from 9008780 to 39737c6 Compare January 6, 2025 08:22
@justvanrossum
Copy link
Collaborator

The EXPORT_FORMATS constant should probably be deleted, and this snippet can also use the dynamic list of export types:

getItems: () => {
if (this.fontController.backendInfo.projectManagerFeatures["export-as"]) {
return [
{
title: translate("menubar.file.export-as"),
getItems: () =>
EXPORT_FORMATS.map((format) => ({
actionIdentifier: `action.export-as.${format}`,
})),
},
];
} else {

@justvanrossum justvanrossum merged commit ad999d5 into googlefonts:main Jan 6, 2025
5 checks passed
@simoncozens simoncozens deleted the declare-export-formats branch January 6, 2025 14:13
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.

Project manager should declare export formats
2 participants