From de70ee2f0132661c9bf771cb66a40d1961073037 Mon Sep 17 00:00:00 2001 From: Marc Englund Date: Tue, 11 Feb 2014 10:15:07 +0200 Subject: Font icon support (#13152) Renamed Icon to ImageIcon Change-Id: I608815f17a3651b205fed81b5294385df0d68802 Extracted the abstract client-side Icon class Change-Id: Ic32e270595a5796d0bbd1dd31f34282b56672aa9 Created the FontIcon class Change-Id: Iad13871e7bf1807dee2c538c76306d4620191f5e Renamed AbstractComponentConnector.getIcon to getIconUri Change-Id: I6953ab79661993b561655d483c1bd013b66407f3 Added the AbstractComponentConnector.getIcon method Change-Id: I6fb91dc643fb09da3ba53666b1a8a289901702e3 Refactored getIcon Change-Id: Ibae39e66d0fb8449e20ac5209eb8c18b6ada4387 Made all existing uses of Icon compatible with FontIcons Change-Id: I8f28ec5254f2e5282a887519d3f44bc1e27aba72 Initial server-side support for font icons - does not include an actual icon set yet (#13152) Change-Id: Ie6c09b17dd577c726e0efc13567749f6f4d56d8d Changed server side FontIcon URI generation to match the correct scheme Change-Id: I3628b930b310b3f285bc58a3f471e31e641d307e Initial server-side icon font (FontAwesome) with scss - to be considered placeholder for testing (#13152) Change-Id: I361e62aba0d943a736471824e149d65c7eea9c76 Changed the FontIcon URI scheme Change-Id: I15c92f6bb3d0aa0a800f3f0bfa80419979453e17 Added FontIcon support to AbstractOrderedLayoutConnector Change-Id: I3b2b45b22d29622fd888dbe922aa0cc8a718104d Added FontIcon support to table items Change-Id: Id22ce94c96a892420aab1e39663688fc9f3bc282 Added FontIcon support to OptionGroup items Change-Id: Ie08bef688f6802182ef5f8b2bf82cf8b1f9096bb Switched to openly use FontAwesome (#13152) Change-Id: I18c3325ce93915b7fd6e338c8c293a89711277bc VaadinIcons are now FontAwesome (#13152) Change-Id: I0ab2a80735cbf08b6e33d358e3e8c6a205626fc4 VCaption does not longer set icon to 0x0px if it's a FontIcon (#13152) Change-Id: Ibcd96e0f79f0adf2e217a8580d17f1cc93705710 Fixed typo in @font-face, removed .otf (#13152) Change-Id: I698ca32c560e5f198c32a6c44f7884d3030ee610 Make font icons behave more like img (display:inline-block) (#13152) Change-Id: Ic79186c90f1fc566deae1f4d8d4ba2c21d89a42e --- WebContent/VAADIN/themes/base/base.scss | 2 + WebContent/VAADIN/themes/base/common/common.scss | 1 + .../themes/base/fonts/fontawesome-webfont.eot | Bin 0 -> 38205 bytes .../themes/base/fonts/fontawesome-webfont.svg | 414 +++++++++++++++++++++ .../themes/base/fonts/fontawesome-webfont.ttf | Bin 0 -> 80652 bytes .../themes/base/fonts/fontawesome-webfont.woff | Bin 0 -> 44432 bytes WebContent/VAADIN/themes/base/fonts/fonts.scss | 25 ++ WebContent/license.html | 6 +- WebContent/licenses/OFL.txt | 97 +++++ 9 files changed, 544 insertions(+), 1 deletion(-) create mode 100644 WebContent/VAADIN/themes/base/fonts/fontawesome-webfont.eot create mode 100644 WebContent/VAADIN/themes/base/fonts/fontawesome-webfont.svg create mode 100644 WebContent/VAADIN/themes/base/fonts/fontawesome-webfont.ttf create mode 100644 WebContent/VAADIN/themes/base/fonts/fontawesome-webfont.woff create mode 100644 WebContent/VAADIN/themes/base/fonts/fonts.scss create mode 100644 WebContent/licenses/OFL.txt (limited to 'WebContent') diff --git a/WebContent/VAADIN/themes/base/base.scss b/WebContent/VAADIN/themes/base/base.scss index aa1e778d6f..fd3c5d067d 100644 --- a/WebContent/VAADIN/themes/base/base.scss +++ b/WebContent/VAADIN/themes/base/base.scss @@ -15,6 +15,7 @@ @import "inlinedatefield/inlinedatefield.scss"; @import "dragwrapper/dragwrapper.scss"; @import "embedded/embedded.scss"; +@import "fonts/fonts.scss"; @import "formlayout/formlayout.scss"; @import "gridlayout/gridlayout.scss"; @import "label/label.scss"; @@ -119,3 +120,4 @@ $line-height: normal; // always include, don't wrap in .themename{} @include debug-globals; +@include fonts; diff --git a/WebContent/VAADIN/themes/base/common/common.scss b/WebContent/VAADIN/themes/base/common/common.scss index 5cae1b26ce..6ec85e3c6d 100644 --- a/WebContent/VAADIN/themes/base/common/common.scss +++ b/WebContent/VAADIN/themes/base/common/common.scss @@ -243,6 +243,7 @@ input::-ms-clear { width: 0; height: 0; } + } /* Outside the base mixin because elements might be added directly to the body */ diff --git a/WebContent/VAADIN/themes/base/fonts/fontawesome-webfont.eot b/WebContent/VAADIN/themes/base/fonts/fontawesome-webfont.eot new file mode 100644 index 0000000000..7c79c6a6bc Binary files /dev/null and b/WebContent/VAADIN/themes/base/fonts/fontawesome-webfont.eot differ diff --git a/WebContent/VAADIN/themes/base/fonts/fontawesome-webfont.svg b/WebContent/VAADIN/themes/base/fonts/fontawesome-webfont.svg new file mode 100644 index 0000000000..45fdf33830 --- /dev/null +++ b/WebContent/VAADIN/themes/base/fonts/fontawesome-webfont.svg @@ -0,0 +1,414 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/WebContent/VAADIN/themes/base/fonts/fontawesome-webfont.ttf b/WebContent/VAADIN/themes/base/fonts/fontawesome-webfont.ttf new file mode 100644 index 0000000000..e89738de5e Binary files /dev/null and b/WebContent/VAADIN/themes/base/fonts/fontawesome-webfont.ttf differ diff --git a/WebContent/VAADIN/themes/base/fonts/fontawesome-webfont.woff b/WebContent/VAADIN/themes/base/fonts/fontawesome-webfont.woff new file mode 100644 index 0000000000..8c1748aab7 Binary files /dev/null and b/WebContent/VAADIN/themes/base/fonts/fontawesome-webfont.woff differ diff --git a/WebContent/VAADIN/themes/base/fonts/fonts.scss b/WebContent/VAADIN/themes/base/fonts/fonts.scss new file mode 100644 index 0000000000..2a882ab53d --- /dev/null +++ b/WebContent/VAADIN/themes/base/fonts/fonts.scss @@ -0,0 +1,25 @@ +@mixin fonts { + @include fonticons; +} + +@mixin fonticons { + @include font(FontAwesome, fontawesome-webfont); +} + +@mixin font($font-family, $file-name) { + @font-face { + font-family: '#{$font-family}'; + src: url('#{$file-name}.eot'); + src: url('#{$file-name}.eot?#iefix') format('embedded-opentype'), url('#{$file-name}.woff') format('woff'), url('#{$file-name}.ttf') format('truetype'), url('#{$file-name}.svg') format('svg'); + font-weight: normal; + font-style: normal; + } + .#{$font-family} { + font-family: '#{$font-family}'; + font-style: normal; + font-weight: normal; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + display: inline-block; + } +} diff --git a/WebContent/license.html b/WebContent/license.html index 5e9bfe4dc5..0f9a573041 100644 --- a/WebContent/license.html +++ b/WebContent/license.html @@ -130,7 +130,11 @@ jQuery^ The MIT License - + + + FontAwesome + SIL OFL 1.1 + diff --git a/WebContent/licenses/OFL.txt b/WebContent/licenses/OFL.txt new file mode 100644 index 0000000000..f1a20ac1a8 --- /dev/null +++ b/WebContent/licenses/OFL.txt @@ -0,0 +1,97 @@ +Copyright (c) , (), +with Reserved Font Name . +Copyright (c) , (), +with Reserved Font Name . +Copyright (c) , (). + +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. -- cgit v1.2.3