Skip to content

Conversation

@aaronbell
Copy link
Collaborator

Summary of the Pull Request

Now builds static instances correctly.

PR Checklist

Detailed Description of the Pull Request / Additional comments

As far as I can tell, what essentially happened here is that instances in the designspace were not being renamed, even though the sources were being renamed. As a result, the variable fonts would build correctly, but the static instances were not. The font naming approach has now been changed and is producing reliable results.

What's particularly vexing is that for the life of me I can't figure out how the code actually worked before, because as far as I can tell, we've never modified the instance code before.

Validation Steps Performed

Checked tables in OT Master

Fixing so static instances build properly.
Previous commit wasn't quite working. Took a different approach.
@aaronbell aaronbell marked this pull request as ready for review September 27, 2020 06:01
@aaronbell
Copy link
Collaborator Author

aaronbell commented Sep 27, 2020

@madig - I wonder if when you updated the requirements.txt file in our last PR that something changed in the way instances are generated from the designspace file. Because we've never modified the instance naming before and it always worked OK.

@madig
Copy link
Contributor

madig commented Sep 27, 2020

I'll take a look later, gotta run now. If you haven't, try changing the static fonts compilation function to also change the family names for all instances in the designspace before instantiating the instantiator and then remove the single name setter after it.

@aaronbell
Copy link
Collaborator Author

I'll take a look later, gotta run now. If you haven't, try changing the static fonts compilation function to also change the family names for all instances in the designspace before instantiating the instantiator and then remove the single name setter after it.

:)

@madig
Copy link
Contributor

madig commented Sep 27, 2020

:)

It's like you read my mind.

reverting line 221
@madig
Copy link
Contributor

madig commented Sep 27, 2020

@madig - I wonder if when you updated the requirements.txt file in our last PR that something changed in the way instances are generated from the designspace file. Because we've never modified the instance naming before and it always worked OK.

I think this is a case of setting things in a different order. Font naming is annoying as is and maybe the Designspace ergonomics aren't the best here... you could probably get rid of the familyname, stylemapfamilyname and stylemapstylename instance fields and ufo2ft would do the right thing for you, as long as you set the correct familyName (and unset styleMapFamilyName) in the sources.

@aaronbell
Copy link
Collaborator Author

@madig - I wonder if when you updated the requirements.txt file in our last PR that something changed in the way instances are generated from the designspace file. Because we've never modified the instance naming before and it always worked OK.

I think this is a case of setting things in a different order. Font naming is annoying as is and maybe the Designspace ergonomics aren't the best here... you could probably get rid of the familyname, stylemapfamilyname and stylemapstylename instance fields and ufo2ft would do the right thing for you, as long as you set the correct familyName (and unset styleMapFamilyName) in the sources.

Right, but the point I was making before was that the code had worked fine with just setting names in the sources and then suddenly stopped working. That’s why I was wondering.

@aaronbell
Copy link
Collaborator Author

Something I just thought of. Previously we were setting the font family name in the source font files (eg, source.info.familyname) but I don’t believe that actually changed anything in the designspace document. Potentially, the designspace document is now being given greater priority over the source fonts info for instance generation, for whatever reason, requiring modification of the designspace naming.

aaronbell added a commit to aaronbell/cascadia-code that referenced this pull request Oct 1, 2020
re-aligning with microsoft#370
@DHowett DHowett changed the title Update build.py Set the names of the static instances properly Oct 8, 2020
@DHowett DHowett merged commit ad49ee6 into microsoft:master Oct 8, 2020
@aaronbell aaronbell deleted the static_fix branch November 29, 2020 14:48
@DHowett
Copy link
Member

DHowett commented Dec 3, 2020

I have been a poor steward of this repository, and I should have produced a build in the interim to make it easier for folks who want to use Cascadia.

I've been off the ball for quite a while, and it is time to get back on it. Sorry for any delay/for disappearing.

@madig
Copy link
Contributor

madig commented Dec 3, 2020

It's ok, we're all open-source here.

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.

according to fontconfig, familyname no longer contains style name :(

3 participants