Skip to content

Glyphs 3 (attempt 4)#691

Merged
madig merged 59 commits intogooglefonts:mainfrom
simoncozens:glyphs3
Aug 5, 2021
Merged

Glyphs 3 (attempt 4)#691
madig merged 59 commits intogooglefonts:mainfrom
simoncozens:glyphs3

Conversation

@simoncozens
Copy link
Collaborator

@simoncozens simoncozens commented Jun 28, 2021

See also #690, which contains the first few commits.

This is essentially the same code as before, but organised into "topic" commits and broken down into meaningful-enough-sized commits for ease of review (oh, and rebased onto main, of course).

dependabot bot and others added 30 commits June 28, 2021 10:52
Bumps [lxml](https://github.com/lxml/lxml) from 4.6.2 to 4.6.3.
- [Release notes](https://github.com/lxml/lxml/releases)
- [Changelog](https://github.com/lxml/lxml/blob/master/CHANGES.txt)
- [Commits](lxml/lxml@lxml-4.6.2...lxml-4.6.3)

Signed-off-by: dependabot[bot] <support@github.com>
_classesForName, _wrapperKeysTranslate, shouldWriteValueForKey, _keyOrder
But we keep the actual settings in their G2 properties right now
@simoncozens
Copy link
Collaborator Author

Yeah, I did that in the merge commit, and now we have incompatible requirements. Aargh.

@simoncozens
Copy link
Collaborator Author

Something's very wrong here: openstep_plist should be marked as a dependency. And the tests should fail if we're not installing it?!

@madig
Copy link
Collaborator

madig commented Aug 2, 2021

It is a dependency? I can see it in setup.cfg and requirements.txt?

@madig
Copy link
Collaborator

madig commented Aug 2, 2021

Oh I see, the regression test should fail but doesn't. I think that's because I marked it as can-fail. Let's try without...

@simoncozens
Copy link
Collaborator Author

OK, I see it. We're checking out main, installing the dependencies from that (which does not have the new openstep dep), then checking out the branch later. We should probably add another step to the workflow which re-installs the dependencies after switching branches.

@madig
Copy link
Collaborator

madig commented Aug 2, 2021

I just saw that, yes. Let's see.

@madig
Copy link
Collaborator

madig commented Aug 2, 2021

Something is flipping smooth flags :o

@simoncozens
Copy link
Collaborator Author

But only some of them. And I can't reproduce locally. Annoying.

@simoncozens
Copy link
Collaborator Author

simoncozens commented Aug 4, 2021

I can reproduce this now. I don't understand it, but some clues: it only happens in (i) background glyphs (ii) which are made up of components. and (iii) in the regression test framework - not via glyphs2ufo.

Also, the "new" version is arguably correct. For example, in the master branch, Karla UltraBold Italic has this when decomposing the background of dcroat:

      <point x="748" y="647"/>
      <point x="747" y="532" type="curve"/>
      <point x="747" y="524"/>

But the glyphs3 branch has:

      <point x="748" y="647"/>
      <point x="747" y="532" type="curve" smooth="yes"/>
      <point x="747" y="524"/>

The original d which is being decomposed is:

"748 647 OFFCURVE",
"747 532 CURVE SMOOTH",
"747 524 OFFCURVE",

The question is not "Why is glyphs3 adding a smooth flag?" but "Why is the main branch dropping one?"

@madig
Copy link
Collaborator

madig commented Aug 4, 2021

@simoncozens
Copy link
Collaborator Author

The diff is the wrong way around.

@madig
Copy link
Collaborator

madig commented Aug 4, 2021

@simoncozens
Copy link
Collaborator Author

That's not the point. The point is, which is right? Which is wrong?

@simoncozens
Copy link
Collaborator Author

One which is added:

! /tmp/tmp0ujjlwis/Playball-Regular.ufo/glyphs.public.background/uhungarumlaut.glif - tests/data/gf/Playball/Playball-Regular.ufo/glyphs.public.background/uhungarumlaut.glif--- 
+++ 
@@ -62,7 +62,7 @@
       <point x="345" y="345" type="curve" smooth="yes"/>
       <point x="305" y="281"/>
       <point x="211" y="61"/>
-      <point x="148" y="59" type="curve"/>
+      <point x="148" y="59" type="curve" smooth="yes"/>
       <point x="127" y="59"/>
       <point x="120" y="75"/>
       <point x="120" y="97" type="curve" smooth="yes"/>

Glyphs source has "148 59 CURVE SMOOTH" so master is correct here. OK, I got confused earlier.

But I have no idea why this is happening. And why it is happening now, when it wasn't happening before.

@simoncozens
Copy link
Collaborator Author

However, I am getting the same result (no "smooth" for that point) on main now locally!

@simoncozens
Copy link
Collaborator Author

I bet you this is the problem:

-fonttools[ufo,unicode]==4.21.1
+fonttools[ufo,unicode]==4.25.2

@simoncozens
Copy link
Collaborator Author

$ cat is-point-smooth.py
import glyphsLib
import logging
import fontTools

logging.basicConfig(level=logging.ERROR)
ufos = glyphsLib.load_to_ufos("tests/data/gf/Playball.glyphs")

print(fontTools.__version__)
print(ufos[0].layers["public.background"]["uhungarumlaut"][0][60].smooth)
$ python3 is-point-smooth.py
4.21.1
True
$ python3 is-point-smooth.py
4.25.2
False

Now what?

@simoncozens
Copy link
Collaborator Author

Ship it!

@madig
Copy link
Collaborator

madig commented Aug 5, 2021

Merging this now and tagging a pre-release. Thanks!

@madig madig merged commit d62b93e into googlefonts:main Aug 5, 2021
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.

6 participants