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

update GlyphData from Glyphs 3.2 #959

Merged
merged 3 commits into from
Feb 27, 2024
Merged

update GlyphData from Glyphs 3.2 #959

merged 3 commits into from
Feb 27, 2024

Conversation

schriftgestalt
Copy link
Collaborator

Putting that up to see what the test are doing ;).

@khaledhosny
Copy link
Collaborator

A few tests need to be updated and most of the regression tests failures look like improvements, except may be this one?

 ! tests/data/gf/DotGothic16/DotGothic16-Regular.ufo/lib.plist - /tmp/tmpzlyzjnmk/DotGothic16-Regular.ufo/lib.plist--- 
+++ 
@@ -11190,9 +11190,9 @@
       <key>micro.rotat</key>
       <string>uni00B5.rotat</string>
       <key>middledot-kata.half</key>
-      <string>uniFF65</string>
+      <string>middledotkata.half</string>
       <key>middledot-kata.half.rotat</key>
-      <string>uniFF65.rotat</string>
+      <string>middledotkata.half.rotat</string>
       <key>miriSquare</key>
       <string>uni3349</string>
       <key>miriSquare.vert</key>

@schriftgestalt
Copy link
Collaborator Author

There was an altName in that is not in my data.
there is one more thing that probably needs updating code in more places. The case information moved from subcategory="Upper/Lowercase" to case="upper/lower". Not sure if that is used anywhere.

@khaledhosny
Copy link
Collaborator

There was an altName in that is not in my data. there is one more thing that probably needs updating code in more places. The case information moved from subcategory="Upper/Lowercase" to case="upper/lower". Not sure if that is used anywhere.

I don’t think glyphsLib uses this. It only cares about GDEF, so Mark/[Nonspacing,Spacing Combining], and */Ligature:

def _build_public_opentype_categories(ufo: Font) -> dict[str, str]:
"""Returns a dictionary mapping glyph names to GDEF categories.
Does not handle ligature carets. A GDEF table with both categories and
ligature carets is generated by ufo2ft's GdefFeatureWriter at compile time,
using the categories dict and glyph data.
Determining the categories requires anchor propagation or user care to work
as expected, as Glyphs.app also looks at anchors for classification:
* Base: any glyph that has an attaching anchor (such as "top"; "_top" does
not count) and is neither classified as Ligature nor Mark using the
definitions below;
* Ligature: if subCategory is "Ligature" and the glyph has at least one
attaching anchor;
* Mark: if category is "Mark" and subCategory is either "Nonspacing" or
"Spacing Combining";
* Compound: never assigned by Glyphs.app.

@schriftgestalt
Copy link
Collaborator Author

It does seem to look at the altName. That way it can connect the glyph name "middledot-kata.half" to the info entry "dot-kata.half" and get its production name.

It could have used the fallback to search with the unicode, but that doesn't seem to work.

@markhdavid
Copy link

Can anyone summarize where this stands, and if anything is holding this PR up?

@anthrotype
Copy link
Member

Was this copied from the files in https://github.com/schriftgestalt/GlyphsInfo? Usually we write the commit hash in the commit message when we update these files to know where they came from. Can you do that?
Also there seem to be merge conflicts.

@markhdavid
Copy link

Was this copied from the files in https://github.com/schriftgestalt/GlyphsInfo? Usually we write the commit hash in the commit message when we update these files to know where they came from. Can you do that? Also there seem to be merge conflicts.

@schriftgestalt ping...

@schriftgestalt
Copy link
Collaborator Author

The regression tests need to be updated. There are a lot fails with the production name of the brevecomb-cy. It was brevecombcy and now is uni0306.cy. Not sure how to do that in CI.

So it needs to run tests/tools/generate_regression_test_files.py on with the latest GlyphData.

@schriftgestalt schriftgestalt marked this pull request as ready for review February 17, 2024 11:31
@anthrotype
Copy link
Member

The regression tests will fix themselves automatically after you merge the PR

@markhdavid
Copy link

@schriftgestalt are you able to take any action to move this forward? E.g., along the lines of @anthrotype's comment #959 (comment) ?

@schriftgestalt
Copy link
Collaborator Author

I can’t do anything else on this. As I understand cosimos comment is that the test will work after it is merged?

@khaledhosny khaledhosny merged commit 4fde4ac into main Feb 27, 2024
9 of 10 checks passed
@khaledhosny khaledhosny deleted the update-GlyphData branch February 27, 2024 11:09
@anthrotype
Copy link
Member

As I understand cosimos comment is that the test will work after it is merged?

i think so, let's see

Comment on lines -260 to +266
"Ll": ("Letter", "Lowercase"),
"Ll": ("Letter", None),
"Lm": ("Letter", "Modifier"),
"Lo": ("Letter", None),
"Lt": ("Letter", "Uppercase"),
"Lu": ("Letter", "Uppercase"),
"Lt": ("Letter", None),
"Lu": ("Letter", None),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@schriftgestalt why this change? What does it have to do with updating the GlyphData database?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see you commented on this already

The case information moved from subcategory="Upper/Lowercase" to case="upper/lower". Not sure if that is used anywhere.

If it were me, i'd just have left it as it was. Let's hope nothing else breaks

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But it was failing some tests.

@anthrotype
Copy link
Member

the regression tests passed

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.

4 participants