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

Merge with Shaperglot #152

Open
yanone opened this issue Jan 12, 2024 · 1 comment
Open

Merge with Shaperglot #152

yanone opened this issue Jan 12, 2024 · 1 comment

Comments

@yanone
Copy link

yanone commented Jan 12, 2024

David (rather, the @Rosetta account) pointed out to me on Mastodon that a combination or merge of Shaperglot with Hyperglot has already been envisioned, without stating any further details. I want to elaborate on that.

We’ve discussed this internally at Google Fonts and are indeed open for and interested in the idea of contributing the shaping analysis part of Shaperglot to Hyperglot and discard our own nascent language definitions database in the process.

We believe this would be to the mutual benefit of both Google Fonts to gain access to Hyperglot’s excellent database, as well as for Hyperglot users to gain access to Google Fonts’ extensive knowledge in Font QA with regards to shaping in specific.

There are a couple of concerns, tho.

First up, the GPLv3 license of Hyperglot may prevent its application within Google or even other corporations. For instance, Fontbakery was relicensed to Apache so that Microsoft can adopt it.
I’m going to forward this issue internally after posting it to invite other voices to join the conversation.

Secondly, we are wondering about a conduct for contributions and collaboration in the future. This wouldn’t be a one-off contribution of code. Shaperglot is in active development and increasingly used in production of large font families at Google, so ideally, some of us would be accepted as collaborators on your repository.

Thirdly, there is the question of how to integrate Shaperglot in practical terms.
I haven't delved into how Hyperglot works on the code level, but I see several approaches:

  1. Shaperglot’s code get fully integrated into Hyperglot commands, essentially dissolving into Shaperglot.
  2. Shaperglot becomes part of the Hyperglot package but remains its own code, possibly accessible through a separate CLI command.
  3. If neither of the above two options are satisfactory, or an active collaboration on your repository is out of the question, the third option would be to keep Shaperglot as an entirely separate package under Google Fonts as it is now, but rewire it to use the Hyperglot database inferred simply as a Python package dependency. This would still satisfy the benefits for both Google Fonts as well as Hyperglot users, given that Hyperglot users learn about the existence of a separate Shaperglot.

One detail to point out is that, next to code changes, we would also ask for changes to the language database to add character sequences such as {ÍJ́} for Dutch (see here) which are then checked for not containing .notdef and not having unattached marks, instead of merely existing as codepoints in the fonts. Recently defined (at Google Fonts) Sub-Saharan African languages contain a lot of those sequences.
(Note that we’re only talking about the encodings here and not about the sample texts and other definitions which are Google-specific and will remain there in that package).

Additionally, Shaperglot has manually defined shaping definitions that would also have to make it into the new tool in some form, see here (unmerged PR).
Please note that the majority of currently defined shaping definition files in Shaperglot, which are generated by code (as noted in their first line), would disappear in favour of running those same checks live. This is one field of active development at Shaperglot and would not make it into Hyperglot in its current form. Only some manually defined definitions (like the ones for Dutch and Turkish shown in the linked PR, and possibly more in the future) are required to be explicitly defined. This could become part of Hyperglot's existing yaml files, or hosted in separate files.

@MrBrezina
Copy link
Member

MrBrezina commented Jan 16, 2024 via email

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

No branches or pull requests

3 participants