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

Upgrade Font Awesome #81

Closed
jessegreenberg opened this issue Dec 8, 2020 · 48 comments
Closed

Upgrade Font Awesome #81

jessegreenberg opened this issue Dec 8, 2020 · 48 comments

Comments

@jessegreenberg
Copy link
Contributor

I needed a new icon from Font Awesome that is not in the version we have. Considering upgrading but there was some uncertainty around licensing. Font Awesome also changed a lot between versions 4 and 5. For instance, the old fontawesome-webfont.svg file has been replaced by a different file called sprites/solid.svg.

We need to make sure that FA 5 licensing allows PhET to use it, and that the changes in FA 5 still work with FontAwesomeNode.js.

@jessegreenberg
Copy link
Contributor Author

Here is a link to FA licensing: https://fontawesome.com/license/free

Icons — CC BY 4.0 License
In the Font Awesome Free download, the CC BY 4.0 license applies to all icons packaged as .svg and .js files types.

Fonts — SIL OFL 1.1 License
In the Font Awesome Free download, the SIL OFL license applies to all icons packaged as web and desktop font files.

@jessegreenberg
Copy link
Contributor Author

jessegreenberg commented Dec 8, 2020

Here is the 4.7.0 licensing: https://fontawesome.com/v4.7.0/license/

Applies to all desktop and webfont files in the following directory: font-awesome/fonts/.
License: SIL OFL 1.1

So the CC BY 4.0 License seems to be new for FA 5 icons.

@jessegreenberg
Copy link
Contributor Author

Adding developer meeting label to review with team and see if anyone can confirm that CC BY 4.0 is usable by PhET.

@samreid
Copy link
Member

samreid commented Dec 8, 2020

CC BY 4.0 requires:

you must provide the name of the creator and attribution parties, a copyright notice, a license notice, a disclaimer notice, and a link to the material.

We provide some (but not all of this) in https://github.com/phetsims/sherpa/blob/master/third-party-licenses.md. To my knowledge, none of this is provided in the sim or in the app.

It may be the most cost-effective route for PhET to subscribe to the pro license for font awesome, which is described at https://fontawesome.com/plans#faq-standard-pro-license

@pixelzoom
Copy link
Contributor

pixelzoom commented Dec 10, 2020

FYI...

SVG for icons can be downloaded directly from the FA website, by pressing the "Download SVG" button. E.g. for icon user-cog (the one that @jessegreenberg is interested in):

screenshot_738

Then you'll get a dialog like this, informing you of the license requirements:

screenshot_739

The "link to the license" hyperlink takes you to https://fontawesome.com/license.

@zepumph
Copy link
Member

zepumph commented Dec 10, 2020

Some other sources for icons, perhaps with easier licensing: https://lineicons.com/blog/font-awesome-alternatives/

@pixelzoom
Copy link
Contributor

12/10/2020 dev meeting:

The question is whether the new FA license (CC-BY) is compatible with PhET.

@samreid recalls that CC-BY was not approved when PhET had a legal review a few years ago. PhET has been using MIT. CC-BY puts restrictions on how we can relicense sims.

@jonathanolson said that PhET licenses its sim as CC-BY. He's skeptical that FA license will work, because we need to be GPL compatible.

@ariel-phet How much is the paid plan? @samreid $90/year for 5 "seats". @jonathanolson doesn't solve the issue because we're redistributing. @ariel-phet we can't go down this road.

@jonathanolson we could look for other sources for new SVG icons.

@samreid for user-cog, we could combine two FA 4 icons (user + gear).

@samreid suggested asking @kathy-phet check with legal. What needs to be done to upgrade to new FA license? @samreid will put on agenda for next status meeting. Could also ask FA if they'd give us special license terms.

Assigned to @samreid to bring up at status meeting.

@kathy-phet
Copy link

CC-BY is how we license the simulations, and it should be compatible with even our licensed commercial products we offer in terms of PhET-iO. We just need to attribute the image to them, but I will check with my contacts at Creative Commons that doing so in the HTML code will be sufficient. It doesn't have any GPL type of issues.

@kathy-phet
Copy link

@samreid - Currently within the HTML sim code file we do have this text in our license section (taken from Build a Molecule):

"font-awesome-4.5.0": {

  | "text": [
  | "Created by Dave Gandy"
  | ],
  | "license": "Font Awesome licensed under SIL OFL 1.1 · Code licensed under MIT License · Documentation licensed under CC BY 3.0",
  | "projectURL": "http://fontawesome.io/",
  | "notes": "Provides shapes and icons for phet-io wrappers, SVG for icons in FontAwesomeNode",
  | "licenseText": [
  | "Copyright (c) 2013, Dave Gandy - http://fontawesome.io",
  | "with Reserved Font Name Font Awesome.",
  | "",
  | "This Font Software is licensed under the SIL Open Font License, Version 1.1.",
  | "This license is copied below, and is also available with a FAQ at:",
  | "http://scripts.sil.org/OFL",
  | "",
  | "",
  | "-----------------------------------------------------------",
  | "SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007",
  | "-----------------------------------------------------------",
  | "",
  | "PREAMBLE",
  | "The goals of the Open Font License (OFL) are to stimulate worldwide",
  | "development of collaborative font projects, to support the font creation",
  | "efforts of academic and linguistic communities, and to provide a free and",
  | "open framework in which fonts may be shared and improved in partnership",
  | "with others.",
  | "",
  | "The OFL allows the licensed fonts to be used, studied, modified and",
  | "redistributed freely as long as they are not sold by themselves. The",
  | "fonts, including any derivative works, can be bundled, embedded,",
  | "redistributed and/or sold with any software provided that any reserved",
  | "names are not used by derivative works. The fonts and derivatives,",
  | "however, cannot be released under any other type of license. The",
  | "requirement for fonts to remain under this license does not apply",
  | "to any document created using the fonts or their derivatives.",
  | "",
  | "DEFINITIONS",
  | ""Font Software" refers to the set of files released by the Copyright",
  | "Holder(s) under this license and clearly marked as such. This may",
  | "include source files, build scripts and documentation.",
  | "",
  | ""Reserved Font Name" refers to any names specified as such after the",
  | "copyright statement(s).",
  | "",
  | ""Original Version" refers to the collection of Font Software components as",
  | "distributed by the Copyright Holder(s).",
  | "",
  | ""Modified Version" refers to any derivative made by adding to, deleting,",
  | "or substituting -- in part or in whole -- any of the components of the",
  | "Original Version, by changing formats or by porting the Font Software to a",
  | "new environment.",
  | "",
  | ""Author" refers to any designer, engineer, programmer, technical",
  | "writer or other person who contributed to the Font Software.",
  | "",
  | "PERMISSION & CONDITIONS",
  | "Permission is hereby granted, free of charge, to any person obtaining",
  | "a copy of the Font Software, to use, study, copy, merge, embed, modify,",
  | "redistribute, and sell modified and unmodified copies of the Font",
  | "Software, subject to the following conditions:",
  | "",
  | "1) Neither the Font Software nor any of its individual components,",
  | "in Original or Modified Versions, may be sold by itself.",
  | "",
  | "2) Original or Modified Versions of the Font Software may be bundled,",
  | "redistributed and/or sold with any software, provided that each copy",
  | "contains the above copyright notice and this license. These can be",
  | "included either as stand-alone text files, human-readable headers or",
  | "in the appropriate machine-readable metadata fields within text or",
  | "binary files as long as those fields can be easily viewed by the user.",
  | "",
  | "3) No Modified Version of the Font Software may use the Reserved Font",
  | "Name(s) unless explicit written permission is granted by the corresponding",
  | "Copyright Holder. This restriction only applies to the primary font name as",
  | "presented to the users.",
  | "",
  | "4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font",
  | "Software shall not be used to promote, endorse or advertise any",
  | "Modified Version, except to acknowledge the contribution(s) of the",
  | "Copyright Holder(s) and the Author(s) or with their explicit written",
  | "permission.",
  | "",
  | "5) The Font Software, modified or unmodified, in part or in whole,",
  | "must be distributed entirely under this license, and must not be",
  | "distributed under any other license. The requirement for fonts to",
  | "remain under this license does not apply to any document created",
  | "using the Font Software.",
  | "",
  | "TERMINATION",
  | "This license becomes null and void if any of the above conditions are",
  | "not met.",
  | "",
  | "DISCLAIMER",
  | "THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,",
  | "EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF",
  | "MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT",
  | "OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE",
  | "COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,",
  | "INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL",
  | "DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING",
  | "FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM",
  | "OTHER DEALINGS IN THE FONT SOFTWARE.",
  | ""
  | ]
  | },

@samreid
Copy link
Member

samreid commented Dec 11, 2020

Font Awesome 5.0's free license says:

Icons — CC BY 4.0 License: In the Font Awesome Free download, the CC BY 4.0 license applies to all icons packaged as .svg and .js files types.

So Font Awesome is CC-BY. There was a recent article from creative commons, saying that even the more restrictive "CC-BY-SA" is one-way compatible with GPL. https://creativecommons.org/2015/10/08/cc-by-sa-4-0-now-one-way-compatible-with-gplv3/. So since we would be using the less-restrictive CC-BY, it seems permissible.

@kathy-phet thanks for reminding me that the attributions appear in the built HTML files. Since we are already providing attribution, it seems like we can proceed with this. I recall in Thursday's meeting @jonathanolson and @pixelzoom raised other concerns or commented on these concerns, so I'll reassign to them for further discussion. @ariel-phet also asked me to add an agenda item for Thursday status meeting--we can also touch base then if we haven't concluded discussion in the issue beforehand.

@pixelzoom
Copy link
Contributor

pixelzoom commented Dec 11, 2020

I recall in Thursday's meeting @jonathanolson and @pixelzoom raised other concerns or commented on these concerns, so I'll reassign to them for further discussion.

The concern I raised was simply that you can't upgrade sherpa to a new version of FA, or cherry-pick icons (via their web interface) from newer versions of FA, because the license has changed. It's up to PhET to decide how to proceed with evaluating the new license, resolving any licensing issues, and/or finding other sources for SVG icons.

Advice on licensing issues is not a service that PixelZoom provides, so unassigning myself.

@pixelzoom pixelzoom removed their assignment Dec 11, 2020
@jonathanolson
Copy link
Contributor

D. 'PhET HTML Common Source Code': MIT License
"PhET HTML Simulation Source Code" is a collection of original common libraries and tools developed by PhET, including but not limited to source code (JavaScript/HTML/CSS), images, audio and text.

PhET licenses PhET HTML Simulation Source Code under the MIT License. The full text of the MIT License is available here: http://opensource.org/licenses/MIT

If joist/sun/scenery-phet is relying on that (and it doesn't look MIT-compatible, see https://opensource.stackexchange.com/questions/7435/mit-licensed-project-with-cc-by-sa-dependency), then I'm concerned.

Strong preference to either use alternatives, or have someone look into whether we wouldn't run into issues.

@samreid
Copy link
Member

samreid commented Dec 11, 2020

The links you described refer to "CC-BY-SA" but Font Awesome is "CC-BY" without the "SA" restrictions. Does the same argument apply?

@jonathanolson
Copy link
Contributor

The links you described refer to "CC-BY-SA" but Font Awesome is "CC-BY" without the "SA" restrictions. Does the same argument apply?

A quick read of https://creativecommons.org/licenses/by/4.0/legalcode doesn't seem compatible with the MIT license.

@kathy-phet
Copy link

@jonathanolson - My understanding here is that the code remains MIT and the images then remain CC-BY. They can be combined and redistributed, but we will need to specify that the images are CC-BY. We handle this fine in the HTML file. The license needs a tweak. And I will need to consult the lawyers as well.

@jonathanolson
Copy link
Contributor

My concern is that the derived work is specifically embedded and checked into our MIT'ed source code, e.g. https://github.com/phetsims/sun/blob/master/js/FontAwesomeNode.js

@zepumph
Copy link
Member

zepumph commented Feb 5, 2021

Should sherpa be runnable? Have a demo? Where should we put a test harness for this? Do we need one?

I don't think we should build out sherpa to be runnable. To me this feels like a scenery-phet thing, since that is where these font-awesome icons are used (in phet sims). If you want to create a sherpa demo though, that's fine.

@zepumph zepumph assigned samreid and unassigned samreid and zepumph Feb 5, 2021
@zepumph
Copy link
Member

zepumph commented Feb 5, 2021

Discussed with @samreid, he will do a bit more work before my review.

@samreid
Copy link
Member

samreid commented Feb 5, 2021

I pushed icons.json from fontawesome, keeping the same directory structure in case we later decide to commit more of that library.

In discussion, @zepumph and I agreed to commit and push all font awesome icons. However, some are having Shape assembly errors, so I'll leave those off of the master list for now.

It added a 5 second delay to start up scenery-phet, so @zepumph and I discussed adding it as an isolated scenery test.

@samreid
Copy link
Member

samreid commented Feb 6, 2021

I added a scrollable, zoomable test at scenery/tests/fontawesome5.html. I think everything is all set for review. @zepumph please let me know if I've missed anything.

@zepumph
Copy link
Member

zepumph commented Feb 17, 2021

Sherpa was not linted because of this line (and others) https://github.com/phetsims/chipper/blob/6e4d288b017138d901e982e75638b22e9fc5eeb0/js/grunt/lint.js#L30. I noticed you added an eslintignore file, but I couldn't get our linter to work with multiple eslintignore files. Perhaps just a defect of the NodeAPI we use in lint.js (which takes an arg of a single ignore file). I updated the project to lint sherpa, and I added a top level eslintrc file in sherpa that is set up to ignore the necessary files. please review.

fontawesome5.html is very cool. Can you describe the use of it? Is it to test that the icons work? I don't see a way to use that to pick my icon, as I don't know how to go from icon to name. Likely this isn't the purpose of the html scrap. Do you want to do anything with this? Load it on CT? Perhaps like:

Index: js/listContinuousTests.js
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/js/listContinuousTests.js b/js/listContinuousTests.js
--- a/js/listContinuousTests.js	(revision 85ccba1aa6c5d75f685e6c3ac86540b52dac7bdc)
+++ b/js/listContinuousTests.js	(date 1613526983532)
@@ -275,7 +275,8 @@
       'tests/',
       'tests/playground.html',
       'tests/renderer-comparison.html?renderers=canvas,svg,dom',
-      'tests/text-quality-test.html'
+      'tests/text-quality-test.html',
+      'tests/fontawesome5.html'
     ]
   }
 ].forEach( ( { repo, urls } ) => {

It looks like #83 is for discussing if we get rid of all font awesome 4 content in the project. Without knowing any of the details, it would be nice to do that!

Swapping the import lines for the individual generated icons' template means that the output icons don't change when autoformatting. Please review my commit.

Thanks for doing all this awesome work!

@zepumph zepumph assigned samreid and unassigned zepumph Feb 17, 2021
@samreid
Copy link
Member

samreid commented Feb 17, 2021

sherpa/.eslintrc.js looks great, I tried commenting out a line to see that font awesome would be linted and it worked as expected, thanks!

fontawesome5.html was developed as a manual test harness to see if all the icons could render. It helped us identify this issue: phetsims/kite#88. I don't think it should be added to CT--it takes too long to run and would be testing code that is unlikely to change.

I think we covered everything, back to @zepumph to close if we are all set.

@samreid samreid assigned zepumph and unassigned samreid Feb 17, 2021
@zepumph zepumph closed this as completed Feb 18, 2021
zepumph added a commit to phetsims/perennial that referenced this issue Jul 21, 2022
samreid pushed a commit to phetsims/perennial that referenced this issue Oct 17, 2024
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

9 participants