Repository: zeppelin Updated Branches: refs/heads/branch-0.6 5d66a5c02 -> 8b15eb19f
[ZEPPELIN-1056] Embed webfont when building ### What is this PR for? This is some changes to include the previously webfonts when building Zeppelin. If there is too much problem building (In the case of China), we could eventually make the fonts part of the source code ### What type of PR is it? Improvement ### Todos * [x] - Add the fonts licenses (Apache 2.0 + SIL Open Font License v1.10) ### What is the Jira issue? https://issues.apache.org/jira/browse/ZEPPELIN-1056 ### How should this be tested? Deactivate the fonts on your computer, build and launch Zeppelin. The Zeppelin logo should have the Patua One font ### Questions: * Does the licenses files need update? Yes * Is there breaking changes for older versions? No * Does this needs documentation? No Author: Damien CORNEAU <[email protected]> Closes #1082 from corneadoug/embedded/font and squashes the following commits: c8096d1 [Damien CORNEAU] Add files to RAT exceptions 1805343 [Damien CORNEAU] Move license files 99ea650 [Damien CORNEAU] Add licenses for the three fonts acda41a [Damien CORNEAU] Fix wrong path in font css file fa1f002 [Damien CORNEAU] Fix for plugin not able to create folder df3bd10 [Damien CORNEAU] Add webfonts locally using grunt plugin (cherry picked from commit f36cbaa4e3a38327fc69959146cb97a0f20b3cac) Signed-off-by: Mina Lee <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/8b15eb19 Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/8b15eb19 Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/8b15eb19 Branch: refs/heads/branch-0.6 Commit: 8b15eb19f531ad4deed4c07382e7954382045c46 Parents: 5d66a5c Author: Damien CORNEAU <[email protected]> Authored: Mon Jun 27 00:33:08 2016 +0900 Committer: Mina Lee <[email protected]> Committed: Sun Jun 26 22:31:16 2016 -0700 ---------------------------------------------------------------------- .gitignore | 3 ++ zeppelin-distribution/src/bin_license/LICENSE | 14 +++++- .../bin_license/licenses/LICENSE-patuaOne-font | 44 ++++++++++++++++++ .../licenses/LICENSE-source_code_pro-font | 43 +++++++++++++++++ zeppelin-web/Gruntfile.js | 49 ++++++++++++++++++++ zeppelin-web/package.json | 13 +++--- zeppelin-web/pom.xml | 3 ++ zeppelin-web/src/assets/styles/fontImport.css | 17 ------- zeppelin-web/src/index.html | 4 +- 9 files changed, 164 insertions(+), 26 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/zeppelin/blob/8b15eb19/.gitignore ---------------------------------------------------------------------- diff --git a/.gitignore b/.gitignore index e13f0e9..f60b256 100644 --- a/.gitignore +++ b/.gitignore @@ -36,6 +36,9 @@ reports zeppelin-web/node_modules zeppelin-web/dist zeppelin-web/.tmp +zeppelin-web/src/fonts/Roboto* +zeppelin-web/src/fonts/Source-Code-Pro* +zeppelin-web/src/fonts/Patua-One* zeppelin-web/.sass-cache zeppelin-web/bower_components **nbproject/ http://git-wip-us.apache.org/repos/asf/zeppelin/blob/8b15eb19/zeppelin-distribution/src/bin_license/LICENSE ---------------------------------------------------------------------- diff --git a/zeppelin-distribution/src/bin_license/LICENSE b/zeppelin-distribution/src/bin_license/LICENSE index a19b7b4..292b8d3 100644 --- a/zeppelin-distribution/src/bin_license/LICENSE +++ b/zeppelin-distribution/src/bin_license/LICENSE @@ -99,7 +99,7 @@ The following components are provided under Apache License. (Apache 2.0) Alluxio Minicluster (org.alluxio:alluxio-minicluster:1.0.0 - http://alluxio.org) (Apache 2.0) Alluxio Underfs Local (org.alluxio:alluxio-underfs-local:1.0.0 - http://alluxio.org) (Apache 2.0) Microsoft Azure Storage Library for Java (com.microsoft.azure:azure-storage:4.0.0 - https://github.com/Azure/azure-storage-java) - + (Apache 2.0) Roboto Font (https://github.com/google/roboto/) ======================================================================== @@ -136,7 +136,7 @@ The text of each license is also included at licenses/LICENSE-[project]-[version (The MIT License) slf4j-log4j12 v1.7.10 (org.slf4j:slf4j-log4j12:jar:1.7.10 - http://www.slf4j.org) - http://www.slf4j.org/license.html (The MIT License) bcprov-jdk15on v1.51 (org.bouncycastle:bcprov-jdk15on:jar:1.51 - http://www.bouncycastle.org/java.html) - http://www.bouncycastle.org/licence.html (The MIT License) AnchorJS (https://github.com/bryanbraun/anchorjs) - https://github.com/bryanbraun/anchorjs/blob/master/README.md#license - + The following components are provided under the MIT License. (The MIT License) Objenesis (org.objenesis:objenesis:2.1 - https://github.com/easymock/objenesis) - Copyright (c) 2006-2015 the original author and authors @@ -207,6 +207,16 @@ The following components are provided under the EPL License. (EPL 1.0) JRuby (org.jruby.jruby-complete:v1.6.8 - http://www.jruby.org/) + +======================================================================== +SIL OPEN FONT LICENSE +======================================================================== + + (OFL 1.1) Patua One Font (see licenses/LICENSE-patuaOne-font) + (OFL 1.1) Source Code Pro Font (see licenses/LICENSE-source_code_pro-font) + + + ======================================================================== WTFPL - (http://www.wtfpl.net/) ======================================================================== http://git-wip-us.apache.org/repos/asf/zeppelin/blob/8b15eb19/zeppelin-distribution/src/bin_license/licenses/LICENSE-patuaOne-font ---------------------------------------------------------------------- diff --git a/zeppelin-distribution/src/bin_license/licenses/LICENSE-patuaOne-font b/zeppelin-distribution/src/bin_license/licenses/LICENSE-patuaOne-font new file mode 100644 index 0000000..bc62c8b --- /dev/null +++ b/zeppelin-distribution/src/bin_license/licenses/LICENSE-patuaOne-font @@ -0,0 +1,44 @@ +Copyright (c) 2011 by LatinoType Limitada ([email protected]), +with Reserved Font Names âPatua Oneâ + +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. http://git-wip-us.apache.org/repos/asf/zeppelin/blob/8b15eb19/zeppelin-distribution/src/bin_license/licenses/LICENSE-source_code_pro-font ---------------------------------------------------------------------- diff --git a/zeppelin-distribution/src/bin_license/licenses/LICENSE-source_code_pro-font b/zeppelin-distribution/src/bin_license/licenses/LICENSE-source_code_pro-font new file mode 100644 index 0000000..4226d8e --- /dev/null +++ b/zeppelin-distribution/src/bin_license/licenses/LICENSE-source_code_pro-font @@ -0,0 +1,43 @@ +Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name âSourceâ. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. + +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. http://git-wip-us.apache.org/repos/asf/zeppelin/blob/8b15eb19/zeppelin-web/Gruntfile.js ---------------------------------------------------------------------- diff --git a/zeppelin-web/Gruntfile.js b/zeppelin-web/Gruntfile.js index 71bdf15..5574daf 100644 --- a/zeppelin-web/Gruntfile.js +++ b/zeppelin-web/Gruntfile.js @@ -56,6 +56,54 @@ module.exports = function (grunt) { } }, + 'goog-webfont-dl': { + patuaOne: { + options: { + ttf: true, + eot: true, + woff: true, + woff2: true, + svg: true, + fontname: 'Patua One', + fontstyles: '400', + fontdest: '<%= yeoman.app %>/fonts/', + cssdest: '<%= yeoman.app %>/fonts/Patua-One.css', + cssprefix: '', + subset: '' + } + }, + sourceCodePro: { + options: { + ttf: true, + eot: true, + woff: true, + woff2: true, + svg: true, + fontname: 'Source Code Pro', + fontstyles: '300, 400, 500', + fontdest: '<%= yeoman.app %>/fonts/', + cssdest: '<%= yeoman.app %>/fonts/Source-Code-Pro.css', + cssprefix: '', + subset: '' + } + }, + roboto: { + options: { + ttf: true, + eot: true, + woff: true, + woff2: true, + svg: true, + fontname: 'Roboto', + fontstyles: '300, 400, 500', + fontdest: '<%= yeoman.app %>/fonts/', + cssdest: '<%= yeoman.app %>/fonts/Roboto.css', + cssprefix: '', + subset: '' + } + } + }, + // Watches files for changes and runs tasks based on the changed files watch: { bower: { @@ -442,6 +490,7 @@ module.exports = function (grunt) { 'jshint:all', 'clean:dist', 'wiredep', + 'goog-webfont-dl', 'useminPrepare', 'concurrent:dist', 'postcss', http://git-wip-us.apache.org/repos/asf/zeppelin/blob/8b15eb19/zeppelin-web/package.json ---------------------------------------------------------------------- diff --git a/zeppelin-web/package.json b/zeppelin-web/package.json index 036de44..ff18967 100644 --- a/zeppelin-web/package.json +++ b/zeppelin-web/package.json @@ -9,6 +9,7 @@ "autoprefixer": "^6.1.0", "bower": "1.7.2", "grunt": "^0.4.1", + "grunt-cli": "^0.1.13", "grunt-concurrent": "^0.5.0", "grunt-contrib-clean": "^0.5.0", "grunt-contrib-concat": "^0.4.0", @@ -20,21 +21,21 @@ "grunt-contrib-uglify": "^0.4.0", "grunt-contrib-watch": "^0.6.1", "grunt-filerev": "^0.2.1", + "grunt-goog-webfont-dl": "^0.1.2", + "grunt-karma": "~0.8.3", "grunt-newer": "^0.7.0", "grunt-ng-annotate": "^0.10.0", "grunt-postcss": "^0.7.1", "grunt-svgmin": "^0.4.0", "grunt-usemin": "^2.1.1", "grunt-wiredep": "~2.0.0", - "grunt-cli": "^0.1.13", "jshint-stylish": "^0.2.0", - "load-grunt-tasks": "^0.4.0", - "time-grunt": "^0.3.1", - "grunt-karma": "~0.8.3", - "karma-phantomjs-launcher": "~0.1.4", "karma": "~0.12.23", + "karma-coverage": "^0.5.1", "karma-jasmine": "~0.1.5", - "karma-coverage": "^0.5.1" + "karma-phantomjs-launcher": "~0.1.4", + "load-grunt-tasks": "^0.4.0", + "time-grunt": "^0.3.1" }, "engines": { "node": ">=0.10.0" http://git-wip-us.apache.org/repos/asf/zeppelin/blob/8b15eb19/zeppelin-web/pom.xml ---------------------------------------------------------------------- diff --git a/zeppelin-web/pom.xml b/zeppelin-web/pom.xml index 24f6e8f..0b404e2 100644 --- a/zeppelin-web/pom.xml +++ b/zeppelin-web/pom.xml @@ -76,6 +76,9 @@ <exclude>src/styles/font-awesome*</exclude> <exclude>src/fonts/Simple-Line*</exclude> <exclude>src/fonts/simple-line*</exclude> + <exclude>src/fonts/Patua-One*</exclude> + <exclude>src/fonts/Roboto*</exclude> + <exclude>src/fonts/Source-Code-Pro*</exclude> <exclude>bower.json</exclude> <exclude>package.json</exclude> <exclude>*.md</exclude> http://git-wip-us.apache.org/repos/asf/zeppelin/blob/8b15eb19/zeppelin-web/src/assets/styles/fontImport.css ---------------------------------------------------------------------- diff --git a/zeppelin-web/src/assets/styles/fontImport.css b/zeppelin-web/src/assets/styles/fontImport.css deleted file mode 100644 index 3c88dfb..0000000 --- a/zeppelin-web/src/assets/styles/fontImport.css +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -@import url(//fonts.googleapis.com/css?family=Patua+One); -@import url(//fonts.googleapis.com/css?family=Roboto); -@import url(//fonts.googleapis.com/css?family=Source+Code+Pro); http://git-wip-us.apache.org/repos/asf/zeppelin/blob/8b15eb19/zeppelin-web/src/index.html ---------------------------------------------------------------------- diff --git a/zeppelin-web/src/index.html b/zeppelin-web/src/index.html index 7cbdde5..cb03939 100644 --- a/zeppelin-web/src/index.html +++ b/zeppelin-web/src/index.html @@ -61,9 +61,11 @@ limitations under the License. <link rel="stylesheet" href="fonts/font-awesome.min.css"> <link rel="stylesheet" href="fonts/simple-line-icons.css"> <link rel="stylesheet" href="fonts/custom-font.css"> + <link rel="stylesheet" href="fonts/Patua-One.css"> + <link rel="stylesheet" href="fonts/Source-Code-Pro.css"> + <link rel="stylesheet" href="fonts/Roboto.css"> <!-- endbuild --> <link rel="stylesheet" ng-href="assets/styles/looknfeel/{{looknfeel}}.css"> - <link rel="stylesheet" href="assets/styles/fontImport.css" /> </head> <body ng-class="{'bodyAsIframe': asIframe}" > <!--[if lt IE 7]>
