diff --git a/LICENSE b/LICENSE index d8eea1f..be3f7b2 100755 --- a/LICENSE +++ b/LICENSE @@ -1,49 +1,661 @@ -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - - "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and - (b) You must cause any modified files to carry prominent notices stating that You changed the files; and - (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. - You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS -APPENDIX: How to apply the Apache License to your work. -To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. -Copyright [yyyy] [name of copyright owner] -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. + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU Affero General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. diff --git a/LICENSE.html b/LICENSE.html new file mode 100755 index 0000000..43a19ed --- /dev/null +++ b/LICENSE.html @@ -0,0 +1,748 @@ + + + + GNU AFFERO GENERAL PUBLIC LICENSE + + + + +

GNU AFFERO GENERAL PUBLIC LICENSE

+

Version 3, 19 November 2007

+ +

Copyright © 2007 Free Software Foundation, + Inc. <https://fsf.org/> +
+ Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed.

+ +

Preamble

+ +

The GNU Affero General Public License is a free, copyleft license + for software and other kinds of works, specifically designed to ensure + cooperation with the community in the case of network server software.

+ +

The licenses for most software and other practical works are + designed to take away your freedom to share and change the works. By + contrast, our General Public Licenses are intended to guarantee your + freedom to share and change all versions of a program--to make sure it + remains free software for all its users.

+ +

When we speak of free software, we are referring to freedom, not + price. Our General Public Licenses are designed to make sure that you + have the freedom to distribute copies of free software (and charge for + them if you wish), that you receive source code or can get it if you + want it, that you can change the software or use pieces of it in new + free programs, and that you know you can do these things.

+ +

Developers that use our General Public Licenses protect your rights + with two steps: (1) assert copyright on the software, and (2) offer + you this License which gives you legal permission to copy, distribute + and/or modify the software.

+ +

A secondary benefit of defending all users' freedom is that + improvements made in alternate versions of the program, if they + receive widespread use, become available for other developers to + incorporate. Many developers of free software are heartened and + encouraged by the resulting cooperation. However, in the case of + software used on network servers, this result may fail to come about. + The GNU General Public License permits making a modified version and + letting the public access it on a server without ever releasing its + source code to the public.

+ +

The GNU Affero General Public License is designed specifically to + ensure that, in such cases, the modified source code becomes available + to the community. It requires the operator of a network server to + provide the source code of the modified version running there to the + users of that server. Therefore, public use of a modified version, on + a publicly accessible server, gives the public access to the source + code of the modified version.

+ +

An older license, called the Affero General Public License and + published by Affero, was designed to accomplish similar goals. This is + a different license, not a version of the Affero GPL, but Affero has + released a new version of the Affero GPL which permits relicensing under + this license.

+ +

The precise terms and conditions for copying, distribution and + modification follow.

+ +

TERMS AND CONDITIONS

+ +

0. Definitions.

+ +

"This License" refers to version 3 of the GNU Affero General Public + License.

+ +

"Copyright" also means copyright-like laws that apply to other kinds + of works, such as semiconductor masks.

+ +

"The Program" refers to any copyrightable work licensed under this + License. Each licensee is addressed as "you". "Licensees" and + "recipients" may be individuals or organizations.

+ +

To "modify" a work means to copy from or adapt all or part of the work + in a fashion requiring copyright permission, other than the making of an + exact copy. The resulting work is called a "modified version" of the + earlier work or a work "based on" the earlier work.

+ +

A "covered work" means either the unmodified Program or a work based + on the Program.

+ +

To "propagate" a work means to do anything with it that, without + permission, would make you directly or secondarily liable for + infringement under applicable copyright law, except executing it on a + computer or modifying a private copy. Propagation includes copying, + distribution (with or without modification), making available to the + public, and in some countries other activities as well.

+ +

To "convey" a work means any kind of propagation that enables other + parties to make or receive copies. Mere interaction with a user through + a computer network, with no transfer of a copy, is not conveying.

+ +

An interactive user interface displays "Appropriate Legal Notices" + to the extent that it includes a convenient and prominently visible + feature that (1) displays an appropriate copyright notice, and (2) + tells the user that there is no warranty for the work (except to the + extent that warranties are provided), that licensees may convey the + work under this License, and how to view a copy of this License. If + the interface presents a list of user commands or options, such as a + menu, a prominent item in the list meets this criterion.

+ +

1. Source Code.

+ +

The "source code" for a work means the preferred form of the work + for making modifications to it. "Object code" means any non-source + form of a work.

+ +

A "Standard Interface" means an interface that either is an official + standard defined by a recognized standards body, or, in the case of + interfaces specified for a particular programming language, one that + is widely used among developers working in that language.

+ +

The "System Libraries" of an executable work include anything, other + than the work as a whole, that (a) is included in the normal form of + packaging a Major Component, but which is not part of that Major + Component, and (b) serves only to enable use of the work with that + Major Component, or to implement a Standard Interface for which an + implementation is available to the public in source code form. A + "Major Component", in this context, means a major essential component + (kernel, window system, and so on) of the specific operating system + (if any) on which the executable work runs, or a compiler used to + produce the work, or an object code interpreter used to run it.

+ +

The "Corresponding Source" for a work in object code form means all + the source code needed to generate, install, and (for an executable + work) run the object code and to modify the work, including scripts to + control those activities. However, it does not include the work's + System Libraries, or general-purpose tools or generally available free + programs which are used unmodified in performing those activities but + which are not part of the work. For example, Corresponding Source + includes interface definition files associated with source files for + the work, and the source code for shared libraries and dynamically + linked subprograms that the work is specifically designed to require, + such as by intimate data communication or control flow between those + subprograms and other parts of the work.

+ +

The Corresponding Source need not include anything that users + can regenerate automatically from other parts of the Corresponding + Source.

+ +

The Corresponding Source for a work in source code form is that + same work.

+ +

2. Basic Permissions.

+ +

All rights granted under this License are granted for the term of + copyright on the Program, and are irrevocable provided the stated + conditions are met. This License explicitly affirms your unlimited + permission to run the unmodified Program. The output from running a + covered work is covered by this License only if the output, given its + content, constitutes a covered work. This License acknowledges your + rights of fair use or other equivalent, as provided by copyright law.

+ +

You may make, run and propagate covered works that you do not + convey, without conditions so long as your license otherwise remains + in force. You may convey covered works to others for the sole purpose + of having them make modifications exclusively for you, or provide you + with facilities for running those works, provided that you comply with + the terms of this License in conveying all material for which you do + not control copyright. Those thus making or running the covered works + for you must do so exclusively on your behalf, under your direction + and control, on terms that prohibit them from making any copies of + your copyrighted material outside their relationship with you.

+ +

Conveying under any other circumstances is permitted solely under + the conditions stated below. Sublicensing is not allowed; section 10 + makes it unnecessary.

+ +

3. Protecting Users' Legal Rights From Anti-Circumvention Law.

+ +

No covered work shall be deemed part of an effective technological + measure under any applicable law fulfilling obligations under article + 11 of the WIPO copyright treaty adopted on 20 December 1996, or + similar laws prohibiting or restricting circumvention of such + measures.

+ +

When you convey a covered work, you waive any legal power to forbid + circumvention of technological measures to the extent such circumvention + is effected by exercising rights under this License with respect to + the covered work, and you disclaim any intention to limit operation or + modification of the work as a means of enforcing, against the work's + users, your or third parties' legal rights to forbid circumvention of + technological measures.

+ +

4. Conveying Verbatim Copies.

+ +

You may convey verbatim copies of the Program's source code as you + receive it, in any medium, provided that you conspicuously and + appropriately publish on each copy an appropriate copyright notice; + keep intact all notices stating that this License and any + non-permissive terms added in accord with section 7 apply to the code; + keep intact all notices of the absence of any warranty; and give all + recipients a copy of this License along with the Program.

+ +

You may charge any price or no price for each copy that you convey, + and you may offer support or warranty protection for a fee.

+ +

5. Conveying Modified Source Versions.

+ +

You may convey a work based on the Program, or the modifications to + produce it from the Program, in the form of source code under the + terms of section 4, provided that you also meet all of these conditions:

+ +
    + +
  • a) The work must carry prominent notices stating that you modified + it, and giving a relevant date.
  • + +
  • b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices".
  • + +
  • c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it.
  • + +
  • d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so.
  • + +
+ +

A compilation of a covered work with other separate and independent + works, which are not by their nature extensions of the covered work, + and which are not combined with it such as to form a larger program, + in or on a volume of a storage or distribution medium, is called an + "aggregate" if the compilation and its resulting copyright are not + used to limit the access or legal rights of the compilation's users + beyond what the individual works permit. Inclusion of a covered work + in an aggregate does not cause this License to apply to the other + parts of the aggregate.

+ +

6. Conveying Non-Source Forms.

+ +

You may convey a covered work in object code form under the terms + of sections 4 and 5, provided that you also convey the + machine-readable Corresponding Source under the terms of this License, + in one of these ways:

+ +
    + +
  • a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange.
  • + +
  • b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge.
  • + +
  • c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b.
  • + +
  • d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements.
  • + +
  • e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d.
  • + +
+ +

A separable portion of the object code, whose source code is excluded + from the Corresponding Source as a System Library, need not be + included in conveying the object code work.

+ +

A "User Product" is either (1) a "consumer product", which means any + tangible personal property which is normally used for personal, family, + or household purposes, or (2) anything designed or sold for incorporation + into a dwelling. In determining whether a product is a consumer product, + doubtful cases shall be resolved in favor of coverage. For a particular + product received by a particular user, "normally used" refers to a + typical or common use of that class of product, regardless of the status + of the particular user or of the way in which the particular user + actually uses, or expects or is expected to use, the product. A product + is a consumer product regardless of whether the product has substantial + commercial, industrial or non-consumer uses, unless such uses represent + the only significant mode of use of the product.

+ +

"Installation Information" for a User Product means any methods, + procedures, authorization keys, or other information required to install + and execute modified versions of a covered work in that User Product from + a modified version of its Corresponding Source. The information must + suffice to ensure that the continued functioning of the modified object + code is in no case prevented or interfered with solely because + modification has been made.

+ +

If you convey an object code work under this section in, or with, or + specifically for use in, a User Product, and the conveying occurs as + part of a transaction in which the right of possession and use of the + User Product is transferred to the recipient in perpetuity or for a + fixed term (regardless of how the transaction is characterized), the + Corresponding Source conveyed under this section must be accompanied + by the Installation Information. But this requirement does not apply + if neither you nor any third party retains the ability to install + modified object code on the User Product (for example, the work has + been installed in ROM).

+ +

The requirement to provide Installation Information does not include a + requirement to continue to provide support service, warranty, or updates + for a work that has been modified or installed by the recipient, or for + the User Product in which it has been modified or installed. Access to a + network may be denied when the modification itself materially and + adversely affects the operation of the network or violates the rules and + protocols for communication across the network.

+ +

Corresponding Source conveyed, and Installation Information provided, + in accord with this section must be in a format that is publicly + documented (and with an implementation available to the public in + source code form), and must require no special password or key for + unpacking, reading or copying.

+ +

7. Additional Terms.

+ +

"Additional permissions" are terms that supplement the terms of this + License by making exceptions from one or more of its conditions. + Additional permissions that are applicable to the entire Program shall + be treated as though they were included in this License, to the extent + that they are valid under applicable law. If additional permissions + apply only to part of the Program, that part may be used separately + under those permissions, but the entire Program remains governed by + this License without regard to the additional permissions.

+ +

When you convey a copy of a covered work, you may at your option + remove any additional permissions from that copy, or from any part of + it. (Additional permissions may be written to require their own + removal in certain cases when you modify the work.) You may place + additional permissions on material, added by you to a covered work, + for which you have or can give appropriate copyright permission.

+ +

Notwithstanding any other provision of this License, for material you + add to a covered work, you may (if authorized by the copyright holders of + that material) supplement the terms of this License with terms:

+ +
    + +
  • a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or
  • + +
  • b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or
  • + +
  • c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or
  • + +
  • d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or
  • + +
  • e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or
  • + +
  • f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors.
  • + +
+ +

All other non-permissive additional terms are considered "further + restrictions" within the meaning of section 10. If the Program as you + received it, or any part of it, contains a notice stating that it is + governed by this License along with a term that is a further restriction, + you may remove that term. If a license document contains a further + restriction but permits relicensing or conveying under this License, you + may add to a covered work material governed by the terms of that license + document, provided that the further restriction does not survive such + relicensing or conveying.

+ +

If you add terms to a covered work in accord with this section, you + must place, in the relevant source files, a statement of the + additional terms that apply to those files, or a notice indicating + where to find the applicable terms.

+ +

Additional terms, permissive or non-permissive, may be stated in the + form of a separately written license, or stated as exceptions; + the above requirements apply either way.

+ +

8. Termination.

+ +

You may not propagate or modify a covered work except as expressly + provided under this License. Any attempt otherwise to propagate or + modify it is void, and will automatically terminate your rights under + this License (including any patent licenses granted under the third + paragraph of section 11).

+ +

However, if you cease all violation of this License, then your + license from a particular copyright holder is reinstated (a) + provisionally, unless and until the copyright holder explicitly and + finally terminates your license, and (b) permanently, if the copyright + holder fails to notify you of the violation by some reasonable means + prior to 60 days after the cessation.

+ +

Moreover, your license from a particular copyright holder is + reinstated permanently if the copyright holder notifies you of the + violation by some reasonable means, this is the first time you have + received notice of violation of this License (for any work) from that + copyright holder, and you cure the violation prior to 30 days after + your receipt of the notice.

+ +

Termination of your rights under this section does not terminate the + licenses of parties who have received copies or rights from you under + this License. If your rights have been terminated and not permanently + reinstated, you do not qualify to receive new licenses for the same + material under section 10.

+ +

9. Acceptance Not Required for Having Copies.

+ +

You are not required to accept this License in order to receive or + run a copy of the Program. Ancillary propagation of a covered work + occurring solely as a consequence of using peer-to-peer transmission + to receive a copy likewise does not require acceptance. However, + nothing other than this License grants you permission to propagate or + modify any covered work. These actions infringe copyright if you do + not accept this License. Therefore, by modifying or propagating a + covered work, you indicate your acceptance of this License to do so.

+ +

10. Automatic Licensing of Downstream Recipients.

+ +

Each time you convey a covered work, the recipient automatically + receives a license from the original licensors, to run, modify and + propagate that work, subject to this License. You are not responsible + for enforcing compliance by third parties with this License.

+ +

An "entity transaction" is a transaction transferring control of an + organization, or substantially all assets of one, or subdividing an + organization, or merging organizations. If propagation of a covered + work results from an entity transaction, each party to that + transaction who receives a copy of the work also receives whatever + licenses to the work the party's predecessor in interest had or could + give under the previous paragraph, plus a right to possession of the + Corresponding Source of the work from the predecessor in interest, if + the predecessor has it or can get it with reasonable efforts.

+ +

You may not impose any further restrictions on the exercise of the + rights granted or affirmed under this License. For example, you may + not impose a license fee, royalty, or other charge for exercise of + rights granted under this License, and you may not initiate litigation + (including a cross-claim or counterclaim in a lawsuit) alleging that + any patent claim is infringed by making, using, selling, offering for + sale, or importing the Program or any portion of it.

+ +

11. Patents.

+ +

A "contributor" is a copyright holder who authorizes use under this + License of the Program or a work on which the Program is based. The + work thus licensed is called the contributor's "contributor version".

+ +

A contributor's "essential patent claims" are all patent claims + owned or controlled by the contributor, whether already acquired or + hereafter acquired, that would be infringed by some manner, permitted + by this License, of making, using, or selling its contributor version, + but do not include claims that would be infringed only as a + consequence of further modification of the contributor version. For + purposes of this definition, "control" includes the right to grant + patent sublicenses in a manner consistent with the requirements of + this License.

+ +

Each contributor grants you a non-exclusive, worldwide, royalty-free + patent license under the contributor's essential patent claims, to + make, use, sell, offer for sale, import and otherwise run, modify and + propagate the contents of its contributor version.

+ +

In the following three paragraphs, a "patent license" is any express + agreement or commitment, however denominated, not to enforce a patent + (such as an express permission to practice a patent or covenant not to + sue for patent infringement). To "grant" such a patent license to a + party means to make such an agreement or commitment not to enforce a + patent against the party.

+ +

If you convey a covered work, knowingly relying on a patent license, + and the Corresponding Source of the work is not available for anyone + to copy, free of charge and under the terms of this License, through a + publicly available network server or other readily accessible means, + then you must either (1) cause the Corresponding Source to be so + available, or (2) arrange to deprive yourself of the benefit of the + patent license for this particular work, or (3) arrange, in a manner + consistent with the requirements of this License, to extend the patent + license to downstream recipients. "Knowingly relying" means you have + actual knowledge that, but for the patent license, your conveying the + covered work in a country, or your recipient's use of the covered work + in a country, would infringe one or more identifiable patents in that + country that you have reason to believe are valid.

+ +

If, pursuant to or in connection with a single transaction or + arrangement, you convey, or propagate by procuring conveyance of, a + covered work, and grant a patent license to some of the parties + receiving the covered work authorizing them to use, propagate, modify + or convey a specific copy of the covered work, then the patent license + you grant is automatically extended to all recipients of the covered + work and works based on it.

+ +

A patent license is "discriminatory" if it does not include within + the scope of its coverage, prohibits the exercise of, or is + conditioned on the non-exercise of one or more of the rights that are + specifically granted under this License. You may not convey a covered + work if you are a party to an arrangement with a third party that is + in the business of distributing software, under which you make payment + to the third party based on the extent of your activity of conveying + the work, and under which the third party grants, to any of the + parties who would receive the covered work from you, a discriminatory + patent license (a) in connection with copies of the covered work + conveyed by you (or copies made from those copies), or (b) primarily + for and in connection with specific products or compilations that + contain the covered work, unless you entered into that arrangement, + or that patent license was granted, prior to 28 March 2007.

+ +

Nothing in this License shall be construed as excluding or limiting + any implied license or other defenses to infringement that may + otherwise be available to you under applicable patent law.

+ +

12. No Surrender of Others' Freedom.

+ +

If conditions are imposed on you (whether by court order, agreement or + otherwise) that contradict the conditions of this License, they do not + excuse you from the conditions of this License. If you cannot convey a + covered work so as to satisfy simultaneously your obligations under this + License and any other pertinent obligations, then as a consequence you may + not convey it at all. For example, if you agree to terms that obligate you + to collect a royalty for further conveying from those to whom you convey + the Program, the only way you could satisfy both those terms and this + License would be to refrain entirely from conveying the Program.

+ +

13. Remote Network Interaction; Use with the GNU General Public License.

+ +

Notwithstanding any other provision of this License, if you modify the + Program, your modified version must prominently offer all users + interacting with it remotely through a computer network (if your version + supports such interaction) an opportunity to receive the Corresponding + Source of your version by providing access to the Corresponding Source + from a network server at no charge, through some standard or customary + means of facilitating copying of software. This Corresponding Source + shall include the Corresponding Source for any work covered by version 3 + of the GNU General Public License that is incorporated pursuant to the + following paragraph.

+ +

Notwithstanding any other provision of this License, you have permission + to link or combine any covered work with a work licensed under version 3 + of the GNU General Public License into a single combined work, and to + convey the resulting work. The terms of this License will continue to + apply to the part which is the covered work, but the work with which it is + combined will remain governed by version 3 of the GNU General Public + License.

+ +

14. Revised Versions of this License.

+ +

The Free Software Foundation may publish revised and/or new versions of + the GNU Affero General Public License from time to time. Such new + versions will be similar in spirit to the present version, but may differ + in detail to address new problems or concerns.

+ +

Each version is given a distinguishing version number. If the + Program specifies that a certain numbered version of the GNU Affero + General Public License "or any later version" applies to it, you have + the option of following the terms and conditions either of that + numbered version or of any later version published by the Free + Software Foundation. If the Program does not specify a version number + of the GNU Affero General Public License, you may choose any version + ever published by the Free Software Foundation.

+ +

If the Program specifies that a proxy can decide which future + versions of the GNU Affero General Public License can be used, that + proxy's public statement of acceptance of a version permanently + authorizes you to choose that version for the Program.

+ +

Later license versions may give you additional or different + permissions. However, no additional obligations are imposed on any + author or copyright holder as a result of your choosing to follow a + later version.

+ +

15. Disclaimer of Warranty.

+ +

THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY + APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT + HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY + OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, + THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM + IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF + ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

+ +

16. Limitation of Liability.

+ +

IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING + WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS + THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY + GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE + USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF + DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD + PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), + EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF + SUCH DAMAGES.

+ +

17. Interpretation of Sections 15 and 16.

+ +

If the disclaimer of warranty and limitation of liability provided + above cannot be given local legal effect according to their terms, + reviewing courts shall apply local law that most closely approximates + an absolute waiver of all civil liability in connection with the + Program, unless a warranty or assumption of liability accompanies a + copy of the Program in return for a fee.

+ +

END OF TERMS AND CONDITIONS

+ +

How to Apply These Terms to Your New Programs

+ +

If you develop a new program, and you want it to be of the greatest + possible use to the public, the best way to achieve this is to make it + free software which everyone can redistribute and change under these terms.

+ +

To do so, attach the following notices to the program. It is safest + to attach them to the start of each source file to most effectively + state the exclusion of warranty; and each file should have at least + the "copyright" line and a pointer to where the full notice is found.

+ +
    <one line to give the program's name and a brief idea of what it does.>
+        Copyright (C) <year>  <name of author>
+
+        This program is free software: you can redistribute it and/or modify
+        it under the terms of the GNU Affero General Public License as
+        published by the Free Software Foundation, either version 3 of the
+        License, or (at your option) any later version.
+
+        This program is distributed in the hope that it will be useful,
+        but WITHOUT ANY WARRANTY; without even the implied warranty of
+        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+        GNU Affero General Public License for more details.
+
+        You should have received a copy of the GNU Affero General Public License
+        along with this program.  If not, see <https://www.gnu.org/licenses/>.
+    
+ +

Also add information on how to contact you by electronic and paper mail.

+ +

If your software can interact with users remotely through a computer + network, you should also make sure that it provides a way for users to + get its source. For example, if your program is a web application, its + interface could display a "Source" link that leads users to an archive + of the code. There are many ways you could offer source, and different + solutions will be better for different programs; see section 13 for the + specific requirements.

+ +

You should also get your employer (if you work as a programmer) or school, + if any, to sign a "copyright disclaimer" for the program, if necessary. + For more information on this, and how to apply and follow the GNU AGPL, see + <https://www.gnu.org/licenses/>.

+ + diff --git a/LICENSE.md b/LICENSE.md new file mode 100755 index 0000000..cba6f6a --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,660 @@ +### GNU AFFERO GENERAL PUBLIC LICENSE + +Version 3, 19 November 2007 + +Copyright (C) 2007 Free Software Foundation, Inc. + + +Everyone is permitted to copy and distribute verbatim copies of this +license document, but changing it is not allowed. + +### Preamble + +The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + +The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains +free software for all its users. + +When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + +Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + +A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + +The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + +An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing +under this license. + +The precise terms and conditions for copying, distribution and +modification follow. + +### TERMS AND CONDITIONS + +#### 0. Definitions. + +"This License" refers to version 3 of the GNU Affero General Public +License. + +"Copyright" also means copyright-like laws that apply to other kinds +of works, such as semiconductor masks. + +"The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + +To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of +an exact copy. The resulting work is called a "modified version" of +the earlier work or a work "based on" the earlier work. + +A "covered work" means either the unmodified Program or a work based +on the Program. + +To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + +To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user +through a computer network, with no transfer of a copy, is not +conveying. + +An interactive user interface displays "Appropriate Legal Notices" to +the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + +#### 1. Source Code. + +The "source code" for a work means the preferred form of the work for +making modifications to it. "Object code" means any non-source form of +a work. + +A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + +The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + +The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + +The Corresponding Source need not include anything that users can +regenerate automatically from other parts of the Corresponding Source. + +The Corresponding Source for a work in source code form is that same +work. + +#### 2. Basic Permissions. + +All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + +You may make, run and propagate covered works that you do not convey, +without conditions so long as your license otherwise remains in force. +You may convey covered works to others for the sole purpose of having +them make modifications exclusively for you, or provide you with +facilities for running those works, provided that you comply with the +terms of this License in conveying all material for which you do not +control copyright. Those thus making or running the covered works for +you must do so exclusively on your behalf, under your direction and +control, on terms that prohibit them from making any copies of your +copyrighted material outside their relationship with you. + +Conveying under any other circumstances is permitted solely under the +conditions stated below. Sublicensing is not allowed; section 10 makes +it unnecessary. + +#### 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + +No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + +When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such +circumvention is effected by exercising rights under this License with +respect to the covered work, and you disclaim any intention to limit +operation or modification of the work as a means of enforcing, against +the work's users, your or third parties' legal rights to forbid +circumvention of technological measures. + +#### 4. Conveying Verbatim Copies. + +You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + +You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + +#### 5. Conveying Modified Source Versions. + +You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these +conditions: + +- a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. +- b) The work must carry prominent notices stating that it is + released under this License and any conditions added under + section 7. This requirement modifies the requirement in section 4 + to "keep intact all notices". +- c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. +- d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + +A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + +#### 6. Conveying Non-Source Forms. + +You may convey a covered work in object code form under the terms of +sections 4 and 5, provided that you also convey the machine-readable +Corresponding Source under the terms of this License, in one of these +ways: + +- a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. +- b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the Corresponding + Source from a network server at no charge. +- c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. +- d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. +- e) Convey the object code using peer-to-peer transmission, + provided you inform other peers where the object code and + Corresponding Source of the work are being offered to the general + public at no charge under subsection 6d. + +A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + +A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, +family, or household purposes, or (2) anything designed or sold for +incorporation into a dwelling. In determining whether a product is a +consumer product, doubtful cases shall be resolved in favor of +coverage. For a particular product received by a particular user, +"normally used" refers to a typical or common use of that class of +product, regardless of the status of the particular user or of the way +in which the particular user actually uses, or expects or is expected +to use, the product. A product is a consumer product regardless of +whether the product has substantial commercial, industrial or +non-consumer uses, unless such uses represent the only significant +mode of use of the product. + +"Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to +install and execute modified versions of a covered work in that User +Product from a modified version of its Corresponding Source. The +information must suffice to ensure that the continued functioning of +the modified object code is in no case prevented or interfered with +solely because modification has been made. + +If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + +The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or +updates for a work that has been modified or installed by the +recipient, or for the User Product in which it has been modified or +installed. Access to a network may be denied when the modification +itself materially and adversely affects the operation of the network +or violates the rules and protocols for communication across the +network. + +Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + +#### 7. Additional Terms. + +"Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + +When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + +Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders +of that material) supplement the terms of this License with terms: + +- a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or +- b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or +- c) Prohibiting misrepresentation of the origin of that material, + or requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or +- d) Limiting the use for publicity purposes of names of licensors + or authors of the material; or +- e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or +- f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions + of it) with contractual assumptions of liability to the recipient, + for any liability that these contractual assumptions directly + impose on those licensors and authors. + +All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + +If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + +Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; the +above requirements apply either way. + +#### 8. Termination. + +You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + +However, if you cease all violation of this License, then your license +from a particular copyright holder is reinstated (a) provisionally, +unless and until the copyright holder explicitly and finally +terminates your license, and (b) permanently, if the copyright holder +fails to notify you of the violation by some reasonable means prior to +60 days after the cessation. + +Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + +Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + +#### 9. Acceptance Not Required for Having Copies. + +You are not required to accept this License in order to receive or run +a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + +#### 10. Automatic Licensing of Downstream Recipients. + +Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + +An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + +You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + +#### 11. Patents. + +A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + +A contributor's "essential patent claims" are all patent claims owned +or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + +Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + +In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + +If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + +If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + +A patent license is "discriminatory" if it does not include within the +scope of its coverage, prohibits the exercise of, or is conditioned on +the non-exercise of one or more of the rights that are specifically +granted under this License. You may not convey a covered work if you +are a party to an arrangement with a third party that is in the +business of distributing software, under which you make payment to the +third party based on the extent of your activity of conveying the +work, and under which the third party grants, to any of the parties +who would receive the covered work from you, a discriminatory patent +license (a) in connection with copies of the covered work conveyed by +you (or copies made from those copies), or (b) primarily for and in +connection with specific products or compilations that contain the +covered work, unless you entered into that arrangement, or that patent +license was granted, prior to 28 March 2007. + +Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + +#### 12. No Surrender of Others' Freedom. + +If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under +this License and any other pertinent obligations, then as a +consequence you may not convey it at all. For example, if you agree to +terms that obligate you to collect a royalty for further conveying +from those to whom you convey the Program, the only way you could +satisfy both those terms and this License would be to refrain entirely +from conveying the Program. + +#### 13. Remote Network Interaction; Use with the GNU General Public License. + +Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your +version supports such interaction) an opportunity to receive the +Corresponding Source of your version by providing access to the +Corresponding Source from a network server at no charge, through some +standard or customary means of facilitating copying of software. This +Corresponding Source shall include the Corresponding Source for any +work covered by version 3 of the GNU General Public License that is +incorporated pursuant to the following paragraph. + +Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + +#### 14. Revised Versions of this License. + +The Free Software Foundation may publish revised and/or new versions +of the GNU Affero General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever +published by the Free Software Foundation. + +If the Program specifies that a proxy can decide which future versions +of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + +Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + +#### 15. Disclaimer of Warranty. + +THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT +WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE +DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR +CORRECTION. + +#### 16. Limitation of Liability. + +IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR +CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES +ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT +NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR +LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM +TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER +PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +#### 17. Interpretation of Sections 15 and 16. + +If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + +END OF TERMS AND CONDITIONS + +### How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these +terms. + +To do so, attach the following notices to the program. It is safest to +attach them to the start of each source file to most effectively state +the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper +mail. + +If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for +the specific requirements. + +You should also get your employer (if you work as a programmer) or +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. For more information on this, and how to apply and follow +the GNU AGPL, see . diff --git a/README.md b/README.md index fd47ac4..7e9a641 100755 --- a/README.md +++ b/README.md @@ -1,4 +1,50 @@ -# Présentation -Un générateur de codes QR pour le Web créé par Miraty basé sur la bibliothèque [phpqrcode](https://github.com/t0k4rt/phpqrcode). -# Démo +# ![Logo](favicons/defaut-32.png) Générateur de codes QR + +## Présentation + +Une interface Web pour générer des codes QR en PHP. + +## Démo + Une instance de ce service est disponible à l'adresse [https://qr.antopie.org](https://qr.antopie.org). + +## Installation + +Je développe directement dans master, donc en production téléchargez plutôt une version stable dans [l'onglet Versions](https://code.antopie.org/miraty/qr/releases) ou avec le tag. + +Placez ce code source dans un serveur Web avec PHP, tout simplement. + +## Thèmes + +### Changer de thème + +Dans options.inc.php, donnez à $theme le nom du thème voulu. + +Par défaut, deux thèmes sont proposés : + +* defaut, le thème par défaut, sombre. Il est utilisé ici : +* parinux, un thème bleu, créé pour [Bastet](https://bastet.parinux.org/), le chaton de [Parinux](https://parinux.org/). Il est utilisé ici : + +### Créer un thème + +* Copiez themes/defaut vers themes/[nom de votre thème] +* Depuis ce nouveau dossier, créez les icônes dans favicons/[longueur du côté de l'icone].png +* Complétez theme.php en fonctions des favicons créees précédemment et des couleurs CSS voulues dans l'interface + +## Bibliothèques tierces + +Ce code source inclus : + +* [phpqrcode](https://github.com/t0k4rt/phpqrcode) pour générer les codes QR +* [La police Ubuntu packagée pour le Web](https://github.com/earaujoassis/ubuntu-fontface) +* [lessphp](http://leafo.net/lessphp) pour compiler le [Less](http://lesscss.org/) + +## Licence + +[AGPLv3+](https://code.antopie.org/miraty/qr/src/branch/master/LICENSE) + +Ce générateur de codes QR est un logiciel libre ; vous pouvez le diffuser et le modifier suivant les termes de la GNU Affero General Public License telle que publiée par la Free Software Foundation ; soit la version 3 de cette licence, soit (à votre convenance) une version ultérieure. + +Ce générateur de codes QR est diffusé dans l’espoir qu’il sera utile, mais SANS AUCUNE GARANTIE ; sans même une garantie implicite de COMMERCIALISATION ou d’ADÉQUATION À UN USAGE PARTICULIER. Voyez la GNU Affero General Public License pour plus de détails. + +Vous devriez avoir reçu une copie de la GNU Affero General Public License avec ce code. Sinon, consultez diff --git a/README.md.backup b/README.md.backup new file mode 100755 index 0000000..3329095 --- /dev/null +++ b/README.md.backup @@ -0,0 +1,49 @@ +# ![Logo](favicons/defaut-32.png) Générateur de codes QR + +## Présentation + +Une interface Web pour générer des codes QR en PHP. + +## Démo + +Une instance de ce service est disponible à l'adresse [https://qr.antopie.org](https://qr.antopie.org). + +## Installation + +Je développe directement dans master, donc en production téléchargez plutôt une version stable dans [l'onglet Versions](https://code.antopie.org/miraty/qr/releases) ou avec le tag. + +Placez ce code source dans un serveur Web avec PHP, tout simplement. + +## Thèmes + +### Changer de thème + +Dans options.inc.php, donnez à $theme le nom du thème voulu. + +Par défaut, deux thèmes sont proposés : +* defaut, le thème par défaut, sombre. Il est utilisé ici : +* parinux, un thème bleu, créé pour [Bastet](https://bastet.parinux.org/), le chaton de [Parinux](https://parinux.org/). Il est utilisé ici : + +### Créer un thème + +* Copiez themes/defaut vers themes/[nom de votre thème] +* Depuis ce nouveau dossier, créez les icônes dans favicons/[longueur du côté de l'icone].png +* Complétez theme.php en fonctions des favicons créees précédemment et des couleurs CSS voulues dans l'interface + +## Bibliothèques tierces + +Ce code source inclus : + +* [phpqrcode](https://github.com/t0k4rt/phpqrcode) pour générer les codes QR +* [La police Ubuntu packagée pour le Web](https://github.com/earaujoassis/ubuntu-fontface) +* [lessphp](http://leafo.net/lessphp) pour compiler le [Less](http://lesscss.org/) + +## Licence + +[AGPLv3+](https://code.antopie.org/miraty/qr/src/branch/master/LICENSE) + +Ce générateur de codes QR est un logiciel libre ; vous pouvez le diffuser et le modifier suivant les termes de la GNU Affero General Public License telle que publiée par la Free Software Foundation ; soit la version 3 de cette licence, soit (à votre convenance) une version ultérieure. + +Ce générateur de codes QR est diffusé dans l’espoir qu’il sera utile, mais SANS AUCUNE GARANTIE ; sans même une garantie implicite de COMMERCIALISATION ou d’ADÉQUATION À UN USAGE PARTICULIER. Voyez la GNU Affero General Public License pour plus de détails. + +Vous devriez avoir reçu une copie de la GNU Affero General Public License avec ce code. Sinon, consultez diff --git a/aide.svg b/aide.svg index 5bba93f..b6cba09 100755 --- a/aide.svg +++ b/aide.svg @@ -1,89 +1,10 @@ - - - - - - image/svg+xml - - - - - - - - - - - + + + + + " stroke-width="2" cx="12" cy="12" r="10"> + "> - - - diff --git a/index.php b/index.php index af7ff6e..ced6c9f 100755 --- a/index.php +++ b/index.php @@ -1,54 +1,80 @@ - - + - + Générateur de codes QR - - - - - - - - - - - - + + - + + + ' . "\n"; + } ?> + +
+

Générateur de codes QR

+
+ -
-

Générateur de codes QR

-
- + - Aide + Vous pouvez encoder ce que vous voulez sous forme de texte.
@@ -61,11 +87,41 @@ ?>
+ +
+ +
+ + + + Par combien les dimensions de l'image seront-elles multipliées ? + +
+
+ "> +
+
+ +
+ + + + Nombre de pixels des bandes blanches autour du code QR. + +
+
+ "> +
+
+ +
+ +


- +
+ Qu'est-ce qu'un code QR ?
+ Un code QR est une image en 2 dimensions dans laquelle est inscrite en binaire des informations textuelles.
+ Un pixel blanc représente un 0 et un pixel noir représente un 1.
+ Code QR sur Wikipédia +
+ + + diff --git a/locale/fr_FR/LC_MESSAGES/messages.mo b/locale/fr_FR/LC_MESSAGES/messages.mo new file mode 100644 index 0000000..6567dba Binary files /dev/null and b/locale/fr_FR/LC_MESSAGES/messages.mo differ diff --git a/locale/fr_FR/LC_MESSAGES/messages.po b/locale/fr_FR/LC_MESSAGES/messages.po new file mode 100644 index 0000000..98df283 --- /dev/null +++ b/locale/fr_FR/LC_MESSAGES/messages.po @@ -0,0 +1,26 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2019-08-11 18:34+0200\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: index.php:56 +msgid "thisisatest" +msgstr "cuntest" + +#: index.php:64 +msgid "ieatbanana" +msgstr "jemangeunebanane" diff --git a/manifest.php b/manifest.php index 77479ba..7e78eed 100755 --- a/manifest.php +++ b/manifest.php @@ -6,61 +6,28 @@ "short_name": "Code QR", "description": "Générez un code QR rapidement", "start_url": "", - "scope": "" + "scope": "", "display": "standalone", - "theme_color": "", - "background_color": "", + "theme_color": "", + "background_color": "", "orientation": "portrait", "icons": [ + + { + "src": "themes//favicons/.png", + "sizes": "x", + "type": "image/png" + }, + + { - "src": "favicons/-16.png", - "sizes": "16x16", - "type": "image/png" - }, - { - "src": "favicons/-32.png", - "sizes": "32x32", - "type": "image/png" - }, - { - "src": "favicons/-48.png", - "sizes": "48x48", - "type": "image/png" - }, - { - "src": "favicons/-64.png", - "sizes": "64x64", - "type": "image/png" - }, - { - "src": "favicons/-96.png", - "sizes": "96x96", - "type": "image/png" - }, - { - "src": "favicons/-128.png", - "sizes": "128x128", - "type": "image/png" - }, - { - "src": "favicons/-192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "favicons/-256.png", - "sizes": "256x256", - "type": "image/png" - }, - { - "src": "favicons/-384.png", - "sizes": "384x384", - "type": "image/png" - }, - { - "src": "favicons/-512.png", - "sizes": "512x512", + "src": "themes//favicons/.png", + "sizes": "x", "type": "image/png" } ] diff --git a/opensearch.php b/opensearch.php index d8356ec..9d9833b 100755 --- a/opensearch.php +++ b/opensearch.php @@ -3,16 +3,11 @@ Générer un code QR Générez des codes QR depuis votre barre de recherche ou d'adresse - favicons/-16.png - favicons/-32.png - favicons/-48.png - favicons/-64.png - favicons/-96.png - favicons/-128.png - favicons/-192.png - favicons/-256.png - favicons/-384.png - favicons/-512.png +' . $cheminInstall . 'themes/' . $theme . '/favicons/' . $dimFav . '.png' . "\n"; + } + ?> fr UTF-8 diff --git a/options.inc.php b/options.inc.php index 5dff8a0..44386bf 100755 --- a/options.inc.php +++ b/options.inc.php @@ -1,18 +1,30 @@ getFilename() != "." AND $listeCodesQR->getFilename() != "..") { + if ($listeCodesQR->getFilename() != "." AND $listeCodesQR->getFilename() != ".." AND $listeCodesQR->getFilename() != "UoD3X0SUSLDF4K8V67igQozAaw7fOTStC8IO5gcMLd3OyW1r0b.png") { if ((time() - filemtime("temp/" . $listeCodesQR->getFilename())) > $tempsDeSuppression) { // Si le temps actuel (en heure Posix) moins la date de dernière modification de l'image est supérieur à la durée de vie demandée de l'image unlink("temp/" . $listeCodesQR->getFilename()); // Alors supprimer cette image } diff --git a/phpqrcode.php b/phpqrcode.php new file mode 100755 index 0000000..c3afc9d --- /dev/null +++ b/phpqrcode.php @@ -0,0 +1,3625 @@ + + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + + +/* + * Version: 1.1.4 + * Build: 2010100721 + */ + + + +//---- qrconst.php ----------------------------- + + + + + +/* + * PHP QR Code encoder + * + * Common constants + * + * Based on libqrencode C library distributed under LGPL 2.1 + * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + // Encoding modes + + define('QR_MODE_NUL', -1); + define('QR_MODE_NUM', 0); + define('QR_MODE_AN', 1); + define('QR_MODE_8', 2); + define('QR_MODE_KANJI', 3); + define('QR_MODE_STRUCTURE', 4); + + // Levels of error correction. + + define('QR_ECLEVEL_L', 0); + define('QR_ECLEVEL_M', 1); + define('QR_ECLEVEL_Q', 2); + define('QR_ECLEVEL_H', 3); + + // Supported output formats + + define('QR_FORMAT_TEXT', 0); + define('QR_FORMAT_PNG', 1); + + class qrstr { + public static function set(&$srctab, $x, $y, $repl, $replLen = false) { + $srctab[$y] = substr_replace($srctab[$y], ($replLen !== false)?substr($repl,0,$replLen):$repl, $x, ($replLen !== false)?$replLen:strlen($repl)); + } + } + + + +//---- merged_config.php ----------------------------- + + + + +/* + * PHP QR Code encoder + * + * Config file, tuned-up for merged verion + */ + + define('QR_CACHEABLE', false); // use cache - more disk reads but less CPU power, masks and format templates are stored there + define('QR_CACHE_DIR', false); // used when QR_CACHEABLE === true + define('QR_LOG_DIR', false); // default error logs dir + + define('QR_FIND_BEST_MASK', true); // if true, estimates best mask (spec. default, but extremally slow; set to false to significant performance boost but (propably) worst quality code + define('QR_FIND_FROM_RANDOM', 2); // if false, checks all masks available, otherwise value tells count of masks need to be checked, mask id are got randomly + define('QR_DEFAULT_MASK', 2); // when QR_FIND_BEST_MASK === false + + define('QR_PNG_MAXIMUM_SIZE', 1024); // maximum allowed png image width (in pixels), tune to make sure GD and PHP can handle such big images + + + + +//---- qrtools.php ----------------------------- + + + + +/* + * PHP QR Code encoder + * + * Toolset, handy and debug utilites. + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + class QRtools { + + //---------------------------------------------------------------------- + public static function binarize($frame) + { + $len = count($frame); + foreach ($frame as &$frameLine) { + + for($i=0; $i<$len; $i++) { + $frameLine[$i] = (ord($frameLine[$i])&1)?'1':'0'; + } + } + + return $frame; + } + + //---------------------------------------------------------------------- + public static function tcpdfBarcodeArray($code, $mode = 'QR,L', $tcPdfVersion = '4.5.037') + { + $barcode_array = array(); + + if (!is_array($mode)) + $mode = explode(',', $mode); + + $eccLevel = 'L'; + + if (count($mode) > 1) { + $eccLevel = $mode[1]; + } + + $qrTab = QRcode::text($code, false, $eccLevel); + $size = count($qrTab); + + $barcode_array['num_rows'] = $size; + $barcode_array['num_cols'] = $size; + $barcode_array['bcode'] = array(); + + foreach ($qrTab as $line) { + $arrAdd = array(); + foreach(str_split($line) as $char) + $arrAdd[] = ($char=='1')?1:0; + $barcode_array['bcode'][] = $arrAdd; + } + + return $barcode_array; + } + + //---------------------------------------------------------------------- + public static function clearCache() + { + self::$frames = array(); + } + + //---------------------------------------------------------------------- + public static function buildCache() + { + QRtools::markTime('before_build_cache'); + + $mask = new QRmask(); + for ($a=1; $a <= QRSPEC_VERSION_MAX; $a++) { + $frame = QRspec::newFrame($a); + if (QR_IMAGE) { + $fileName = QR_CACHE_DIR.'frame_'.$a.'.png'; + QRimage::png(self::binarize($frame), $fileName, 1, 0); + } + + $width = count($frame); + $bitMask = array_fill(0, $width, array_fill(0, $width, 0)); + for ($maskNo=0; $maskNo<8; $maskNo++) + $mask->makeMaskNo($maskNo, $width, $frame, $bitMask, true); + } + + QRtools::markTime('after_build_cache'); + } + + //---------------------------------------------------------------------- + public static function log($outfile, $err) + { + if (QR_LOG_DIR !== false) { + if ($err != '') { + if ($outfile !== false) { + file_put_contents(QR_LOG_DIR.basename($outfile).'-errors.txt', date('Y-m-d H:i:s').': '.$err, FILE_APPEND); + } else { + file_put_contents(QR_LOG_DIR.'errors.txt', date('Y-m-d H:i:s').': '.$err, FILE_APPEND); + } + } + } + } + + //---------------------------------------------------------------------- + public static function dumpMask($frame) + { + $width = count($frame); + for($y=0;$y<$width;$y++) { + for($x=0;$x<$width;$x++) { + echo ord($frame[$y][$x]).','; + } + } + } + + //---------------------------------------------------------------------- + public static function markTime($markerId) + { + list($usec, $sec) = explode(" ", microtime()); + $time = ((float)$usec + (float)$sec); + + if (!isset($GLOBALS['qr_time_bench'])) + $GLOBALS['qr_time_bench'] = array(); + + $GLOBALS['qr_time_bench'][$markerId] = $time; + } + + //---------------------------------------------------------------------- + public static function timeBenchmark() + { + self::markTime('finish'); + + $lastTime = 0; + $startTime = 0; + $p = 0; + + echo ' + + '; + + foreach($GLOBALS['qr_time_bench'] as $markerId=>$thisTime) { + if ($p > 0) { + echo ''; + } else { + $startTime = $thisTime; + } + + $p++; + $lastTime = $thisTime; + } + + echo ' + + +
BENCHMARK
till '.$markerId.': '.number_format($thisTime-$lastTime, 6).'s
TOTAL: '.number_format($lastTime-$startTime, 6).'s
'; + } + + public static function save($content, $filename_path) + { + try { + $handle = fopen($filename_path, "w"); + fwrite($handle, $content); + fclose($handle); + return true; + } catch (Exception $e) { + echo 'Exception reçue : ', $e->getMessage(), "\n"; + } + + } + + } + + //########################################################################## + + QRtools::markTime('start'); + + + + +//---- qrspec.php ----------------------------- + + + + +/* + * PHP QR Code encoder + * + * QR Code specifications + * + * Based on libqrencode C library distributed under LGPL 2.1 + * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * The following data / specifications are taken from + * "Two dimensional symbol -- QR-code -- Basic Specification" (JIS X0510:2004) + * or + * "Automatic identification and data capture techniques -- + * QR Code 2005 bar code symbology specification" (ISO/IEC 18004:2006) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + define('QRSPEC_VERSION_MAX', 40); + define('QRSPEC_WIDTH_MAX', 177); + + define('QRCAP_WIDTH', 0); + define('QRCAP_WORDS', 1); + define('QRCAP_REMINDER', 2); + define('QRCAP_EC', 3); + + class QRspec { + + public static $capacity = array( + array( 0, 0, 0, array( 0, 0, 0, 0)), + array( 21, 26, 0, array( 7, 10, 13, 17)), // 1 + array( 25, 44, 7, array( 10, 16, 22, 28)), + array( 29, 70, 7, array( 15, 26, 36, 44)), + array( 33, 100, 7, array( 20, 36, 52, 64)), + array( 37, 134, 7, array( 26, 48, 72, 88)), // 5 + array( 41, 172, 7, array( 36, 64, 96, 112)), + array( 45, 196, 0, array( 40, 72, 108, 130)), + array( 49, 242, 0, array( 48, 88, 132, 156)), + array( 53, 292, 0, array( 60, 110, 160, 192)), + array( 57, 346, 0, array( 72, 130, 192, 224)), //10 + array( 61, 404, 0, array( 80, 150, 224, 264)), + array( 65, 466, 0, array( 96, 176, 260, 308)), + array( 69, 532, 0, array( 104, 198, 288, 352)), + array( 73, 581, 3, array( 120, 216, 320, 384)), + array( 77, 655, 3, array( 132, 240, 360, 432)), //15 + array( 81, 733, 3, array( 144, 280, 408, 480)), + array( 85, 815, 3, array( 168, 308, 448, 532)), + array( 89, 901, 3, array( 180, 338, 504, 588)), + array( 93, 991, 3, array( 196, 364, 546, 650)), + array( 97, 1085, 3, array( 224, 416, 600, 700)), //20 + array(101, 1156, 4, array( 224, 442, 644, 750)), + array(105, 1258, 4, array( 252, 476, 690, 816)), + array(109, 1364, 4, array( 270, 504, 750, 900)), + array(113, 1474, 4, array( 300, 560, 810, 960)), + array(117, 1588, 4, array( 312, 588, 870, 1050)), //25 + array(121, 1706, 4, array( 336, 644, 952, 1110)), + array(125, 1828, 4, array( 360, 700, 1020, 1200)), + array(129, 1921, 3, array( 390, 728, 1050, 1260)), + array(133, 2051, 3, array( 420, 784, 1140, 1350)), + array(137, 2185, 3, array( 450, 812, 1200, 1440)), //30 + array(141, 2323, 3, array( 480, 868, 1290, 1530)), + array(145, 2465, 3, array( 510, 924, 1350, 1620)), + array(149, 2611, 3, array( 540, 980, 1440, 1710)), + array(153, 2761, 3, array( 570, 1036, 1530, 1800)), + array(157, 2876, 0, array( 570, 1064, 1590, 1890)), //35 + array(161, 3034, 0, array( 600, 1120, 1680, 1980)), + array(165, 3196, 0, array( 630, 1204, 1770, 2100)), + array(169, 3362, 0, array( 660, 1260, 1860, 2220)), + array(173, 3532, 0, array( 720, 1316, 1950, 2310)), + array(177, 3706, 0, array( 750, 1372, 2040, 2430)) //40 + ); + + //---------------------------------------------------------------------- + public static function getDataLength($version, $level) + { + return self::$capacity[$version][QRCAP_WORDS] - self::$capacity[$version][QRCAP_EC][$level]; + } + + //---------------------------------------------------------------------- + public static function getECCLength($version, $level) + { + return self::$capacity[$version][QRCAP_EC][$level]; + } + + //---------------------------------------------------------------------- + public static function getWidth($version) + { + return self::$capacity[$version][QRCAP_WIDTH]; + } + + //---------------------------------------------------------------------- + public static function getRemainder($version) + { + return self::$capacity[$version][QRCAP_REMINDER]; + } + + //---------------------------------------------------------------------- + public static function getMinimumVersion($size, $level) + { + + for($i=1; $i<= QRSPEC_VERSION_MAX; $i++) { + $words = self::$capacity[$i][QRCAP_WORDS] - self::$capacity[$i][QRCAP_EC][$level]; + if($words >= $size) + return $i; + } + + return -1; + } + + //###################################################################### + + public static $lengthTableBits = array( + array(10, 12, 14), + array( 9, 11, 13), + array( 8, 16, 16), + array( 8, 10, 12) + ); + + //---------------------------------------------------------------------- + public static function lengthIndicator($mode, $version) + { + if ($mode == QR_MODE_STRUCTURE) + return 0; + + if ($version <= 9) { + $l = 0; + } else if ($version <= 26) { + $l = 1; + } else { + $l = 2; + } + + return self::$lengthTableBits[$mode][$l]; + } + + //---------------------------------------------------------------------- + public static function maximumWords($mode, $version) + { + if($mode == QR_MODE_STRUCTURE) + return 3; + + if($version <= 9) { + $l = 0; + } else if($version <= 26) { + $l = 1; + } else { + $l = 2; + } + + $bits = self::$lengthTableBits[$mode][$l]; + $words = (1 << $bits) - 1; + + if($mode == QR_MODE_KANJI) { + $words *= 2; // the number of bytes is required + } + + return $words; + } + + // Error correction code ----------------------------------------------- + // Table of the error correction code (Reed-Solomon block) + // See Table 12-16 (pp.30-36), JIS X0510:2004. + + public static $eccTable = array( + array(array( 0, 0), array( 0, 0), array( 0, 0), array( 0, 0)), + array(array( 1, 0), array( 1, 0), array( 1, 0), array( 1, 0)), // 1 + array(array( 1, 0), array( 1, 0), array( 1, 0), array( 1, 0)), + array(array( 1, 0), array( 1, 0), array( 2, 0), array( 2, 0)), + array(array( 1, 0), array( 2, 0), array( 2, 0), array( 4, 0)), + array(array( 1, 0), array( 2, 0), array( 2, 2), array( 2, 2)), // 5 + array(array( 2, 0), array( 4, 0), array( 4, 0), array( 4, 0)), + array(array( 2, 0), array( 4, 0), array( 2, 4), array( 4, 1)), + array(array( 2, 0), array( 2, 2), array( 4, 2), array( 4, 2)), + array(array( 2, 0), array( 3, 2), array( 4, 4), array( 4, 4)), + array(array( 2, 2), array( 4, 1), array( 6, 2), array( 6, 2)), //10 + array(array( 4, 0), array( 1, 4), array( 4, 4), array( 3, 8)), + array(array( 2, 2), array( 6, 2), array( 4, 6), array( 7, 4)), + array(array( 4, 0), array( 8, 1), array( 8, 4), array(12, 4)), + array(array( 3, 1), array( 4, 5), array(11, 5), array(11, 5)), + array(array( 5, 1), array( 5, 5), array( 5, 7), array(11, 7)), //15 + array(array( 5, 1), array( 7, 3), array(15, 2), array( 3, 13)), + array(array( 1, 5), array(10, 1), array( 1, 15), array( 2, 17)), + array(array( 5, 1), array( 9, 4), array(17, 1), array( 2, 19)), + array(array( 3, 4), array( 3, 11), array(17, 4), array( 9, 16)), + array(array( 3, 5), array( 3, 13), array(15, 5), array(15, 10)), //20 + array(array( 4, 4), array(17, 0), array(17, 6), array(19, 6)), + array(array( 2, 7), array(17, 0), array( 7, 16), array(34, 0)), + array(array( 4, 5), array( 4, 14), array(11, 14), array(16, 14)), + array(array( 6, 4), array( 6, 14), array(11, 16), array(30, 2)), + array(array( 8, 4), array( 8, 13), array( 7, 22), array(22, 13)), //25 + array(array(10, 2), array(19, 4), array(28, 6), array(33, 4)), + array(array( 8, 4), array(22, 3), array( 8, 26), array(12, 28)), + array(array( 3, 10), array( 3, 23), array( 4, 31), array(11, 31)), + array(array( 7, 7), array(21, 7), array( 1, 37), array(19, 26)), + array(array( 5, 10), array(19, 10), array(15, 25), array(23, 25)), //30 + array(array(13, 3), array( 2, 29), array(42, 1), array(23, 28)), + array(array(17, 0), array(10, 23), array(10, 35), array(19, 35)), + array(array(17, 1), array(14, 21), array(29, 19), array(11, 46)), + array(array(13, 6), array(14, 23), array(44, 7), array(59, 1)), + array(array(12, 7), array(12, 26), array(39, 14), array(22, 41)), //35 + array(array( 6, 14), array( 6, 34), array(46, 10), array( 2, 64)), + array(array(17, 4), array(29, 14), array(49, 10), array(24, 46)), + array(array( 4, 18), array(13, 32), array(48, 14), array(42, 32)), + array(array(20, 4), array(40, 7), array(43, 22), array(10, 67)), + array(array(19, 6), array(18, 31), array(34, 34), array(20, 61)),//40 + ); + + //---------------------------------------------------------------------- + // CACHEABLE!!! + + public static function getEccSpec($version, $level, array &$spec) + { + if (count($spec) < 5) { + $spec = array(0,0,0,0,0); + } + + $b1 = self::$eccTable[$version][$level][0]; + $b2 = self::$eccTable[$version][$level][1]; + $data = self::getDataLength($version, $level); + $ecc = self::getECCLength($version, $level); + + if($b2 == 0) { + $spec[0] = $b1; + $spec[1] = (int)($data / $b1); + $spec[2] = (int)($ecc / $b1); + $spec[3] = 0; + $spec[4] = 0; + } else { + $spec[0] = $b1; + $spec[1] = (int)($data / ($b1 + $b2)); + $spec[2] = (int)($ecc / ($b1 + $b2)); + $spec[3] = $b2; + $spec[4] = $spec[1] + 1; + } + } + + // Alignment pattern --------------------------------------------------- + + // Positions of alignment patterns. + // This array includes only the second and the third position of the + // alignment patterns. Rest of them can be calculated from the distance + // between them. + + // See Table 1 in Appendix E (pp.71) of JIS X0510:2004. + + public static $alignmentPattern = array( + array( 0, 0), + array( 0, 0), array(18, 0), array(22, 0), array(26, 0), array(30, 0), // 1- 5 + array(34, 0), array(22, 38), array(24, 42), array(26, 46), array(28, 50), // 6-10 + array(30, 54), array(32, 58), array(34, 62), array(26, 46), array(26, 48), //11-15 + array(26, 50), array(30, 54), array(30, 56), array(30, 58), array(34, 62), //16-20 + array(28, 50), array(26, 50), array(30, 54), array(28, 54), array(32, 58), //21-25 + array(30, 58), array(34, 62), array(26, 50), array(30, 54), array(26, 52), //26-30 + array(30, 56), array(34, 60), array(30, 58), array(34, 62), array(30, 54), //31-35 + array(24, 50), array(28, 54), array(32, 58), array(26, 54), array(30, 58), //35-40 + ); + + + /** -------------------------------------------------------------------- + * Put an alignment marker. + * @param frame + * @param width + * @param ox,oy center coordinate of the pattern + */ + public static function putAlignmentMarker(array &$frame, $ox, $oy) + { + $finder = array( + "\xa1\xa1\xa1\xa1\xa1", + "\xa1\xa0\xa0\xa0\xa1", + "\xa1\xa0\xa1\xa0\xa1", + "\xa1\xa0\xa0\xa0\xa1", + "\xa1\xa1\xa1\xa1\xa1" + ); + + $yStart = $oy-2; + $xStart = $ox-2; + + for($y=0; $y<5; $y++) { + QRstr::set($frame, $xStart, $yStart+$y, $finder[$y]); + } + } + + //---------------------------------------------------------------------- + public static function putAlignmentPattern($version, &$frame, $width) + { + if($version < 2) + return; + + $d = self::$alignmentPattern[$version][1] - self::$alignmentPattern[$version][0]; + if($d < 0) { + $w = 2; + } else { + $w = (int)(($width - self::$alignmentPattern[$version][0]) / $d + 2); + } + + if($w * $w - 3 == 1) { + $x = self::$alignmentPattern[$version][0]; + $y = self::$alignmentPattern[$version][0]; + self::putAlignmentMarker($frame, $x, $y); + return; + } + + $cx = self::$alignmentPattern[$version][0]; + for($x=1; $x<$w - 1; $x++) { + self::putAlignmentMarker($frame, 6, $cx); + self::putAlignmentMarker($frame, $cx, 6); + $cx += $d; + } + + $cy = self::$alignmentPattern[$version][0]; + for($y=0; $y<$w-1; $y++) { + $cx = self::$alignmentPattern[$version][0]; + for($x=0; $x<$w-1; $x++) { + self::putAlignmentMarker($frame, $cx, $cy); + $cx += $d; + } + $cy += $d; + } + } + + // Version information pattern ----------------------------------------- + + // Version information pattern (BCH coded). + // See Table 1 in Appendix D (pp.68) of JIS X0510:2004. + + // size: [QRSPEC_VERSION_MAX - 6] + + public static $versionPattern = array( + 0x07c94, 0x085bc, 0x09a99, 0x0a4d3, 0x0bbf6, 0x0c762, 0x0d847, 0x0e60d, + 0x0f928, 0x10b78, 0x1145d, 0x12a17, 0x13532, 0x149a6, 0x15683, 0x168c9, + 0x177ec, 0x18ec4, 0x191e1, 0x1afab, 0x1b08e, 0x1cc1a, 0x1d33f, 0x1ed75, + 0x1f250, 0x209d5, 0x216f0, 0x228ba, 0x2379f, 0x24b0b, 0x2542e, 0x26a64, + 0x27541, 0x28c69 + ); + + //---------------------------------------------------------------------- + public static function getVersionPattern($version) + { + if($version < 7 || $version > QRSPEC_VERSION_MAX) + return 0; + + return self::$versionPattern[$version -7]; + } + + // Format information -------------------------------------------------- + // See calcFormatInfo in tests/test_qrspec.c (orginal qrencode c lib) + + public static $formatInfo = array( + array(0x77c4, 0x72f3, 0x7daa, 0x789d, 0x662f, 0x6318, 0x6c41, 0x6976), + array(0x5412, 0x5125, 0x5e7c, 0x5b4b, 0x45f9, 0x40ce, 0x4f97, 0x4aa0), + array(0x355f, 0x3068, 0x3f31, 0x3a06, 0x24b4, 0x2183, 0x2eda, 0x2bed), + array(0x1689, 0x13be, 0x1ce7, 0x19d0, 0x0762, 0x0255, 0x0d0c, 0x083b) + ); + + public static function getFormatInfo($mask, $level) + { + if($mask < 0 || $mask > 7) + return 0; + + if($level < 0 || $level > 3) + return 0; + + return self::$formatInfo[$level][$mask]; + } + + // Frame --------------------------------------------------------------- + // Cache of initial frames. + + public static $frames = array(); + + /** -------------------------------------------------------------------- + * Put a finder pattern. + * @param frame + * @param width + * @param ox,oy upper-left coordinate of the pattern + */ + public static function putFinderPattern(&$frame, $ox, $oy) + { + $finder = array( + "\xc1\xc1\xc1\xc1\xc1\xc1\xc1", + "\xc1\xc0\xc0\xc0\xc0\xc0\xc1", + "\xc1\xc0\xc1\xc1\xc1\xc0\xc1", + "\xc1\xc0\xc1\xc1\xc1\xc0\xc1", + "\xc1\xc0\xc1\xc1\xc1\xc0\xc1", + "\xc1\xc0\xc0\xc0\xc0\xc0\xc1", + "\xc1\xc1\xc1\xc1\xc1\xc1\xc1" + ); + + for($y=0; $y<7; $y++) { + QRstr::set($frame, $ox, $oy+$y, $finder[$y]); + } + } + + //---------------------------------------------------------------------- + public static function createFrame($version) + { + $width = self::$capacity[$version][QRCAP_WIDTH]; + $frameLine = str_repeat ("\0", $width); + $frame = array_fill(0, $width, $frameLine); + + // Finder pattern + self::putFinderPattern($frame, 0, 0); + self::putFinderPattern($frame, $width - 7, 0); + self::putFinderPattern($frame, 0, $width - 7); + + // Separator + $yOffset = $width - 7; + + for($y=0; $y<7; $y++) { + $frame[$y][7] = "\xc0"; + $frame[$y][$width - 8] = "\xc0"; + $frame[$yOffset][7] = "\xc0"; + $yOffset++; + } + + $setPattern = str_repeat("\xc0", 8); + + QRstr::set($frame, 0, 7, $setPattern); + QRstr::set($frame, $width-8, 7, $setPattern); + QRstr::set($frame, 0, $width - 8, $setPattern); + + // Format info + $setPattern = str_repeat("\x84", 9); + QRstr::set($frame, 0, 8, $setPattern); + QRstr::set($frame, $width - 8, 8, $setPattern, 8); + + $yOffset = $width - 8; + + for($y=0; $y<8; $y++,$yOffset++) { + $frame[$y][8] = "\x84"; + $frame[$yOffset][8] = "\x84"; + } + + // Timing pattern + + for($i=1; $i<$width-15; $i++) { + $frame[6][7+$i] = chr(0x90 | ($i & 1)); + $frame[7+$i][6] = chr(0x90 | ($i & 1)); + } + + // Alignment pattern + self::putAlignmentPattern($version, $frame, $width); + + // Version information + if($version >= 7) { + $vinf = self::getVersionPattern($version); + + $v = $vinf; + + for($x=0; $x<6; $x++) { + for($y=0; $y<3; $y++) { + $frame[($width - 11)+$y][$x] = chr(0x88 | ($v & 1)); + $v = $v >> 1; + } + } + + $v = $vinf; + for($y=0; $y<6; $y++) { + for($x=0; $x<3; $x++) { + $frame[$y][$x+($width - 11)] = chr(0x88 | ($v & 1)); + $v = $v >> 1; + } + } + } + + // and a little bit... + $frame[$width - 8][8] = "\x81"; + + return $frame; + } + + //---------------------------------------------------------------------- + public static function debug($frame, $binary_mode = false) + { + if ($binary_mode) { + + foreach ($frame as &$frameLine) { + $frameLine = join('  ', explode('0', $frameLine)); + $frameLine = join('██', explode('1', $frameLine)); + } + + ?> + +


        '; + echo join("
        ", $frame); + echo '






'; + + } else { + + foreach ($frame as &$frameLine) { + $frameLine = join(' ', explode("\xc0", $frameLine)); + $frameLine = join('', explode("\xc1", $frameLine)); + $frameLine = join(' ', explode("\xa0", $frameLine)); + $frameLine = join('', explode("\xa1", $frameLine)); + $frameLine = join('', explode("\x84", $frameLine)); //format 0 + $frameLine = join('', explode("\x85", $frameLine)); //format 1 + $frameLine = join('', explode("\x81", $frameLine)); //special bit + $frameLine = join(' ', explode("\x90", $frameLine)); //clock 0 + $frameLine = join('', explode("\x91", $frameLine)); //clock 1 + $frameLine = join(' ', explode("\x88", $frameLine)); //version + $frameLine = join('', explode("\x89", $frameLine)); //version + $frameLine = join('♦', explode("\x01", $frameLine)); + $frameLine = join('⋅', explode("\0", $frameLine)); + } + + ?> + + "; + echo join("
", $frame); + echo "
"; + + } + } + + //---------------------------------------------------------------------- + public static function serial($frame) + { + return gzcompress(join("\n", $frame), 9); + } + + //---------------------------------------------------------------------- + public static function unserial($code) + { + return explode("\n", gzuncompress($code)); + } + + //---------------------------------------------------------------------- + public static function newFrame($version) + { + if($version < 1 || $version > QRSPEC_VERSION_MAX) + return null; + + if(!isset(self::$frames[$version])) { + + $fileName = QR_CACHE_DIR.'frame_'.$version.'.dat'; + + if (QR_CACHEABLE) { + if (file_exists($fileName)) { + self::$frames[$version] = self::unserial(file_get_contents($fileName)); + } else { + self::$frames[$version] = self::createFrame($version); + file_put_contents($fileName, self::serial(self::$frames[$version])); + } + } else { + self::$frames[$version] = self::createFrame($version); + } + } + + if(is_null(self::$frames[$version])) + return null; + + return self::$frames[$version]; + } + + //---------------------------------------------------------------------- + public static function rsBlockNum($spec) { return $spec[0] + $spec[3]; } + public static function rsBlockNum1($spec) { return $spec[0]; } + public static function rsDataCodes1($spec) { return $spec[1]; } + public static function rsEccCodes1($spec) { return $spec[2]; } + public static function rsBlockNum2($spec) { return $spec[3]; } + public static function rsDataCodes2($spec) { return $spec[4]; } + public static function rsEccCodes2($spec) { return $spec[2]; } + public static function rsDataLength($spec) { return ($spec[0] * $spec[1]) + ($spec[3] * $spec[4]); } + public static function rsEccLength($spec) { return ($spec[0] + $spec[3]) * $spec[2]; } + + } + + + +//---- qrimage.php ----------------------------- + + + + +/* + * PHP QR Code encoder + * + * Image output of code using GD2 + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + define('QR_IMAGE', true); + + class QRimage { + + //---------------------------------------------------------------------- + public static function png($frame, $filename = false, $pixelPerPoint = 4, $outerFrame = 4,$saveandprint=FALSE, $back_color, $fore_color) + { + $image = self::image($frame, $pixelPerPoint, $outerFrame, $back_color, $fore_color); + + if ($filename === false) { + Header("Content-type: image/png"); + ImagePng($image); + } else { + if($saveandprint===TRUE){ + ImagePng($image, $filename); + header("Content-type: image/png"); + ImagePng($image); + }else{ + ImagePng($image, $filename); + } + } + + ImageDestroy($image); + } + + //---------------------------------------------------------------------- + public static function jpg($frame, $filename = false, $pixelPerPoint = 8, $outerFrame = 4, $q = 85) + { + $image = self::image($frame, $pixelPerPoint, $outerFrame); + + if ($filename === false) { + Header("Content-type: image/jpeg"); + ImageJpeg($image, null, $q); + } else { + ImageJpeg($image, $filename, $q); + } + + ImageDestroy($image); + } + + //---------------------------------------------------------------------- + private static function image($frame, $pixelPerPoint = 4, $outerFrame = 4, $back_color = 0xFFFFFF, $fore_color = 0x000000) + { + $h = count($frame); + $w = strlen($frame[0]); + + $imgW = $w + 2*$outerFrame; + $imgH = $h + 2*$outerFrame; + + $base_image =ImageCreate($imgW, $imgH); + + // convert a hexadecimal color code into decimal format (red = 255 0 0, green = 0 255 0, blue = 0 0 255) + $r1 = round((($fore_color & 0xFF0000) >> 16), 5); + $g1 = round((($fore_color & 0x00FF00) >> 8), 5); + $b1 = round(($fore_color & 0x0000FF), 5); + + // convert a hexadecimal color code into decimal format (red = 255 0 0, green = 0 255 0, blue = 0 0 255) + $r2 = round((($back_color & 0xFF0000) >> 16), 5); + $g2 = round((($back_color & 0x00FF00) >> 8), 5); + $b2 = round(($back_color & 0x0000FF), 5); + + + + $col[0] = ImageColorAllocate($base_image, $r2, $g2, $b2); + $col[1] = ImageColorAllocate($base_image, $r1, $g1, $b1); + + imagefill($base_image, 0, 0, $col[0]); + + for($y=0; $y<$h; $y++) { + for($x=0; $x<$w; $x++) { + if ($frame[$y][$x] == '1') { + ImageSetPixel($base_image,$x+$outerFrame,$y+$outerFrame,$col[1]); + } + } + } + + $target_image =ImageCreate($imgW * $pixelPerPoint, $imgH * $pixelPerPoint); + ImageCopyResized($target_image, $base_image, 0, 0, 0, 0, $imgW * $pixelPerPoint, $imgH * $pixelPerPoint, $imgW, $imgH); + ImageDestroy($base_image); + + return $target_image; + } + } + + + + +//---- qrinput.php ----------------------------- + + + + +/* + * PHP QR Code encoder + * + * Input encoding class + * + * Based on libqrencode C library distributed under LGPL 2.1 + * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + define('STRUCTURE_HEADER_BITS', 20); + define('MAX_STRUCTURED_SYMBOLS', 16); + + class QRinputItem { + + public $mode; + public $size; + public $data; + public $bstream; + + public function __construct($mode, $size, $data, $bstream = null) + { + $setData = array_slice($data, 0, $size); + + if (count($setData) < $size) { + $setData = array_merge($setData, array_fill(0,$size-count($setData),0)); + } + + if(!QRinput::check($mode, $size, $setData)) { + throw new Exception('Error m:'.$mode.',s:'.$size.',d:'.join(',',$setData)); + } + + $this->mode = $mode; + $this->size = $size; + $this->data = $setData; + $this->bstream = $bstream; + } + + //---------------------------------------------------------------------- + public function encodeModeNum($version) + { + try { + + $words = (int)($this->size / 3); + $bs = new QRbitstream(); + + $val = 0x1; + $bs->appendNum(4, $val); + $bs->appendNum(QRspec::lengthIndicator(QR_MODE_NUM, $version), $this->size); + + for($i=0; $i<$words; $i++) { + $val = (ord($this->data[$i*3 ]) - ord('0')) * 100; + $val += (ord($this->data[$i*3+1]) - ord('0')) * 10; + $val += (ord($this->data[$i*3+2]) - ord('0')); + $bs->appendNum(10, $val); + } + + if($this->size - $words * 3 == 1) { + $val = ord($this->data[$words*3]) - ord('0'); + $bs->appendNum(4, $val); + } else if($this->size - $words * 3 == 2) { + $val = (ord($this->data[$words*3 ]) - ord('0')) * 10; + $val += (ord($this->data[$words*3+1]) - ord('0')); + $bs->appendNum(7, $val); + } + + $this->bstream = $bs; + return 0; + + } catch (Exception $e) { + return -1; + } + } + + //---------------------------------------------------------------------- + public function encodeModeAn($version) + { + try { + $words = (int)($this->size / 2); + $bs = new QRbitstream(); + + $bs->appendNum(4, 0x02); + $bs->appendNum(QRspec::lengthIndicator(QR_MODE_AN, $version), $this->size); + + for($i=0; $i<$words; $i++) { + $val = (int)QRinput::lookAnTable(ord($this->data[$i*2 ])) * 45; + $val += (int)QRinput::lookAnTable(ord($this->data[$i*2+1])); + + $bs->appendNum(11, $val); + } + + if($this->size & 1) { + $val = QRinput::lookAnTable(ord($this->data[$words * 2])); + $bs->appendNum(6, $val); + } + + $this->bstream = $bs; + return 0; + + } catch (Exception $e) { + return -1; + } + } + + //---------------------------------------------------------------------- + public function encodeMode8($version) + { + try { + $bs = new QRbitstream(); + + $bs->appendNum(4, 0x4); + $bs->appendNum(QRspec::lengthIndicator(QR_MODE_8, $version), $this->size); + + for($i=0; $i<$this->size; $i++) { + $bs->appendNum(8, ord($this->data[$i])); + } + + $this->bstream = $bs; + return 0; + + } catch (Exception $e) { + return -1; + } + } + + //---------------------------------------------------------------------- + public function encodeModeKanji($version) + { + try { + + $bs = new QRbitrtream(); + + $bs->appendNum(4, 0x8); + $bs->appendNum(QRspec::lengthIndicator(QR_MODE_KANJI, $version), (int)($this->size / 2)); + + for($i=0; $i<$this->size; $i+=2) { + $val = (ord($this->data[$i]) << 8) | ord($this->data[$i+1]); + if($val <= 0x9ffc) { + $val -= 0x8140; + } else { + $val -= 0xc140; + } + + $h = ($val >> 8) * 0xc0; + $val = ($val & 0xff) + $h; + + $bs->appendNum(13, $val); + } + + $this->bstream = $bs; + return 0; + + } catch (Exception $e) { + return -1; + } + } + + //---------------------------------------------------------------------- + public function encodeModeStructure() + { + try { + $bs = new QRbitstream(); + + $bs->appendNum(4, 0x03); + $bs->appendNum(4, ord($this->data[1]) - 1); + $bs->appendNum(4, ord($this->data[0]) - 1); + $bs->appendNum(8, ord($this->data[2])); + + $this->bstream = $bs; + return 0; + + } catch (Exception $e) { + return -1; + } + } + + //---------------------------------------------------------------------- + public function estimateBitStreamSizeOfEntry($version) + { + $bits = 0; + + if($version == 0) + $version = 1; + + switch($this->mode) { + case QR_MODE_NUM: $bits = QRinput::estimateBitsModeNum($this->size); break; + case QR_MODE_AN: $bits = QRinput::estimateBitsModeAn($this->size); break; + case QR_MODE_8: $bits = QRinput::estimateBitsMode8($this->size); break; + case QR_MODE_KANJI: $bits = QRinput::estimateBitsModeKanji($this->size);break; + case QR_MODE_STRUCTURE: return STRUCTURE_HEADER_BITS; + default: + return 0; + } + + $l = QRspec::lengthIndicator($this->mode, $version); + $m = 1 << $l; + $num = (int)(($this->size + $m - 1) / $m); + + $bits += $num * (4 + $l); + + return $bits; + } + + //---------------------------------------------------------------------- + public function encodeBitStream($version) + { + try { + + unset($this->bstream); + $words = QRspec::maximumWords($this->mode, $version); + + if($this->size > $words) { + + $st1 = new QRinputItem($this->mode, $words, $this->data); + $st2 = new QRinputItem($this->mode, $this->size - $words, array_slice($this->data, $words)); + + $st1->encodeBitStream($version); + $st2->encodeBitStream($version); + + $this->bstream = new QRbitstream(); + $this->bstream->append($st1->bstream); + $this->bstream->append($st2->bstream); + + unset($st1); + unset($st2); + + } else { + + $ret = 0; + + switch($this->mode) { + case QR_MODE_NUM: $ret = $this->encodeModeNum($version); break; + case QR_MODE_AN: $ret = $this->encodeModeAn($version); break; + case QR_MODE_8: $ret = $this->encodeMode8($version); break; + case QR_MODE_KANJI: $ret = $this->encodeModeKanji($version);break; + case QR_MODE_STRUCTURE: $ret = $this->encodeModeStructure(); break; + + default: + break; + } + + if($ret < 0) + return -1; + } + + return $this->bstream->size(); + + } catch (Exception $e) { + return -1; + } + } + }; + + //########################################################################## + + class QRinput { + + public $items; + + private $version; + private $level; + + //---------------------------------------------------------------------- + public function __construct($version = 0, $level = QR_ECLEVEL_L) + { + if ($version < 0 || $version > QRSPEC_VERSION_MAX || $level > QR_ECLEVEL_H) { + throw new Exception('Invalid version no'); + } + + $this->version = $version; + $this->level = $level; + } + + //---------------------------------------------------------------------- + public function getVersion() + { + return $this->version; + } + + //---------------------------------------------------------------------- + public function setVersion($version) + { + if($version < 0 || $version > QRSPEC_VERSION_MAX) { + throw new Exception('Invalid version no'); + return -1; + } + + $this->version = $version; + + return 0; + } + + //---------------------------------------------------------------------- + public function getErrorCorrectionLevel() + { + return $this->level; + } + + //---------------------------------------------------------------------- + public function setErrorCorrectionLevel($level) + { + if($level > QR_ECLEVEL_H) { + throw new Exception('Invalid ECLEVEL'); + return -1; + } + + $this->level = $level; + + return 0; + } + + //---------------------------------------------------------------------- + public function appendEntry(QRinputItem $entry) + { + $this->items[] = $entry; + } + + //---------------------------------------------------------------------- + public function append($mode, $size, $data) + { + try { + $entry = new QRinputItem($mode, $size, $data); + $this->items[] = $entry; + return 0; + } catch (Exception $e) { + return -1; + } + } + + //---------------------------------------------------------------------- + + public function insertStructuredAppendHeader($size, $index, $parity) + { + if( $size > MAX_STRUCTURED_SYMBOLS ) { + throw new Exception('insertStructuredAppendHeader wrong size'); + } + + if( $index <= 0 || $index > MAX_STRUCTURED_SYMBOLS ) { + throw new Exception('insertStructuredAppendHeader wrong index'); + } + + $buf = array($size, $index, $parity); + + try { + $entry = new QRinputItem(QR_MODE_STRUCTURE, 3, buf); + array_unshift($this->items, $entry); + return 0; + } catch (Exception $e) { + return -1; + } + } + + //---------------------------------------------------------------------- + public function calcParity() + { + $parity = 0; + + foreach($this->items as $item) { + if($item->mode != QR_MODE_STRUCTURE) { + for($i=$item->size-1; $i>=0; $i--) { + $parity ^= $item->data[$i]; + } + } + } + + return $parity; + } + + //---------------------------------------------------------------------- + public static function checkModeNum($size, $data) + { + for($i=0; $i<$size; $i++) { + if((ord($data[$i]) < ord('0')) || (ord($data[$i]) > ord('9'))){ + return false; + } + } + + return true; + } + + //---------------------------------------------------------------------- + public static function estimateBitsModeNum($size) + { + $w = (int)$size / 3; + $bits = $w * 10; + + switch($size - $w * 3) { + case 1: + $bits += 4; + break; + case 2: + $bits += 7; + break; + default: + break; + } + + return $bits; + } + + //---------------------------------------------------------------------- + public static $anTable = array( + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 36, -1, -1, -1, 37, 38, -1, -1, -1, -1, 39, 40, -1, 41, 42, 43, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 44, -1, -1, -1, -1, -1, + -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 + ); + + //---------------------------------------------------------------------- + public static function lookAnTable($c) + { + return (($c > 127)?-1:self::$anTable[$c]); + } + + //---------------------------------------------------------------------- + public static function checkModeAn($size, $data) + { + for($i=0; $i<$size; $i++) { + if (self::lookAnTable(ord($data[$i])) == -1) { + return false; + } + } + + return true; + } + + //---------------------------------------------------------------------- + public static function estimateBitsModeAn($size) + { + $w = (int)($size / 2); + $bits = $w * 11; + + if($size & 1) { + $bits += 6; + } + + return $bits; + } + + //---------------------------------------------------------------------- + public static function estimateBitsMode8($size) + { + return $size * 8; + } + + //---------------------------------------------------------------------- + public function estimateBitsModeKanji($size) + { + return (int)(($size / 2) * 13); + } + + //---------------------------------------------------------------------- + public static function checkModeKanji($size, $data) + { + if($size & 1) + return false; + + for($i=0; $i<$size; $i+=2) { + $val = (ord($data[$i]) << 8) | ord($data[$i+1]); + if( $val < 0x8140 + || ($val > 0x9ffc && $val < 0xe040) + || $val > 0xebbf) { + return false; + } + } + + return true; + } + + /*********************************************************************** + * Validation + **********************************************************************/ + + public static function check($mode, $size, $data) + { + if($size <= 0) + return false; + + switch($mode) { + case QR_MODE_NUM: return self::checkModeNum($size, $data); break; + case QR_MODE_AN: return self::checkModeAn($size, $data); break; + case QR_MODE_KANJI: return self::checkModeKanji($size, $data); break; + case QR_MODE_8: return true; break; + case QR_MODE_STRUCTURE: return true; break; + + default: + break; + } + + return false; + } + + + //---------------------------------------------------------------------- + public function estimateBitStreamSize($version) + { + $bits = 0; + + foreach($this->items as $item) { + $bits += $item->estimateBitStreamSizeOfEntry($version); + } + + return $bits; + } + + //---------------------------------------------------------------------- + public function estimateVersion() + { + $version = 0; + $prev = 0; + do { + $prev = $version; + $bits = $this->estimateBitStreamSize($prev); + $version = QRspec::getMinimumVersion((int)(($bits + 7) / 8), $this->level); + if ($version < 0) { + return -1; + } + } while ($version > $prev); + + return $version; + } + + //---------------------------------------------------------------------- + public static function lengthOfCode($mode, $version, $bits) + { + $payload = $bits - 4 - QRspec::lengthIndicator($mode, $version); + switch($mode) { + case QR_MODE_NUM: + $chunks = (int)($payload / 10); + $remain = $payload - $chunks * 10; + $size = $chunks * 3; + if($remain >= 7) { + $size += 2; + } else if($remain >= 4) { + $size += 1; + } + break; + case QR_MODE_AN: + $chunks = (int)($payload / 11); + $remain = $payload - $chunks * 11; + $size = $chunks * 2; + if($remain >= 6) + $size++; + break; + case QR_MODE_8: + $size = (int)($payload / 8); + break; + case QR_MODE_KANJI: + $size = (int)(($payload / 13) * 2); + break; + case QR_MODE_STRUCTURE: + $size = (int)($payload / 8); + break; + default: + $size = 0; + break; + } + + $maxsize = QRspec::maximumWords($mode, $version); + if($size < 0) $size = 0; + if($size > $maxsize) $size = $maxsize; + + return $size; + } + + //---------------------------------------------------------------------- + public function createBitStream() + { + $total = 0; + + foreach($this->items as $item) { + $bits = $item->encodeBitStream($this->version); + + if($bits < 0) + return -1; + + $total += $bits; + } + + return $total; + } + + //---------------------------------------------------------------------- + public function convertData() + { + $ver = $this->estimateVersion(); + if($ver > $this->getVersion()) { + $this->setVersion($ver); + } + + for(;;) { + $bits = $this->createBitStream(); + + if($bits < 0) + return -1; + + $ver = QRspec::getMinimumVersion((int)(($bits + 7) / 8), $this->level); + if($ver < 0) { + throw new Exception('WRONG VERSION'); + } else if($ver > $this->getVersion()) { + $this->setVersion($ver); + } else { + break; + } + } + + return 0; + } + + //---------------------------------------------------------------------- + public function appendPaddingBit(&$bstream) + { + $bits = $bstream->size(); + $maxwords = QRspec::getDataLength($this->version, $this->level); + $maxbits = $maxwords * 8; + + if ($maxbits == $bits) { + return 0; + } + + if ($maxbits - $bits < 5) { + return $bstream->appendNum($maxbits - $bits, 0); + } + + $bits += 4; + $words = (int)(($bits + 7) / 8); + + $padding = new QRbitstream(); + $ret = $padding->appendNum($words * 8 - $bits + 4, 0); + + if($ret < 0) + return $ret; + + $padlen = $maxwords - $words; + + if($padlen > 0) { + + $padbuf = array(); + for($i=0; $i<$padlen; $i++) { + $padbuf[$i] = ($i&1)?0x11:0xec; + } + + $ret = $padding->appendBytes($padlen, $padbuf); + + if($ret < 0) + return $ret; + + } + + $ret = $bstream->append($padding); + + return $ret; + } + + //---------------------------------------------------------------------- + public function mergeBitStream() + { + if($this->convertData() < 0) { + return null; + } + + $bstream = new QRbitstream(); + + foreach($this->items as $item) { + $ret = $bstream->append($item->bstream); + if($ret < 0) { + return null; + } + } + + return $bstream; + } + + //---------------------------------------------------------------------- + public function getBitStream() + { + + $bstream = $this->mergeBitStream(); + + if($bstream == null) { + return null; + } + + $ret = $this->appendPaddingBit($bstream); + if($ret < 0) { + return null; + } + + return $bstream; + } + + //---------------------------------------------------------------------- + public function getByteStream() + { + $bstream = $this->getBitStream(); + if($bstream == null) { + return null; + } + + return $bstream->toByte(); + } + } + + + + + + +//---- qrbitstream.php ----------------------------- + + + + +/* + * PHP QR Code encoder + * + * Bitstream class + * + * Based on libqrencode C library distributed under LGPL 2.1 + * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + class QRbitstream { + + public $data = array(); + + //---------------------------------------------------------------------- + public function size() + { + return count($this->data); + } + + //---------------------------------------------------------------------- + public function allocate($setLength) + { + $this->data = array_fill(0, $setLength, 0); + return 0; + } + + //---------------------------------------------------------------------- + public static function newFromNum($bits, $num) + { + $bstream = new QRbitstream(); + $bstream->allocate($bits); + + $mask = 1 << ($bits - 1); + for($i=0; $i<$bits; $i++) { + if($num & $mask) { + $bstream->data[$i] = 1; + } else { + $bstream->data[$i] = 0; + } + $mask = $mask >> 1; + } + + return $bstream; + } + + //---------------------------------------------------------------------- + public static function newFromBytes($size, $data) + { + $bstream = new QRbitstream(); + $bstream->allocate($size * 8); + $p=0; + + for($i=0; $i<$size; $i++) { + $mask = 0x80; + for($j=0; $j<8; $j++) { + if($data[$i] & $mask) { + $bstream->data[$p] = 1; + } else { + $bstream->data[$p] = 0; + } + $p++; + $mask = $mask >> 1; + } + } + + return $bstream; + } + + //---------------------------------------------------------------------- + public function append(QRbitstream $arg) + { + if (is_null($arg)) { + return -1; + } + + if($arg->size() == 0) { + return 0; + } + + if($this->size() == 0) { + $this->data = $arg->data; + return 0; + } + + $this->data = array_values(array_merge($this->data, $arg->data)); + + return 0; + } + + //---------------------------------------------------------------------- + public function appendNum($bits, $num) + { + if ($bits == 0) + return 0; + + $b = QRbitstream::newFromNum($bits, $num); + + if(is_null($b)) + return -1; + + $ret = $this->append($b); + unset($b); + + return $ret; + } + + //---------------------------------------------------------------------- + public function appendBytes($size, $data) + { + if ($size == 0) + return 0; + + $b = QRbitstream::newFromBytes($size, $data); + + if(is_null($b)) + return -1; + + $ret = $this->append($b); + unset($b); + + return $ret; + } + + //---------------------------------------------------------------------- + public function toByte() + { + + $size = $this->size(); + + if($size == 0) { + return array(); + } + + $data = array_fill(0, (int)(($size + 7) / 8), 0); + $bytes = (int)($size / 8); + + $p = 0; + + for($i=0; $i<$bytes; $i++) { + $v = 0; + for($j=0; $j<8; $j++) { + $v = $v << 1; + $v |= $this->data[$p]; + $p++; + } + $data[$i] = $v; + } + + if($size & 7) { + $v = 0; + for($j=0; $j<($size & 7); $j++) { + $v = $v << 1; + $v |= $this->data[$p]; + $p++; + } + $data[$bytes] = $v; + } + + return $data; + } + + } + + + + +//---- qrsplit.php ----------------------------- + + + + +/* + * PHP QR Code encoder + * + * Input splitting classes + * + * Based on libqrencode C library distributed under LGPL 2.1 + * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * The following data / specifications are taken from + * "Two dimensional symbol -- QR-code -- Basic Specification" (JIS X0510:2004) + * or + * "Automatic identification and data capture techniques -- + * QR Code 2005 bar code symbology specification" (ISO/IEC 18004:2006) + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + class QRsplit { + + public $dataStr = ''; + public $input; + public $modeHint; + + //---------------------------------------------------------------------- + public function __construct($dataStr, $input, $modeHint) + { + $this->dataStr = $dataStr; + $this->input = $input; + $this->modeHint = $modeHint; + } + + //---------------------------------------------------------------------- + public static function isdigitat($str, $pos) + { + if ($pos >= strlen($str)) + return false; + + return ((ord($str[$pos]) >= ord('0'))&&(ord($str[$pos]) <= ord('9'))); + } + + //---------------------------------------------------------------------- + public static function isalnumat($str, $pos) + { + if ($pos >= strlen($str)) + return false; + + return (QRinput::lookAnTable(ord($str[$pos])) >= 0); + } + + //---------------------------------------------------------------------- + public function identifyMode($pos) + { + if ($pos >= strlen($this->dataStr)) + return QR_MODE_NUL; + + $c = $this->dataStr[$pos]; + + if(self::isdigitat($this->dataStr, $pos)) { + return QR_MODE_NUM; + } else if(self::isalnumat($this->dataStr, $pos)) { + return QR_MODE_AN; + } else if($this->modeHint == QR_MODE_KANJI) { + + if ($pos+1 < strlen($this->dataStr)) + { + $d = $this->dataStr[$pos+1]; + $word = (ord($c) << 8) | ord($d); + if(($word >= 0x8140 && $word <= 0x9ffc) || ($word >= 0xe040 && $word <= 0xebbf)) { + return QR_MODE_KANJI; + } + } + } + + return QR_MODE_8; + } + + //---------------------------------------------------------------------- + public function eatNum() + { + $ln = QRspec::lengthIndicator(QR_MODE_NUM, $this->input->getVersion()); + + $p = 0; + while(self::isdigitat($this->dataStr, $p)) { + $p++; + } + + $run = $p; + $mode = $this->identifyMode($p); + + if($mode == QR_MODE_8) { + $dif = QRinput::estimateBitsModeNum($run) + 4 + $ln + + QRinput::estimateBitsMode8(1) // + 4 + l8 + - QRinput::estimateBitsMode8($run + 1); // - 4 - l8 + if($dif > 0) { + return $this->eat8(); + } + } + if($mode == QR_MODE_AN) { + $dif = QRinput::estimateBitsModeNum($run) + 4 + $ln + + QRinput::estimateBitsModeAn(1) // + 4 + la + - QRinput::estimateBitsModeAn($run + 1);// - 4 - la + if($dif > 0) { + return $this->eatAn(); + } + } + + $ret = $this->input->append(QR_MODE_NUM, $run, str_split($this->dataStr)); + if($ret < 0) + return -1; + + return $run; + } + + //---------------------------------------------------------------------- + public function eatAn() + { + $la = QRspec::lengthIndicator(QR_MODE_AN, $this->input->getVersion()); + $ln = QRspec::lengthIndicator(QR_MODE_NUM, $this->input->getVersion()); + + $p = 0; + + while(self::isalnumat($this->dataStr, $p)) { + if(self::isdigitat($this->dataStr, $p)) { + $q = $p; + while(self::isdigitat($this->dataStr, $q)) { + $q++; + } + + $dif = QRinput::estimateBitsModeAn($p) // + 4 + la + + QRinput::estimateBitsModeNum($q - $p) + 4 + $ln + - QRinput::estimateBitsModeAn($q); // - 4 - la + + if($dif < 0) { + break; + } else { + $p = $q; + } + } else { + $p++; + } + } + + $run = $p; + + if(!self::isalnumat($this->dataStr, $p)) { + $dif = QRinput::estimateBitsModeAn($run) + 4 + $la + + QRinput::estimateBitsMode8(1) // + 4 + l8 + - QRinput::estimateBitsMode8($run + 1); // - 4 - l8 + if($dif > 0) { + return $this->eat8(); + } + } + + $ret = $this->input->append(QR_MODE_AN, $run, str_split($this->dataStr)); + if($ret < 0) + return -1; + + return $run; + } + + //---------------------------------------------------------------------- + public function eatKanji() + { + $p = 0; + + while($this->identifyMode($p) == QR_MODE_KANJI) { + $p += 2; + } + + $ret = $this->input->append(QR_MODE_KANJI, $p, str_split($this->dataStr)); + if($ret < 0) + return -1; + + return $ret; + } + + //---------------------------------------------------------------------- + public function eat8() + { + $la = QRspec::lengthIndicator(QR_MODE_AN, $this->input->getVersion()); + $ln = QRspec::lengthIndicator(QR_MODE_NUM, $this->input->getVersion()); + + $p = 1; + $dataStrLen = strlen($this->dataStr); + + while($p < $dataStrLen) { + + $mode = $this->identifyMode($p); + if($mode == QR_MODE_KANJI) { + break; + } + if($mode == QR_MODE_NUM) { + $q = $p; + while(self::isdigitat($this->dataStr, $q)) { + $q++; + } + $dif = QRinput::estimateBitsMode8($p) // + 4 + l8 + + QRinput::estimateBitsModeNum($q - $p) + 4 + $ln + - QRinput::estimateBitsMode8($q); // - 4 - l8 + if($dif < 0) { + break; + } else { + $p = $q; + } + } else if($mode == QR_MODE_AN) { + $q = $p; + while(self::isalnumat($this->dataStr, $q)) { + $q++; + } + $dif = QRinput::estimateBitsMode8($p) // + 4 + l8 + + QRinput::estimateBitsModeAn($q - $p) + 4 + $la + - QRinput::estimateBitsMode8($q); // - 4 - l8 + if($dif < 0) { + break; + } else { + $p = $q; + } + } else { + $p++; + } + } + + $run = $p; + $ret = $this->input->append(QR_MODE_8, $run, str_split($this->dataStr)); + + if($ret < 0) + return -1; + + return $run; + } + + //---------------------------------------------------------------------- + public function splitString() + { + while (strlen($this->dataStr) > 0) + { + if($this->dataStr == '') + return 0; + + $mode = $this->identifyMode(0); + + switch ($mode) { + case QR_MODE_NUM: $length = $this->eatNum(); break; + case QR_MODE_AN: $length = $this->eatAn(); break; + case QR_MODE_KANJI: + if ($mode == QR_MODE_KANJI) + $length = $this->eatKanji(); + else $length = $this->eat8(); + break; + default: $length = $this->eat8(); break; + + } + + if($length == 0) return 0; + if($length < 0) return -1; + + $this->dataStr = substr($this->dataStr, $length); + } + } + + //---------------------------------------------------------------------- + public function toUpper() + { + $stringLen = strlen($this->dataStr); + $p = 0; + + while ($p<$stringLen) { + $mode = self::identifyMode(substr($this->dataStr, $p)); + if($mode == QR_MODE_KANJI) { + $p += 2; + } else { + if (ord($this->dataStr[$p]) >= ord('a') && ord($this->dataStr[$p]) <= ord('z')) { + $this->dataStr[$p] = chr(ord($this->dataStr[$p]) - 32); + } + $p++; + } + } + + return $this->dataStr; + } + + //---------------------------------------------------------------------- + public static function splitStringToQRinput($string, QRinput $input, $modeHint, $casesensitive = true) + { + if(is_null($string) || $string == '\0' || $string == '') { + throw new Exception('empty string!!!'); + } + + $split = new QRsplit($string, $input, $modeHint); + + if(!$casesensitive) + $split->toUpper(); + + return $split->splitString(); + } + } + + + +//---- qrrscode.php ----------------------------- + + + + +/* + * PHP QR Code encoder + * + * Reed-Solomon error correction support + * + * Copyright (C) 2002, 2003, 2004, 2006 Phil Karn, KA9Q + * (libfec is released under the GNU Lesser General Public License.) + * + * Based on libqrencode C library distributed under LGPL 2.1 + * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + class QRrsItem { + + public $mm; // Bits per symbol + public $nn; // Symbols per block (= (1<= $this->nn) { + $x -= $this->nn; + $x = ($x >> $this->mm) + ($x & $this->nn); + } + + return $x; + } + + //---------------------------------------------------------------------- + public static function init_rs_char($symsize, $gfpoly, $fcr, $prim, $nroots, $pad) + { + // Common code for intializing a Reed-Solomon control block (char or int symbols) + // Copyright 2004 Phil Karn, KA9Q + // May be used under the terms of the GNU Lesser General Public License (LGPL) + + $rs = null; + + // Check parameter ranges + if($symsize < 0 || $symsize > 8) return $rs; + if($fcr < 0 || $fcr >= (1<<$symsize)) return $rs; + if($prim <= 0 || $prim >= (1<<$symsize)) return $rs; + if($nroots < 0 || $nroots >= (1<<$symsize)) return $rs; // Can't have more roots than symbol values! + if($pad < 0 || $pad >= ((1<<$symsize) -1 - $nroots)) return $rs; // Too much padding + + $rs = new QRrsItem(); + $rs->mm = $symsize; + $rs->nn = (1<<$symsize)-1; + $rs->pad = $pad; + + $rs->alpha_to = array_fill(0, $rs->nn+1, 0); + $rs->index_of = array_fill(0, $rs->nn+1, 0); + + // PHP style macro replacement ;) + $NN =& $rs->nn; + $A0 =& $NN; + + // Generate Galois field lookup tables + $rs->index_of[0] = $A0; // log(zero) = -inf + $rs->alpha_to[$A0] = 0; // alpha**-inf = 0 + $sr = 1; + + for($i=0; $i<$rs->nn; $i++) { + $rs->index_of[$sr] = $i; + $rs->alpha_to[$i] = $sr; + $sr <<= 1; + if($sr & (1<<$symsize)) { + $sr ^= $gfpoly; + } + $sr &= $rs->nn; + } + + if($sr != 1){ + // field generator polynomial is not primitive! + $rs = NULL; + return $rs; + } + + /* Form RS code generator polynomial from its roots */ + $rs->genpoly = array_fill(0, $nroots+1, 0); + + $rs->fcr = $fcr; + $rs->prim = $prim; + $rs->nroots = $nroots; + $rs->gfpoly = $gfpoly; + + /* Find prim-th root of 1, used in decoding */ + for($iprim=1;($iprim % $prim) != 0;$iprim += $rs->nn) + ; // intentional empty-body loop! + + $rs->iprim = (int)($iprim / $prim); + $rs->genpoly[0] = 1; + + for ($i = 0,$root=$fcr*$prim; $i < $nroots; $i++, $root += $prim) { + $rs->genpoly[$i+1] = 1; + + // Multiply rs->genpoly[] by @**(root + x) + for ($j = $i; $j > 0; $j--) { + if ($rs->genpoly[$j] != 0) { + $rs->genpoly[$j] = $rs->genpoly[$j-1] ^ $rs->alpha_to[$rs->modnn($rs->index_of[$rs->genpoly[$j]] + $root)]; + } else { + $rs->genpoly[$j] = $rs->genpoly[$j-1]; + } + } + // rs->genpoly[0] can never be zero + $rs->genpoly[0] = $rs->alpha_to[$rs->modnn($rs->index_of[$rs->genpoly[0]] + $root)]; + } + + // convert rs->genpoly[] to index form for quicker encoding + for ($i = 0; $i <= $nroots; $i++) + $rs->genpoly[$i] = $rs->index_of[$rs->genpoly[$i]]; + + return $rs; + } + + //---------------------------------------------------------------------- + public function encode_rs_char($data, &$parity) + { + $MM =& $this->mm; + $NN =& $this->nn; + $ALPHA_TO =& $this->alpha_to; + $INDEX_OF =& $this->index_of; + $GENPOLY =& $this->genpoly; + $NROOTS =& $this->nroots; + $FCR =& $this->fcr; + $PRIM =& $this->prim; + $IPRIM =& $this->iprim; + $PAD =& $this->pad; + $A0 =& $NN; + + $parity = array_fill(0, $NROOTS, 0); + + for($i=0; $i< ($NN-$NROOTS-$PAD); $i++) { + + $feedback = $INDEX_OF[$data[$i] ^ $parity[0]]; + if($feedback != $A0) { + // feedback term is non-zero + + // This line is unnecessary when GENPOLY[NROOTS] is unity, as it must + // always be for the polynomials constructed by init_rs() + $feedback = $this->modnn($NN - $GENPOLY[$NROOTS] + $feedback); + + for($j=1;$j<$NROOTS;$j++) { + $parity[$j] ^= $ALPHA_TO[$this->modnn($feedback + $GENPOLY[$NROOTS-$j])]; + } + } + + // Shift + array_shift($parity); + if($feedback != $A0) { + array_push($parity, $ALPHA_TO[$this->modnn($feedback + $GENPOLY[0])]); + } else { + array_push($parity, 0); + } + } + } + } + + //########################################################################## + + class QRrs { + + public static $items = array(); + + //---------------------------------------------------------------------- + public static function init_rs($symsize, $gfpoly, $fcr, $prim, $nroots, $pad) + { + foreach(self::$items as $rs) { + if($rs->pad != $pad) continue; + if($rs->nroots != $nroots) continue; + if($rs->mm != $symsize) continue; + if($rs->gfpoly != $gfpoly) continue; + if($rs->fcr != $fcr) continue; + if($rs->prim != $prim) continue; + + return $rs; + } + + $rs = QRrsItem::init_rs_char($symsize, $gfpoly, $fcr, $prim, $nroots, $pad); + array_unshift(self::$items, $rs); + + return $rs; + } + } + + + +//---- qrmask.php ----------------------------- + + + + +/* + * PHP QR Code encoder + * + * Masking + * + * Based on libqrencode C library distributed under LGPL 2.1 + * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + define('N1', 3); + define('N2', 3); + define('N3', 40); + define('N4', 10); + + class QRmask { + + public $runLength = array(); + + //---------------------------------------------------------------------- + public function __construct() + { + $this->runLength = array_fill(0, QRSPEC_WIDTH_MAX + 1, 0); + } + + //---------------------------------------------------------------------- + public function writeFormatInformation($width, &$frame, $mask, $level) + { + $blacks = 0; + $format = QRspec::getFormatInfo($mask, $level); + + for($i=0; $i<8; $i++) { + if($format & 1) { + $blacks += 2; + $v = 0x85; + } else { + $v = 0x84; + } + + $frame[8][$width - 1 - $i] = chr($v); + if($i < 6) { + $frame[$i][8] = chr($v); + } else { + $frame[$i + 1][8] = chr($v); + } + $format = $format >> 1; + } + + for($i=0; $i<7; $i++) { + if($format & 1) { + $blacks += 2; + $v = 0x85; + } else { + $v = 0x84; + } + + $frame[$width - 7 + $i][8] = chr($v); + if($i == 0) { + $frame[8][7] = chr($v); + } else { + $frame[8][6 - $i] = chr($v); + } + + $format = $format >> 1; + } + + return $blacks; + } + + //---------------------------------------------------------------------- + public function mask0($x, $y) { return ($x+$y)&1; } + public function mask1($x, $y) { return ($y&1); } + public function mask2($x, $y) { return ($x%3); } + public function mask3($x, $y) { return ($x+$y)%3; } + public function mask4($x, $y) { return (((int)($y/2))+((int)($x/3)))&1; } + public function mask5($x, $y) { return (($x*$y)&1)+($x*$y)%3; } + public function mask6($x, $y) { return ((($x*$y)&1)+($x*$y)%3)&1; } + public function mask7($x, $y) { return ((($x*$y)%3)+(($x+$y)&1))&1; } + + //---------------------------------------------------------------------- + private function generateMaskNo($maskNo, $width, $frame) + { + $bitMask = array_fill(0, $width, array_fill(0, $width, 0)); + + for($y=0; $y<$width; $y++) { + for($x=0; $x<$width; $x++) { + if(ord($frame[$y][$x]) & 0x80) { + $bitMask[$y][$x] = 0; + } else { + $maskFunc = call_user_func(array($this, 'mask'.$maskNo), $x, $y); + $bitMask[$y][$x] = ($maskFunc == 0)?1:0; + } + + } + } + + return $bitMask; + } + + //---------------------------------------------------------------------- + public static function serial($bitFrame) + { + $codeArr = array(); + + foreach ($bitFrame as $line) + $codeArr[] = join('', $line); + + return gzcompress(join("\n", $codeArr), 9); + } + + //---------------------------------------------------------------------- + public static function unserial($code) + { + $codeArr = array(); + + $codeLines = explode("\n", gzuncompress($code)); + foreach ($codeLines as $line) + $codeArr[] = str_split($line); + + return $codeArr; + } + + //---------------------------------------------------------------------- + public function makeMaskNo($maskNo, $width, $s, &$d, $maskGenOnly = false) + { + $b = 0; + $bitMask = array(); + + $fileName = QR_CACHE_DIR.'mask_'.$maskNo.DIRECTORY_SEPARATOR.'mask_'.$width.'_'.$maskNo.'.dat'; + + if (QR_CACHEABLE) { + if (file_exists($fileName)) { + $bitMask = self::unserial(file_get_contents($fileName)); + } else { + $bitMask = $this->generateMaskNo($maskNo, $width, $s, $d); + if (!file_exists(QR_CACHE_DIR.'mask_'.$maskNo)) + mkdir(QR_CACHE_DIR.'mask_'.$maskNo); + file_put_contents($fileName, self::serial($bitMask)); + } + } else { + $bitMask = $this->generateMaskNo($maskNo, $width, $s, $d); + } + + if ($maskGenOnly) + return; + + $d = $s; + + for($y=0; $y<$width; $y++) { + for($x=0; $x<$width; $x++) { + if($bitMask[$y][$x] == 1) { + $d[$y][$x] = chr(ord($s[$y][$x]) ^ (int)$bitMask[$y][$x]); + } + $b += (int)(ord($d[$y][$x]) & 1); + } + } + + return $b; + } + + //---------------------------------------------------------------------- + public function makeMask($width, $frame, $maskNo, $level) + { + $masked = array_fill(0, $width, str_repeat("\0", $width)); + $this->makeMaskNo($maskNo, $width, $frame, $masked); + $this->writeFormatInformation($width, $masked, $maskNo, $level); + + return $masked; + } + + //---------------------------------------------------------------------- + public function calcN1N3($length) + { + $demerit = 0; + + for($i=0; $i<$length; $i++) { + + if($this->runLength[$i] >= 5) { + $demerit += (N1 + ($this->runLength[$i] - 5)); + } + if($i & 1) { + if(($i >= 3) && ($i < ($length-2)) && ($this->runLength[$i] % 3 == 0)) { + $fact = (int)($this->runLength[$i] / 3); + if(($this->runLength[$i-2] == $fact) && + ($this->runLength[$i-1] == $fact) && + ($this->runLength[$i+1] == $fact) && + ($this->runLength[$i+2] == $fact)) { + if(($this->runLength[$i-3] < 0) || ($this->runLength[$i-3] >= (4 * $fact))) { + $demerit += N3; + } else if((($i+3) >= $length) || ($this->runLength[$i+3] >= (4 * $fact))) { + $demerit += N3; + } + } + } + } + } + return $demerit; + } + + //---------------------------------------------------------------------- + public function evaluateSymbol($width, $frame) + { + $head = 0; + $demerit = 0; + + for($y=0; $y<$width; $y++) { + $head = 0; + $this->runLength[0] = 1; + + $frameY = $frame[$y]; + + if ($y>0) + $frameYM = $frame[$y-1]; + + for($x=0; $x<$width; $x++) { + if(($x > 0) && ($y > 0)) { + $b22 = ord($frameY[$x]) & ord($frameY[$x-1]) & ord($frameYM[$x]) & ord($frameYM[$x-1]); + $w22 = ord($frameY[$x]) | ord($frameY[$x-1]) | ord($frameYM[$x]) | ord($frameYM[$x-1]); + + if(($b22 | ($w22 ^ 1))&1) { + $demerit += N2; + } + } + if(($x == 0) && (ord($frameY[$x]) & 1)) { + $this->runLength[0] = -1; + $head = 1; + $this->runLength[$head] = 1; + } else if($x > 0) { + if((ord($frameY[$x]) ^ ord($frameY[$x-1])) & 1) { + $head++; + $this->runLength[$head] = 1; + } else { + $this->runLength[$head]++; + } + } + } + + $demerit += $this->calcN1N3($head+1); + } + + for($x=0; $x<$width; $x++) { + $head = 0; + $this->runLength[0] = 1; + + for($y=0; $y<$width; $y++) { + if($y == 0 && (ord($frame[$y][$x]) & 1)) { + $this->runLength[0] = -1; + $head = 1; + $this->runLength[$head] = 1; + } else if($y > 0) { + if((ord($frame[$y][$x]) ^ ord($frame[$y-1][$x])) & 1) { + $head++; + $this->runLength[$head] = 1; + } else { + $this->runLength[$head]++; + } + } + } + + $demerit += $this->calcN1N3($head+1); + } + + return $demerit; + } + + + //---------------------------------------------------------------------- + public function mask($width, $frame, $level) + { + $minDemerit = PHP_INT_MAX; + $bestMaskNum = 0; + $bestMask = array(); + + $checked_masks = array(0,1,2,3,4,5,6,7); + + if (QR_FIND_FROM_RANDOM !== false) { + + $howManuOut = 8-(QR_FIND_FROM_RANDOM % 9); + for ($i = 0; $i < $howManuOut; $i++) { + $remPos = rand (0, count($checked_masks)-1); + unset($checked_masks[$remPos]); + $checked_masks = array_values($checked_masks); + } + + } + + $bestMask = $frame; + + foreach($checked_masks as $i) { + $mask = array_fill(0, $width, str_repeat("\0", $width)); + + $demerit = 0; + $blacks = 0; + $blacks = $this->makeMaskNo($i, $width, $frame, $mask); + $blacks += $this->writeFormatInformation($width, $mask, $i, $level); + $blacks = (int)(100 * $blacks / ($width * $width)); + $demerit = (int)((int)(abs($blacks - 50) / 5) * N4); + $demerit += $this->evaluateSymbol($width, $mask); + + if($demerit < $minDemerit) { + $minDemerit = $demerit; + $bestMask = $mask; + $bestMaskNum = $i; + } + } + + return $bestMask; + } + + //---------------------------------------------------------------------- + } + + + + +//---- qrencode.php ----------------------------- + + + + +/* + * PHP QR Code encoder + * + * Main encoder classes. + * + * Based on libqrencode C library distributed under LGPL 2.1 + * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + class QRrsblock { + public $dataLength; + public $data = array(); + public $eccLength; + public $ecc = array(); + + public function __construct($dl, $data, $el, &$ecc, QRrsItem $rs) + { + $rs->encode_rs_char($data, $ecc); + + $this->dataLength = $dl; + $this->data = $data; + $this->eccLength = $el; + $this->ecc = $ecc; + } + }; + + //########################################################################## + + class QRrawcode { + public $version; + public $datacode = array(); + public $ecccode = array(); + public $blocks; + public $rsblocks = array(); //of RSblock + public $count; + public $dataLength; + public $eccLength; + public $b1; + + //---------------------------------------------------------------------- + public function __construct(QRinput $input) + { + $spec = array(0,0,0,0,0); + + $this->datacode = $input->getByteStream(); + if(is_null($this->datacode)) { + throw new Exception('null imput string'); + } + + QRspec::getEccSpec($input->getVersion(), $input->getErrorCorrectionLevel(), $spec); + + $this->version = $input->getVersion(); + $this->b1 = QRspec::rsBlockNum1($spec); + $this->dataLength = QRspec::rsDataLength($spec); + $this->eccLength = QRspec::rsEccLength($spec); + $this->ecccode = array_fill(0, $this->eccLength, 0); + $this->blocks = QRspec::rsBlockNum($spec); + + $ret = $this->init($spec); + if($ret < 0) { + throw new Exception('block alloc error'); + return null; + } + + $this->count = 0; + } + + //---------------------------------------------------------------------- + public function init(array $spec) + { + $dl = QRspec::rsDataCodes1($spec); + $el = QRspec::rsEccCodes1($spec); + $rs = QRrs::init_rs(8, 0x11d, 0, 1, $el, 255 - $dl - $el); + + + $blockNo = 0; + $dataPos = 0; + $eccPos = 0; + for($i=0; $iecccode,$eccPos); + $this->rsblocks[$blockNo] = new QRrsblock($dl, array_slice($this->datacode, $dataPos), $el, $ecc, $rs); + $this->ecccode = array_merge(array_slice($this->ecccode,0, $eccPos), $ecc); + + $dataPos += $dl; + $eccPos += $el; + $blockNo++; + } + + if(QRspec::rsBlockNum2($spec) == 0) + return 0; + + $dl = QRspec::rsDataCodes2($spec); + $el = QRspec::rsEccCodes2($spec); + $rs = QRrs::init_rs(8, 0x11d, 0, 1, $el, 255 - $dl - $el); + + if($rs == NULL) return -1; + + for($i=0; $iecccode,$eccPos); + $this->rsblocks[$blockNo] = new QRrsblock($dl, array_slice($this->datacode, $dataPos), $el, $ecc, $rs); + $this->ecccode = array_merge(array_slice($this->ecccode,0, $eccPos), $ecc); + + $dataPos += $dl; + $eccPos += $el; + $blockNo++; + } + + return 0; + } + + //---------------------------------------------------------------------- + public function getCode() + { + $ret; + + if($this->count < $this->dataLength) { + $row = $this->count % $this->blocks; + $col = $this->count / $this->blocks; + if($col >= $this->rsblocks[0]->dataLength) { + $row += $this->b1; + } + $ret = $this->rsblocks[$row]->data[$col]; + } else if($this->count < $this->dataLength + $this->eccLength) { + $row = ($this->count - $this->dataLength) % $this->blocks; + $col = ($this->count - $this->dataLength) / $this->blocks; + $ret = $this->rsblocks[$row]->ecc[$col]; + } else { + return 0; + } + $this->count++; + + return $ret; + } + } + + //########################################################################## + + class QRcode { + + public $version; + public $width; + public $data; + + //---------------------------------------------------------------------- + public function encodeMask(QRinput $input, $mask) + { + if($input->getVersion() < 0 || $input->getVersion() > QRSPEC_VERSION_MAX) { + throw new Exception('wrong version'); + } + if($input->getErrorCorrectionLevel() > QR_ECLEVEL_H) { + throw new Exception('wrong level'); + } + + $raw = new QRrawcode($input); + + QRtools::markTime('after_raw'); + + $version = $raw->version; + $width = QRspec::getWidth($version); + $frame = QRspec::newFrame($version); + + $filler = new FrameFiller($width, $frame); + if(is_null($filler)) { + return NULL; + } + + // inteleaved data and ecc codes + for($i=0; $i<$raw->dataLength + $raw->eccLength; $i++) { + $code = $raw->getCode(); + $bit = 0x80; + for($j=0; $j<8; $j++) { + $addr = $filler->next(); + $filler->setFrameAt($addr, 0x02 | (($bit & $code) != 0)); + $bit = $bit >> 1; + } + } + + QRtools::markTime('after_filler'); + + unset($raw); + + // remainder bits + $j = QRspec::getRemainder($version); + for($i=0; $i<$j; $i++) { + $addr = $filler->next(); + $filler->setFrameAt($addr, 0x02); + } + + $frame = $filler->frame; + unset($filler); + + + // masking + $maskObj = new QRmask(); + if($mask < 0) { + + if (QR_FIND_BEST_MASK) { + $masked = $maskObj->mask($width, $frame, $input->getErrorCorrectionLevel()); + } else { + $masked = $maskObj->makeMask($width, $frame, (intval(QR_DEFAULT_MASK) % 8), $input->getErrorCorrectionLevel()); + } + } else { + $masked = $maskObj->makeMask($width, $frame, $mask, $input->getErrorCorrectionLevel()); + } + + if($masked == NULL) { + return NULL; + } + + QRtools::markTime('after_mask'); + + $this->version = $version; + $this->width = $width; + $this->data = $masked; + + return $this; + } + + //---------------------------------------------------------------------- + public function encodeInput(QRinput $input) + { + return $this->encodeMask($input, -1); + } + + //---------------------------------------------------------------------- + public function encodeString8bit($string, $version, $level) + { + if($string == NULL) { + throw new Exception('empty string!'); + return NULL; + } + + $input = new QRinput($version, $level); + if($input == NULL) return NULL; + + $ret = $input->append($input, QR_MODE_8, strlen($string), str_split($string)); + if($ret < 0) { + unset($input); + return NULL; + } + return $this->encodeInput($input); + } + + //---------------------------------------------------------------------- + public function encodeString($string, $version, $level, $hint, $casesensitive) + { + + if($hint != QR_MODE_8 && $hint != QR_MODE_KANJI) { + throw new Exception('bad hint'); + return NULL; + } + + $input = new QRinput($version, $level); + if($input == NULL) return NULL; + + $ret = QRsplit::splitStringToQRinput($string, $input, $hint, $casesensitive); + if($ret < 0) { + return NULL; + } + + return $this->encodeInput($input); + } + + //---------------------------------------------------------------------- + public static function png($text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4, $saveandprint=false, $back_color = 0xFFFFFF, $fore_color = 0x000000) + { + $enc = QRencode::factory($level, $size, $margin, $back_color, $fore_color); + return $enc->encodePNG($text, $outfile, $saveandprint=false); + } + + //---------------------------------------------------------------------- + public static function text($text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4) + { + $enc = QRencode::factory($level, $size, $margin); + return $enc->encode($text, $outfile); + } + + //---------------------------------------------------------------------- + public static function eps($text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4, $saveandprint=false, $back_color = 0xFFFFFF, $fore_color = 0x000000, $cmyk = false) + { + $enc = QRencode::factory($level, $size, $margin, $back_color, $fore_color, $cmyk); + return $enc->encodeEPS($text, $outfile, $saveandprint=false); + } + + //---------------------------------------------------------------------- + public static function svg($text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4, $saveandprint=false, $back_color = 0xFFFFFF, $fore_color = 0x000000) + { + $enc = QRencode::factory($level, $size, $margin, $back_color, $fore_color); + return $enc->encodeSVG($text, $outfile, $saveandprint=false); + } + + //---------------------------------------------------------------------- + public static function raw($text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4) + { + $enc = QRencode::factory($level, $size, $margin); + return $enc->encodeRAW($text, $outfile); + } + } + + //########################################################################## + + class FrameFiller { + + public $width; + public $frame; + public $x; + public $y; + public $dir; + public $bit; + + //---------------------------------------------------------------------- + public function __construct($width, &$frame) + { + $this->width = $width; + $this->frame = $frame; + $this->x = $width - 1; + $this->y = $width - 1; + $this->dir = -1; + $this->bit = -1; + } + + //---------------------------------------------------------------------- + public function setFrameAt($at, $val) + { + $this->frame[$at['y']][$at['x']] = chr($val); + } + + //---------------------------------------------------------------------- + public function getFrameAt($at) + { + return ord($this->frame[$at['y']][$at['x']]); + } + + //---------------------------------------------------------------------- + public function next() + { + do { + + if($this->bit == -1) { + $this->bit = 0; + return array('x'=>$this->x, 'y'=>$this->y); + } + + $x = $this->x; + $y = $this->y; + $w = $this->width; + + if($this->bit == 0) { + $x--; + $this->bit++; + } else { + $x++; + $y += $this->dir; + $this->bit--; + } + + if($this->dir < 0) { + if($y < 0) { + $y = 0; + $x -= 2; + $this->dir = 1; + if($x == 6) { + $x--; + $y = 9; + } + } + } else { + if($y == $w) { + $y = $w - 1; + $x -= 2; + $this->dir = -1; + if($x == 6) { + $x--; + $y -= 8; + } + } + } + if($x < 0 || $y < 0) return null; + + $this->x = $x; + $this->y = $y; + + } while(ord($this->frame[$y][$x]) & 0x80); + + return array('x'=>$x, 'y'=>$y); + } + + } ; + + //########################################################################## + + class QRencode { + + public $casesensitive = true; + public $eightbit = false; + + public $version = 0; + public $size = 3; + public $margin = 4; + public $back_color = 0xFFFFFF; + public $fore_color = 0x000000; + + public $structured = 0; // not supported yet + + public $level = QR_ECLEVEL_L; + public $hint = QR_MODE_8; + + //---------------------------------------------------------------------- + public static function factory($level = QR_ECLEVEL_L, $size = 3, $margin = 4, $back_color = 0xFFFFFF, $fore_color = 0x000000, $cmyk = false) + { + $enc = new QRencode(); + $enc->size = $size; + $enc->margin = $margin; + $enc->fore_color = $fore_color; + $enc->back_color = $back_color; + $enc->cmyk = $cmyk; + + switch ($level.'') { + case '0': + case '1': + case '2': + case '3': + $enc->level = $level; + break; + case 'l': + case 'L': + $enc->level = QR_ECLEVEL_L; + break; + case 'm': + case 'M': + $enc->level = QR_ECLEVEL_M; + break; + case 'q': + case 'Q': + $enc->level = QR_ECLEVEL_Q; + break; + case 'h': + case 'H': + $enc->level = QR_ECLEVEL_H; + break; + } + + return $enc; + } + + //---------------------------------------------------------------------- + public function encodeRAW($intext, $outfile = false) + { + $code = new QRcode(); + + if($this->eightbit) { + $code->encodeString8bit($intext, $this->version, $this->level); + } else { + $code->encodeString($intext, $this->version, $this->level, $this->hint, $this->casesensitive); + } + + return $code->data; + } + + //---------------------------------------------------------------------- + public function encode($intext, $outfile = false) + { + $code = new QRcode(); + + if($this->eightbit) { + $code->encodeString8bit($intext, $this->version, $this->level); + } else { + $code->encodeString($intext, $this->version, $this->level, $this->hint, $this->casesensitive); + } + + QRtools::markTime('after_encode'); + + if ($outfile!== false) { + file_put_contents($outfile, join("\n", QRtools::binarize($code->data))); + } else { + return QRtools::binarize($code->data); + } + } + + //---------------------------------------------------------------------- + public function encodePNG($intext, $outfile = false,$saveandprint=false) + { + try { + + ob_start(); + $tab = $this->encode($intext); + $err = ob_get_contents(); + ob_end_clean(); + + if ($err != '') + QRtools::log($outfile, $err); + + $maxSize = (int)(QR_PNG_MAXIMUM_SIZE / (count($tab)+2*$this->margin)); + + QRimage::png($tab, $outfile, min(max(1, $this->size), $maxSize), $this->margin,$saveandprint, $this->back_color, $this->fore_color); + + } catch (Exception $e) { + + QRtools::log($outfile, $e->getMessage()); + + } + } + + //---------------------------------------------------------------------- + public function encodeEPS($intext, $outfile = false,$saveandprint=false) + { + try { + + ob_start(); + $tab = $this->encode($intext); + $err = ob_get_contents(); + ob_end_clean(); + + if ($err != '') + QRtools::log($outfile, $err); + + $maxSize = (int)(QR_PNG_MAXIMUM_SIZE / (count($tab)+2*$this->margin)); + + QRvect::eps($tab, $outfile, min(max(1, $this->size), $maxSize), $this->margin,$saveandprint, $this->back_color, $this->fore_color, $this->cmyk); + + } catch (Exception $e) { + + QRtools::log($outfile, $e->getMessage()); + + } + } + + //---------------------------------------------------------------------- + public function encodeSVG($intext, $outfile = false,$saveandprint=false) + { + try { + + ob_start(); + $tab = $this->encode($intext); + $err = ob_get_contents(); + ob_end_clean(); + + if ($err != '') + QRtools::log($outfile, $err); + + $maxSize = (int)(QR_PNG_MAXIMUM_SIZE / (count($tab)+2*$this->margin)); + + QRvect::svg($tab, $outfile, min(max(1, $this->size), $maxSize), $this->margin,$saveandprint, $this->back_color, $this->fore_color); + + } catch (Exception $e) { + + QRtools::log($outfile, $e->getMessage()); + + } + } + } + + + + +//---- qrvect.php ----------------------------- + + + + +/* + * PHP QR Code encoder + * + * Image output of code using GD2 + * + * PHP QR Code is distributed under LGPL 3 + * Copyright (C) 2010 Dominik Dzienia + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + define('QR_VECT', true); + + class QRvect { + + //---------------------------------------------------------------------- + public static function eps($frame, $filename = false, $pixelPerPoint = 4, $outerFrame = 4,$saveandprint=FALSE, $back_color = 0xFFFFFF, $fore_color = 0x000000, $cmyk = false) + { + $vect = self::vectEPS($frame, $pixelPerPoint, $outerFrame, $back_color, $fore_color, $cmyk); + + if ($filename === false) { + header("Content-Type: application/postscript"); + header('Content-Disposition: filename="qrcode.eps"'); + echo $vect; + } else { + if($saveandprint===TRUE){ + QRtools::save($vect, $filename); + header("Content-Type: application/postscript"); + header('Content-Disposition: filename="qrcode.eps"'); + echo $vect; + }else{ + QRtools::save($vect, $filename); + } + } + } + + + //---------------------------------------------------------------------- + private static function vectEPS($frame, $pixelPerPoint = 4, $outerFrame = 4, $back_color = 0xFFFFFF, $fore_color = 0x000000, $cmyk = false) + { + $h = count($frame); + $w = strlen($frame[0]); + + $imgW = $w + 2*$outerFrame; + $imgH = $h + 2*$outerFrame; + + if ($cmyk) + { + // convert color value into decimal eps format + $c = round((($fore_color & 0xFF000000) >> 16) / 255, 5); + $m = round((($fore_color & 0x00FF0000) >> 16) / 255, 5); + $y = round((($fore_color & 0x0000FF00) >> 8) / 255, 5); + $k = round(($fore_color & 0x000000FF) / 255, 5); + $fore_color_string = $c.' '.$m.' '.$y.' '.$k.' setcmykcolor'."\n"; + + // convert color value into decimal eps format + $c = round((($back_color & 0xFF000000) >> 16) / 255, 5); + $m = round((($back_color & 0x00FF0000) >> 16) / 255, 5); + $y = round((($back_color & 0x0000FF00) >> 8) / 255, 5); + $k = round(($back_color & 0x000000FF) / 255, 5); + $back_color_string = $c.' '.$m.' '.$y.' '.$k.' setcmykcolor'."\n"; + } + else + { + // convert a hexadecimal color code into decimal eps format (green = 0 1 0, blue = 0 0 1, ...) + $r = round((($fore_color & 0xFF0000) >> 16) / 255, 5); + $b = round((($fore_color & 0x00FF00) >> 8) / 255, 5); + $g = round(($fore_color & 0x0000FF) / 255, 5); + $fore_color_string = $r.' '.$b.' '.$g.' setrgbcolor'."\n"; + + // convert a hexadecimal color code into decimal eps format (green = 0 1 0, blue = 0 0 1, ...) + $r = round((($back_color & 0xFF0000) >> 16) / 255, 5); + $b = round((($back_color & 0x00FF00) >> 8) / 255, 5); + $g = round(($back_color & 0x0000FF) / 255, 5); + $back_color_string = $r.' '.$b.' '.$g.' setrgbcolor'."\n"; + } + + $output = + '%!PS-Adobe EPSF-3.0'."\n". + '%%Creator: PHPQrcodeLib'."\n". + '%%Title: QRcode'."\n". + '%%CreationDate: '.date('Y-m-d')."\n". + '%%DocumentData: Clean7Bit'."\n". + '%%LanguageLevel: 2'."\n". + '%%Pages: 1'."\n". + '%%BoundingBox: 0 0 '.$imgW * $pixelPerPoint.' '.$imgH * $pixelPerPoint."\n"; + + // set the scale + $output .= $pixelPerPoint.' '.$pixelPerPoint.' scale'."\n"; + // position the center of the coordinate system + + $output .= $outerFrame.' '.$outerFrame.' translate'."\n"; + + + + + // redefine the 'rectfill' operator to shorten the syntax + $output .= '/F { rectfill } def'."\n"; + + // set the symbol color + $output .= $back_color_string; + $output .= '-'.$outerFrame.' -'.$outerFrame.' '.($w + 2*$outerFrame).' '.($h + 2*$outerFrame).' F'."\n"; + + + // set the symbol color + $output .= $fore_color_string; + + // Convert the matrix into pixels + + for($i=0; $i<$h; $i++) { + for($j=0; $j<$w; $j++) { + if( $frame[$i][$j] == '1') { + $y = $h - 1 - $i; + $x = $j; + $output .= $x.' '.$y.' 1 1 F'."\n"; + } + } + } + + + $output .='%%EOF'; + + return $output; + } + + //---------------------------------------------------------------------- + public static function svg($frame, $filename = false, $pixelPerPoint = 4, $outerFrame = 4,$saveandprint=FALSE, $back_color, $fore_color) + { + $vect = self::vectSVG($frame, $pixelPerPoint, $outerFrame, $back_color, $fore_color); + + if ($filename === false) { + header("Content-Type: image/svg+xml"); + //header('Content-Disposition: attachment, filename="qrcode.svg"'); + echo $vect; + } else { + if($saveandprint===TRUE){ + QRtools::save($vect, $filename); + header("Content-Type: image/svg+xml"); + //header('Content-Disposition: filename="'.$filename.'"'); + echo $vect; + }else{ + QRtools::save($vect, $filename); + } + } + } + + + //---------------------------------------------------------------------- + private static function vectSVG($frame, $pixelPerPoint = 4, $outerFrame = 4, $back_color = 0xFFFFFF, $fore_color = 0x000000) + { + $h = count($frame); + $w = strlen($frame[0]); + + $imgW = $w + 2*$outerFrame; + $imgH = $h + 2*$outerFrame; + + + $output = + ''."\n". + ''."\n". + ''."\n"; + + $output = + ''."\n". + ''."\n". + ''."\n". + ''."\n"; + + if(!empty($back_color)) { + $backgroundcolor = str_pad(dechex($back_color), 6, "0", STR_PAD_LEFT); + $output .= ''."\n"; + } + + $output .= + ''."\n". + ''."\n". + ''."\n". + ''."\n"; + + + // Convert the matrix into pixels + + for($i=0; $i<$h; $i++) { + for($j=0; $j<$w; $j++) { + if( $frame[$i][$j] == '1') { + $y = ($i + $outerFrame) * $pixelPerPoint; + $x = ($j + $outerFrame) * $pixelPerPoint; + $output .= ''."\n"; + } + } + } + $output .= + ''."\n". + ''; + + return $output; + } + } + + + + diff --git a/style.less b/style.less index d7fbbf2..dc27feb 100755 --- a/style.less +++ b/style.less @@ -1,34 +1,9 @@ -/* - Code publié sous licence Apache 2.0 - https://code.antopie.org/miraty/qr -*/ -@font-face { - font-family: "ubuntu-dl"; - src: url('ubuntu-dl.ttf'); +* { + font-family: "Ubuntu", sans-serif; } -#redondance, #marge, #texte, #taille { - border: 2px @bordure solid; - border-radius: 7px; - font-size: 20px; - padding-left: 10px; - font-weight: normal; - color: @texteForm; - margin-top: 8px; - transition: border 0.2s linear; -} - -#redondance, #taille, #marge { - background-color: @fondChamp; - width: 250px; - height: 40px; -} - -#texte { - background-color: @fondChampTexte; - color: @texteForm; - padding-top: 6px; - width: 500px; +h1 { + font-weight: 700; } #menusDeroulants { @@ -47,30 +22,14 @@ text-align: center; } -footer { - position: absolute; +.topRight { + position: fixed; top: 5px; right: 5px; } -input[type=submit], .bouton { - background-color: @fondChamp; - border: 2px @bordure solid; - color: @texteForm; +.bouton { padding: 3px 10px 3px 10px; - border-radius: 3px; - font-size: 1.2em; - text-decoration: none; - display: inline; - transition: border 0.2s linear; -} - -#redondance:hover, #marge:hover, #texte:hover, #taille:hover, input[type=submit]:hover, .bouton:hover { - border: 2px @bordureHover solid; -} - -#texte:focus, input[type=submit]:focus, .bouton:focus { - border: 2px @bordureFocus solid; } form { @@ -81,17 +40,16 @@ form { margin: 0px; } -html { +html, body { width: 500px; margin-left: auto; margin-right: auto; background-color: @fond; color: @texte; - font-family: "ubuntu", "ubuntu-dl"; font-weight: normal; font-size: 1em; - & a { + & h1 { color: @texte; text-decoration: none; } @@ -100,26 +58,31 @@ html { label { font-size: 20px; - margin-bottom: 100px; + height: 60px; } - -.lienCodeSource { +.topRight { color: @texteLienCodeSource; font-size: 12px; margin-bottom: -20px; text-align: right; + transition: color 0.2s; + + &:hover { + color: lighten(@texteLienCodeSource, 10%); + } } header { text-align: center; padding: 0px; margin: 0px; - + height: 48px; } header > a { display: flex; + flex-direction: row; } h1, #logo { @@ -127,7 +90,6 @@ h1, #logo { font-size: 35px; } - .param { padding: 10px; padding-left: 0px; @@ -155,21 +117,136 @@ h1, #logo { #logo { width: 48px; + height: 48px; } -::placeholder { - color: fadeout(@texte, 50%); +.conteneurInputColor { + display: flex; + flex-direction: row; + justify-content: center; + width: 250px; +} + +::selection { + color: @fond; + background-color: @texte; +} + +:link { + text-decoration: none; +} + +#couleurs { + display: flex; + flex-direction: row; + justify-content: space-between; + text-align: center; +} + +.info { + color: grey; + position: absolute; + bottom: 20px; + right: 20px; + width: 300px; + + & a { + color: grey; + } + + &:hover, &:hover a { + color: @texte; + } + +} + +/* Inputs */ + +#redondance, #marge, #texte, #taille, input[type=color], input[type=submit], .bouton { + border: 2px @bordure solid; + border-radius: 10px; + font-size: 20px; + padding-left: 10px; + font-weight: normal; + color: @texteForm; + transition: border 0.1s linear; + background-color: @fondChamp; + margin-top: 8px; + + &:hover { + border: 2px @bordureHover solid; + } + + &:focus { + border: 2px @bordureFocus solid; + } +} + +#redondance, #taille, #marge { + background-color: @fondChamp; + width: 250px; + height: 40px; +} + +#texte { + background-color: @fondChampTexte; + color: @texteForm; + padding-top: 6px; + width: 500px; +} + +#redondance:hover, #marge:hover, #texte:hover, #taille:hover, input[type=submit]:hover, .bouton:hover { + +} + +#texte:focus, input[type=submit]:focus, .bouton:focus { + +} + +#texte::placeholder { + color: lighten(@fondChampTexte, 40%); opacity: 1; - font-family: "ubuntu", "ubuntu-dl"; + font-family: "Ubuntu"; font-weight: normal; font-size: 1em; } +input[type=color] { + height: 50px; + width: 50px; + padding: 5px; + background-color: @fondChamp; + border: 2px @bordure solid; +} + +input[type=color]:hover { + border: 2px @bordureHover solid; +} + +input[type=color]:focus { + border: 2px @bordureFocus solid; +} + /* Infobulle */ +svg { + width: 18px; + height: 18px; +} + +.boutonAide { + height: 18px; + width: 18px; + color: @texte; + cursor: help; +} + +.contenuAide { + max-width: 500px; +} + .conteneurAide { color: #ccc; - text-shadow: 0 -1px 0 black; } .conteneurAide:hover, .conteneurAide:focus { diff --git a/temp/6MBFnPdqJOHR6SrkUx5hTlzXLuNkt96TFSTtbmnLkyyuvB8Feu.png b/temp/6MBFnPdqJOHR6SrkUx5hTlzXLuNkt96TFSTtbmnLkyyuvB8Feu.png new file mode 100644 index 0000000..897d0f4 Binary files /dev/null and b/temp/6MBFnPdqJOHR6SrkUx5hTlzXLuNkt96TFSTtbmnLkyyuvB8Feu.png differ diff --git a/temp/UoD3X0SUSLDF4K8V67igQozAaw7fOTStC8IO5gcMLd3OyW1r0b.png b/temp/UoD3X0SUSLDF4K8V67igQozAaw7fOTStC8IO5gcMLd3OyW1r0b.png old mode 100644 new mode 100755 diff --git a/themes/defaut.less b/themes/defaut.less deleted file mode 100755 index e69f154..0000000 --- a/themes/defaut.less +++ /dev/null @@ -1,10 +0,0 @@ -@import "../style.less"; -@fond: #2D2F34; -@fondChamp: #31363B; -@fondChampTexte : #232629; -@bordure: #5f5f5f; -@bordureHover: #808080; -@bordureFocus: #b6b6b6; -@texte: white; -@texteForm: white; -@texteLienCodeSource: #868686; diff --git a/themes/defaut/defaut.php b/themes/defaut/defaut.php new file mode 100644 index 0000000..234c4c3 --- /dev/null +++ b/themes/defaut/defaut.php @@ -0,0 +1,17 @@ + "#2D2F34", + "fondChamp" => "#31363B", + "fondChampTexte" => "#232629", + "bordure" => "#5f5f5f", + "bordureHover" => "#808080", + "bordureFocus" => "#b6b6b6", + "texte" => "white", + "texteForm" => "white", + "texteLienCodeSource" => "#868686" +); // Définit les couleurs du thème + +?> diff --git a/themes/defaut/favicons/128.png b/themes/defaut/favicons/128.png new file mode 100755 index 0000000..b939267 Binary files /dev/null and b/themes/defaut/favicons/128.png differ diff --git a/themes/defaut/favicons/16.png b/themes/defaut/favicons/16.png new file mode 100755 index 0000000..13874e0 Binary files /dev/null and b/themes/defaut/favicons/16.png differ diff --git a/themes/defaut/favicons/192.png b/themes/defaut/favicons/192.png new file mode 100755 index 0000000..bb0978a Binary files /dev/null and b/themes/defaut/favicons/192.png differ diff --git a/themes/defaut/favicons/256.png b/themes/defaut/favicons/256.png new file mode 100755 index 0000000..32c46e6 Binary files /dev/null and b/themes/defaut/favicons/256.png differ diff --git a/themes/defaut/favicons/32.png b/themes/defaut/favicons/32.png new file mode 100755 index 0000000..c70d1ce Binary files /dev/null and b/themes/defaut/favicons/32.png differ diff --git a/themes/defaut/favicons/384.png b/themes/defaut/favicons/384.png new file mode 100755 index 0000000..d41122f Binary files /dev/null and b/themes/defaut/favicons/384.png differ diff --git a/themes/defaut/favicons/48.png b/themes/defaut/favicons/48.png new file mode 100755 index 0000000..175d909 Binary files /dev/null and b/themes/defaut/favicons/48.png differ diff --git a/themes/defaut/favicons/512.png b/themes/defaut/favicons/512.png new file mode 100755 index 0000000..6560bba Binary files /dev/null and b/themes/defaut/favicons/512.png differ diff --git a/themes/defaut/favicons/64.png b/themes/defaut/favicons/64.png new file mode 100755 index 0000000..cb015c9 Binary files /dev/null and b/themes/defaut/favicons/64.png differ diff --git a/themes/defaut/favicons/96.png b/themes/defaut/favicons/96.png new file mode 100755 index 0000000..a075087 Binary files /dev/null and b/themes/defaut/favicons/96.png differ diff --git a/themes/defaut/theme.php b/themes/defaut/theme.php new file mode 100644 index 0000000..234c4c3 --- /dev/null +++ b/themes/defaut/theme.php @@ -0,0 +1,17 @@ + "#2D2F34", + "fondChamp" => "#31363B", + "fondChampTexte" => "#232629", + "bordure" => "#5f5f5f", + "bordureHover" => "#808080", + "bordureFocus" => "#b6b6b6", + "texte" => "white", + "texteForm" => "white", + "texteLienCodeSource" => "#868686" +); // Définit les couleurs du thème + +?> diff --git a/themes/parinux.less b/themes/parinux.less deleted file mode 100755 index be2543b..0000000 --- a/themes/parinux.less +++ /dev/null @@ -1,10 +0,0 @@ -@import "../style.less"; -@fond: #157097; -@fondChamp: #2794c2; -@fondChampTexte : #2794c2; -@bordure: #48aed9; -@bordureHover: #87d1f1; -@bordureFocus: #e2f6ff; -@texte: #d5f3ff; -@texteForm: #e2f6ff; -@texteLienCodeSource: #3da3cf; diff --git a/themes/parinux/favicons/128.png b/themes/parinux/favicons/128.png new file mode 100755 index 0000000..014b9b8 Binary files /dev/null and b/themes/parinux/favicons/128.png differ diff --git a/themes/parinux/favicons/16.png b/themes/parinux/favicons/16.png new file mode 100755 index 0000000..dc32f1e Binary files /dev/null and b/themes/parinux/favicons/16.png differ diff --git a/themes/parinux/favicons/192.png b/themes/parinux/favicons/192.png new file mode 100755 index 0000000..8abffa4 Binary files /dev/null and b/themes/parinux/favicons/192.png differ diff --git a/themes/parinux/favicons/256.png b/themes/parinux/favicons/256.png new file mode 100755 index 0000000..e79d81f Binary files /dev/null and b/themes/parinux/favicons/256.png differ diff --git a/themes/parinux/favicons/32.png b/themes/parinux/favicons/32.png new file mode 100755 index 0000000..0d93437 Binary files /dev/null and b/themes/parinux/favicons/32.png differ diff --git a/themes/parinux/favicons/384.png b/themes/parinux/favicons/384.png new file mode 100755 index 0000000..5e38b92 Binary files /dev/null and b/themes/parinux/favicons/384.png differ diff --git a/themes/parinux/favicons/48.png b/themes/parinux/favicons/48.png new file mode 100755 index 0000000..5b48f00 Binary files /dev/null and b/themes/parinux/favicons/48.png differ diff --git a/themes/parinux/favicons/512.png b/themes/parinux/favicons/512.png new file mode 100755 index 0000000..51f9bc7 Binary files /dev/null and b/themes/parinux/favicons/512.png differ diff --git a/themes/parinux/favicons/64.png b/themes/parinux/favicons/64.png new file mode 100755 index 0000000..609cd0e Binary files /dev/null and b/themes/parinux/favicons/64.png differ diff --git a/themes/parinux/favicons/96.png b/themes/parinux/favicons/96.png new file mode 100755 index 0000000..63d6244 Binary files /dev/null and b/themes/parinux/favicons/96.png differ diff --git a/themes/parinux/parinux.php b/themes/parinux/parinux.php new file mode 100644 index 0000000..6df427f --- /dev/null +++ b/themes/parinux/parinux.php @@ -0,0 +1,17 @@ + "#157097", + "fondChamp" => "#2794c2", + "fondChampTexte" => "#2794c2", + "bordure" => "#48aed9", + "bordureHover" => "#87d1f1", + "bordureFocus" => "#e2f6ff", + "texte" => "#d5f3ff", + "texteForm" => "#e2f6ff", + "texteLienCodeSource" => "#3da3cf" +); // Définit les couleurs du thème + +?> diff --git a/themes/parinux/theme.php b/themes/parinux/theme.php new file mode 100644 index 0000000..6df427f --- /dev/null +++ b/themes/parinux/theme.php @@ -0,0 +1,17 @@ + "#157097", + "fondChamp" => "#2794c2", + "fondChampTexte" => "#2794c2", + "bordure" => "#48aed9", + "bordureHover" => "#87d1f1", + "bordureFocus" => "#e2f6ff", + "texte" => "#d5f3ff", + "texteForm" => "#e2f6ff", + "texteLienCodeSource" => "#3da3cf" +); // Définit les couleurs du thème + +?> diff --git a/ubuntu/.gitignore b/ubuntu/.gitignore new file mode 100755 index 0000000..ee9cdde --- /dev/null +++ b/ubuntu/.gitignore @@ -0,0 +1,2 @@ +.DS_Store +webify diff --git a/ubuntu/CHANGELOG.md b/ubuntu/CHANGELOG.md new file mode 100755 index 0000000..23c8a87 --- /dev/null +++ b/ubuntu/CHANGELOG.md @@ -0,0 +1,35 @@ +## Changelog + +### v0.1.13 +- Add woff2 files (thanks, @rene-s) + +### v0.1.12 +- Fix missing webfont files + +### v0.1.11 +- Create `package.json` for NPM +- Create `composer.json` for Packagist + +### v0.1.10 +- Improve documentation +- Minify the pure CSS file + +### v0.1.8, v0.1.9 +- Fix problems with the invalid bower.json + +### v0.1.5 – Fixes and improvements +- Greek and Cyrillic charsets added +- Project page created + +### v0.1.3 +- Fixes an issue with sprockets stack creating final files for each *.scss +file instead of importing them to be compiled later as a whole. + +### v0.1.2 +- LESS and SASS files/descriptors available +- The font family is divided into three different files: Ubuntu (ubuntu-base); +Ubuntu Condensed (ubuntu-condensed); and Ubuntu Monospace (ubuntu-mono) + +### v0.1.1 +- Font files provided +- CSS descriptor available diff --git a/ubuntu/MIT-LICENSE b/ubuntu/MIT-LICENSE new file mode 100755 index 0000000..73cb5e2 --- /dev/null +++ b/ubuntu/MIT-LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015-2016 Ewerton Assis + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the “Software”), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/ubuntu/README.md b/ubuntu/README.md new file mode 100755 index 0000000..b54da4c --- /dev/null +++ b/ubuntu/README.md @@ -0,0 +1,41 @@ +# Ubuntu Font Family + +> Ubuntu Font Family Bower-ready (also SCSS-ready, LESS-ready, and plain CSS-ready) + +## How to use it + +0. Install it from [Bower](http://bower.io/) + + ```sh + $ bower install [--save] ubuntu-fontface + ``` + + or from [NPM](http://npmjs.com/) + + ```sh + $ npm install [--save] ubuntu-fontface + ``` + +1. Import it on SCSS/LESS/CSS source code. Assuming `{BOWER_PATH}` is `bower_components/`; `{SUFFIX}` options +are `-base`, `-condensed` and `-mono`; `{EXTENSION}` options are `css`, `less`, `scss`, depending +whether you're using pure CSS, [SCSS](http://sass-lang.com/) or [LESS](http://lesscss.org/). The `{SUFFIX}` is +not available if you're importing the pure CSS file. A minified file is available for the pure CSS version. + + ```css + @import "{BOWER_PATH}/ubuntu-fontface/ubuntu{SUFFIX}.{EXTENSION}"; + ``` + +2. If you need any help (or have found any bug 🐞), please post it on +[/issues](//github.com/earaujoassis/ubuntu-fontface/issues). Thank you! + +## Contributors + +- Pavel Rykov ([@PavelRykov](https://github.com/PavelRykov)) +- Jordan Last ([@lastmjs](https://github.com/lastmjs)) +- Rene Schmidt ([@rene-s](https://github.com/rene-s)) + +## License + +The Ubuntu Font Family is distributed under the [Ubuntu Font Licence](http://font.ubuntu.com/licence/). + +The source code in this project is distributed under the [MIT License](http://earaujoassis.mit-license.org/) © Ewerton Assis diff --git a/ubuntu/UBUNTU-FONT-LICENSE b/ubuntu/UBUNTU-FONT-LICENSE new file mode 100755 index 0000000..5a002cf --- /dev/null +++ b/ubuntu/UBUNTU-FONT-LICENSE @@ -0,0 +1,94 @@ +Ubuntu Font License v1.0 + +PREAMBLE +This licence allows the licensed fonts to be used, studied, modified and +redistributed freely. The fonts, including any derivative works, can be +bundled, embedded, and redistributed provided the terms of this licence +are met. The fonts and derivatives, however, cannot be released under +any other licence. The requirement for fonts to remain under this +licence does not require any document created using the fonts or their +derivatives to be published under this licence, as long as the primary +purpose of the document is not to be a vehicle for the distribution of +the fonts. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this licence and clearly marked as such. This may +include source files, build scripts and documentation. + +"Original Version" refers to the collection of Font Software components +as received under this licence. + +"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. + +"Copyright Holder(s)" refers to all individuals and companies who have a +copyright ownership of the Font Software. + +"Substantially Changed" refers to Modified Versions which can be easily +identified as dissimilar to the Font Software by users of the Font +Software comparing the Original Version with the Modified Version. + +To "Propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification and with or without charging +a redistribution fee), making available to the public, and in some +countries other activities as well. + +PERMISSION & CONDITIONS +This licence does not grant any rights under trademark law and all such +rights are reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of the Font Software, to propagate the Font Software, subject to +the below conditions: + +1) Each copy of the Font Software must contain the above copyright +notice and this licence. 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. + +2) The font name complies with the following: +(a) The Original Version must retain its name, unmodified. +(b) Modified Versions which are Substantially Changed must be renamed to +avoid use of the name of the Original Version or similar names entirely. +(c) Modified Versions which are not Substantially Changed must be +renamed to both (i) retain the name of the Original Version and (ii) add +additional naming elements to distinguish the Modified Version from the +Original Version. The name of such Modified Versions must be the name of +the Original Version, with "derivative X" where X represents the name of +the new work, appended to that name. + +3) The name(s) of the Copyright Holder(s) and any contributor to the +Font Software shall not be used to promote, endorse or advertise any +Modified Version, except (i) as required by this licence, (ii) to +acknowledge the contribution(s) of the Copyright Holder(s) or (iii) with +their explicit written permission. + +4) The Font Software, modified or unmodified, in part or in whole, must +be distributed entirely under this licence, and must not be distributed +under any other licence. The requirement for fonts to remain under this +licence does not affect any document created using the Font Software, +except any version of the Font Software extracted from a document +created using the Font Software may only be distributed under this +licence. + +TERMINATION +This licence 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. diff --git a/ubuntu/_ubuntu-base.scss b/ubuntu/_ubuntu-base.scss new file mode 100755 index 0000000..ae74026 --- /dev/null +++ b/ubuntu/_ubuntu-base.scss @@ -0,0 +1,116 @@ +/* Ubuntu Font Family Bower-ready v0.1.13 */ +/* Ubuntu @font-face kit */ + +$UbuntuFontsPath: "./fonts" !default; + +/* BEGIN Ubuntu Light */ +@font-face { + font-family: 'Ubuntu'; + src: url('#{$UbuntuFontsPath}/ubuntu-light-webfont.eot'); + src: url('#{$UbuntuFontsPath}/ubuntu-light-webfont.eot?#iefix') format('embedded-opentype'), + url('#{$UbuntuFontsPath}/ubuntu-light-webfont.woff2') format('woff2'), + url('#{$UbuntuFontsPath}/ubuntu-light-webfont.woff') format('woff'), + url('#{$UbuntuFontsPath}/ubuntu-light-webfont.ttf') format('truetype'), + url('#{$UbuntuFontsPath}/ubuntu-light-webfont.svg#ubuntulight') format('svg'); + font-weight: 300; + font-style: normal; +} +/* END Ubuntu Light */ + +/* BEGIN Ubuntu Light Italic */ +@font-face { + font-family: 'Ubuntu'; + src: url('#{$UbuntuFontsPath}/ubuntu-light-italic-webfont.eot'); + src: url('#{$UbuntuFontsPath}/ubuntu-light-italic-webfont.eot?#iefix') format('embedded-opentype'), + url('#{$UbuntuFontsPath}/ubuntu-light-italic-webfont.woff2') format('woff2'), + url('#{$UbuntuFontsPath}/ubuntu-light-italic-webfont.woff') format('woff'), + url('#{$UbuntuFontsPath}/ubuntu-light-italic-webfont.ttf') format('truetype'), + url('#{$UbuntuFontsPath}/ubuntu-light-italic-webfont.svg#ubuntulight_italic') format('svg'); + font-weight: 300; + font-style: italic; +} +/* END Ubuntu Light Italic */ + +/* BEGIN Ubuntu Regular */ +@font-face { + font-family: 'Ubuntu'; + src: url('#{$UbuntuFontsPath}/ubuntu-regular-webfont.eot'); + src: url('#{$UbuntuFontsPath}/ubuntu-regular-webfont.eot?#iefix') format('embedded-opentype'), + url('#{$UbuntuFontsPath}/ubuntu-regular-webfont.woff2') format('woff2'), + url('#{$UbuntuFontsPath}/ubuntu-regular-webfont.woff') format('woff'), + url('#{$UbuntuFontsPath}/ubuntu-regular-webfont.ttf') format('truetype'), + url('#{$UbuntuFontsPath}/ubuntu-regular-webfont.svg#ubunturegular') format('svg'); + font-weight: normal; + font-style: normal; +} +/* END Ubuntu Regular */ + +/* BEGIN Ubuntu Regular Italic */ +@font-face { + font-family: 'Ubuntu'; + src: url('#{$UbuntuFontsPath}/ubuntu-regular-italic-webfont.eot'); + src: url('#{$UbuntuFontsPath}/ubuntu-regular-italic-webfont.eot?#iefix') format('embedded-opentype'), + url('#{$UbuntuFontsPath}/ubuntu-regular-italic-webfont.woff2') format('woff2'), + url('#{$UbuntuFontsPath}/ubuntu-regular-italic-webfont.woff') format('woff'), + url('#{$UbuntuFontsPath}/ubuntu-regular-italic-webfont.ttf') format('truetype'), + url('#{$UbuntuFontsPath}/ubuntu-regular-italic-webfont.svg#ubuntuitalic') format('svg'); + font-weight: normal; + font-style: italic; +} +/* END Ubuntu Regular Italic */ + +/* BEGIN Ubuntu Medium */ +@font-face { + font-family: 'Ubuntu'; + src: url('#{$UbuntuFontsPath}/ubuntu-medium-webfont.eot'); + src: url('#{$UbuntuFontsPath}/ubuntu-medium-webfont.eot?#iefix') format('embedded-opentype'), + url('#{$UbuntuFontsPath}/ubuntu-medium-webfont.woff2') format('woff2'), + url('#{$UbuntuFontsPath}/ubuntu-medium-webfont.woff') format('woff'), + url('#{$UbuntuFontsPath}/ubuntu-medium-webfont.ttf') format('truetype'), + url('#{$UbuntuFontsPath}/ubuntu-medium-webfont.svg#ubuntumedium') format('svg'); + font-weight: 500; + font-style: normal; +} +/* END Ubuntu Medium */ + +/* BEGIN Ubuntu Medium Italic */ +@font-face { + font-family: 'Ubuntu'; + src: url('#{$UbuntuFontsPath}/ubuntu-medium-italic-webfont.eot'); + src: url('#{$UbuntuFontsPath}/ubuntu-medium-italic-webfont.eot?#iefix') format('embedded-opentype'), + url('#{$UbuntuFontsPath}/ubuntu-medium-italic-webfont.woff2') format('woff2'), + url('#{$UbuntuFontsPath}/ubuntu-medium-italic-webfont.woff') format('woff'), + url('#{$UbuntuFontsPath}/ubuntu-medium-italic-webfont.ttf') format('truetype'), + url('#{$UbuntuFontsPath}/ubuntu-medium-italic-webfont.svg#ubuntumedium_italic') format('svg'); + font-weight: 500; + font-style: italic; +} +/* END Ubuntu Medium Italic */ + +/* BEGIN Ubuntu Bold */ +@font-face { + font-family: 'Ubuntu'; + src: url('#{$UbuntuFontsPath}/ubuntu-bold-webfont.eot'); + src: url('#{$UbuntuFontsPath}/ubuntu-bold-webfont.eot?#iefix') format('embedded-opentype'), + url('#{$UbuntuFontsPath}/ubuntu-bold-webfont.woff2') format('woff2'), + url('#{$UbuntuFontsPath}/ubuntu-bold-webfont.woff') format('woff'), + url('#{$UbuntuFontsPath}/ubuntu-bold-webfont.ttf') format('truetype'), + url('#{$UbuntuFontsPath}/ubuntu-bold-webfont.svg#ubuntubold') format('svg'); + font-weight: bold; + font-style: normal; +} +/* END Ubuntu Bold */ + +/* BEGIN Ubuntu Bold Italic */ +@font-face { + font-family: 'Ubuntu'; + src: url('#{$UbuntuFontsPath}/ubuntu-bold-italic-webfont.eot'); + src: url('#{$UbuntuFontsPath}/ubuntu-bold-italic-webfont.eot?#iefix') format('embedded-opentype'), + url('#{$UbuntuFontsPath}/ubuntu-bold-italic-webfont.woff2') format('woff2'), + url('#{$UbuntuFontsPath}/ubuntu-bold-italic-webfont.woff') format('woff'), + url('#{$UbuntuFontsPath}/ubuntu-bold-italic-webfont.ttf') format('truetype'), + url('#{$UbuntuFontsPath}/ubuntu-bold-italic-webfont.svg#ubuntubold_italic') format('svg'); + font-weight: bold; + font-style: italic; +} +/* END Ubuntu Bold Italic */ diff --git a/ubuntu/_ubuntu-condensed.scss b/ubuntu/_ubuntu-condensed.scss new file mode 100755 index 0000000..0562903 --- /dev/null +++ b/ubuntu/_ubuntu-condensed.scss @@ -0,0 +1,18 @@ +/* Ubuntu Font Family Bower-ready v0.1.13 */ +/* Ubuntu Condensed @font-face kit */ + +$UbuntuFontsPath: "./fonts" !default; + +/* BEGIN Ubuntu Condensed */ +@font-face { + font-family: 'Ubuntu Condensed'; + src: url('#{$UbuntuFontsPath}/ubuntu-condensed-webfont.eot'); + src: url('#{$UbuntuFontsPath}/ubuntu-condensed-webfont.eot?#iefix') format('embedded-opentype'), + url('#{$UbuntuFontsPath}/ubuntu-condensed-webfont.woff2') format('woff2'), + url('#{$UbuntuFontsPath}/ubuntu-condensed-webfont.woff') format('woff'), + url('#{$UbuntuFontsPath}/ubuntu-condensed-webfont.ttf') format('truetype'), + url('#{$UbuntuFontsPath}/ubuntu-condensed-webfont.svg#ubuntu_condensedregular') format('svg'); + font-weight: normal; + font-style: normal; +} +/* END Ubuntu Condensed */ diff --git a/ubuntu/_ubuntu-mono.scss b/ubuntu/_ubuntu-mono.scss new file mode 100755 index 0000000..67da3eb --- /dev/null +++ b/ubuntu/_ubuntu-mono.scss @@ -0,0 +1,62 @@ +/* Ubuntu Font Family Bower-ready v0.1.13 */ +/* Ubuntu Mono @font-face kit */ + +$UbuntuFontsPath: "./fonts" !default; + +/* BEGIN Ubuntu Mono Regular */ +@font-face { + font-family: 'Ubuntu Monospace'; + src: url('#{$UbuntuFontsPath}/ubuntumono-regular-webfont.eot'); + src: url('#{$UbuntuFontsPath}/ubuntumono-regular-webfont.eot?#iefix') format('embedded-opentype'), + url('#{$UbuntuFontsPath}/ubuntumono-regular-webfont.woff2') format('woff2'), + url('#{$UbuntuFontsPath}/ubuntumono-regular-webfont.woff') format('woff'), + url('#{$UbuntuFontsPath}/ubuntumono-regular-webfont.ttf') format('truetype'), + url('#{$UbuntuFontsPath}/ubuntumono-regular-webfont.svg#ubuntu_monoregular') format('svg'); + font-weight: normal; + font-style: normal; + +} +/* END Ubuntu Mono Regular */ + +/* BEGIN Ubuntu Mono Italic */ +@font-face { + font-family: 'Ubuntu Monospace'; + src: url('#{$UbuntuFontsPath}/ubuntumono-regular-italic-webfont.eot'); + src: url('#{$UbuntuFontsPath}/ubuntumono-regular-italic-webfont.eot?#iefix') format('embedded-opentype'), + url('#{$UbuntuFontsPath}/ubuntumono-regular-italic-webfont.woff2') format('woff2'), + url('#{$UbuntuFontsPath}/ubuntumono-regular-italic-webfont.woff') format('woff'), + url('#{$UbuntuFontsPath}/ubuntumono-regular-italic-webfont.ttf') format('truetype'), + url('#{$UbuntuFontsPath}/ubuntumono-regular-italic-webfont.svg#ubuntu_monoitalic') format('svg'); + font-weight: normal; + font-style: italic; +} +/* END Ubuntu Mono Italic */ + +/* BEGIN Ubuntu Mono Bold */ +@font-face { + font-family: 'Ubuntu Monospace'; + src: url('#{$UbuntuFontsPath}/ubuntumono-bold-webfont.eot'); + src: url('#{$UbuntuFontsPath}/ubuntumono-bold-webfont.eot?#iefix') format('embedded-opentype'), + url('#{$UbuntuFontsPath}/ubuntumono-bold-webfont.woff2') format('woff2'), + url('#{$UbuntuFontsPath}/ubuntumono-bold-webfont.woff') format('woff'), + url('#{$UbuntuFontsPath}/ubuntumono-bold-webfont.ttf') format('truetype'), + url('#{$UbuntuFontsPath}/ubuntumono-bold-webfont.svg#ubuntu_monobold') format('svg'); + font-weight: bold; + font-style: normal; +} +/* END Ubuntu Mono Bold */ + +/* BEGIN Ubuntu Mono Bold Italic */ +@font-face { + font-family: 'Ubuntu Monospace'; + src: url('#{$UbuntuFontsPath}/ubuntumono-bold-italic-webfont.eot'); + src: url('#{$UbuntuFontsPath}/ubuntumono-bold-italic-webfont.eot?#iefix') format('embedded-opentype'), + url('#{$UbuntuFontsPath}/ubuntumono-bold-italic-webfont.woff2') format('woff2'), + url('#{$UbuntuFontsPath}/ubuntumono-bold-italic-webfont.woff') format('woff'), + url('#{$UbuntuFontsPath}/ubuntumono-bold-italic-webfont.ttf') format('truetype'), + url('#{$UbuntuFontsPath}/ubuntumono-bold-italic-webfont.svg#ubuntu_monobold_italic') format('svg'); + font-weight: bold; + font-style: italic; + +} +/* END Ubuntu Mono Bold Italic */ diff --git a/ubuntu/_ubuntu.scss b/ubuntu/_ubuntu.scss new file mode 100755 index 0000000..af9ccb2 --- /dev/null +++ b/ubuntu/_ubuntu.scss @@ -0,0 +1,8 @@ +/* Ubuntu Font Family Bower-ready v0.1.13 */ +/* Ubuntu (complete package) @font-face kit */ + +$UbuntuFontsPath: "./fonts" !default; + +@import "./ubuntu-base.scss"; +@import "./ubuntu-condensed.scss"; +@import "./ubuntu-mono.scss"; diff --git a/ubuntu/bower.json b/ubuntu/bower.json new file mode 100755 index 0000000..6f04921 --- /dev/null +++ b/ubuntu/bower.json @@ -0,0 +1,38 @@ +{ + "name": "ubuntu-fontface", + "version": "0.1.13", + "main": [ + "./ubuntu.css", + "./ubuntu.min.css", + "./_ubuntu.scss", + "./ubuntu.less" + ], + "homepage": "https://github.com/earaujoassis/ubuntu-fontface", + "authors": [ + "Ewerton Assis " + ], + "description": "Ubuntu Font Family Bower-ready (also SASS-ready, LESS-ready, and plain CSS-ready)", + "keywords": [ + "ubuntu", + "font", + "fontface", + "css", + "sass", + "less", + "web", + "design" + ], + "license": [ + "MIT", + "Ubuntu Font License" + ], + "ignore": [ + "**/.*", + "fonts/original-pack", + "node_modules", + "bower_components", + "test", + "tests", + "site" + ] +} diff --git a/ubuntu/composer.json b/ubuntu/composer.json new file mode 100755 index 0000000..4f53b60 --- /dev/null +++ b/ubuntu/composer.json @@ -0,0 +1,25 @@ +{ + "name": "earaujoassis/ubuntu-fontface", + "type": "css", + "description": "Ubuntu Font Family", + "homepage": "https://earaujoassis.github.io/ubuntu-fontface/", + "keywords": ["css", "sass", "less", "fonts", "font", "ubuntu", "fontface"], + "authors": [ + { + "name": "Ewerton Assis", + "email": "earaujoassis@gmail.com", + "homepage": "https://earaujoassis.com/", + "role": "Maintainer" + }, + { + "name": "Pavel Rykov", + "email": "p.rikov@drteam.rocks", + "homepage": "http://drteam.rocks/", + "role": "Contributor" + } + ], + "require": {}, + "autoload": {}, + "minimum-stability": "dev", + "license": "MIT" +} diff --git a/ubuntu/fonts/original-pack/CONTRIBUTING.txt b/ubuntu/fonts/original-pack/CONTRIBUTING.txt new file mode 100755 index 0000000..15bdc0c --- /dev/null +++ b/ubuntu/fonts/original-pack/CONTRIBUTING.txt @@ -0,0 +1,21 @@ +The Ubuntu Font Family is very long-term endeavour, and the first time +that a professionally-designed font has been funded specifically with +the intent of being an on-going community expanded project: + + http://font.ubuntu.com/ + +Development of the Ubuntu Font Family is undertaken on Launchpad: + + http://launchpad.net/ubuntu-font-family/ + +and this is where milestones, bug management and releases are handled. + +Contributions are welcomed. Your work will be used on millions of +computers every single day! Following the initial bootstrapping of +Latin, Cyrillic, Greek, Arabic and Hebrew expansion will be undertaken +by font designers from the font design and Ubuntu communities. + +To ensure that the Ubuntu Font Family can be re-licensed to future +widely-used libre font licences, copyright assignment is being required: + + https://launchpad.net/~uff-contributors diff --git a/ubuntu/fonts/original-pack/FONTLOG.txt b/ubuntu/fonts/original-pack/FONTLOG.txt new file mode 100755 index 0000000..83022be --- /dev/null +++ b/ubuntu/fonts/original-pack/FONTLOG.txt @@ -0,0 +1,292 @@ +This is the FONTLOG file for the Ubuntu Font Family and attempts to follow +the recommendations at: http://scripts.sil.org/OFL-FAQ_web#43cecb44 + + +Overview + +The new Ubuntu Font Family was started to enable the personality of +Ubuntu to be seen and felt in every menu, button and dialog. +The typeface is sans-serif, uses OpenType features and is manually +hinted for clarity on desktop and mobile computing screens. + +The scope of the Ubuntu Font Family includes all the languages used by +the various Ubuntu users around the world in tune with Ubuntu's +philosophy which states that every user should be able to use their +software in the language of their choice. So the Ubuntu Font Family +project will be extended to cover many more written languages. + + +History + +The Ubuntu Font Family has been creating during 2010 and 2011. As of +September 2011 coverage is provided for Latin, Cyrillic and Greek across +Regular, Italic, Bold and Bold-Italic. Further work was uptaken during +2015. + + +ChangeLog + +2015-08-21 (Paul Sladen) Ubuntu Font Family version 0.83 + + Note: This release was created by binary patching from the v0.80 + release using the scripts in 'sources/patch-0.80-0.83/' to rebuild + the necessary tables. The release selectively updates only those + proportional .ttf font files exhibiting the bug below bug number; + the Ubuntu Mono monospace font files remain unchanged, being the + original version 0.80 ones. + + [Marc Foley] + * [Engineering] Fixed wrong characters appear in some mac apps. (LP: #1334363) + + +2011-09-22 (Paul Sladen) Ubuntu Font Family version 0.80 + + [Vincent Connare/Dalton Maag] + * Wish for addition of a monospaced member to the family (LP: #640382) + * Mono: No hinting yet - Ubuntu Beta Mono font looks jagged in + Netbeans and terrible with ClearType (LP: #820493) + * Emacs: choosing normal monospace font in Emacs but gives bold-italic + (LP: #791076) + * PUA: ensure that Ubuntu Circle of Friends logo is full size: (LP: #853855) + + U+E0FF becomes large size in proportionals, remains small width in + monospaces + + U+F0FF becomes small size (proportionals only) + + U+F200 is full ubuntu logomark (proportionals only) + + [Paul Sladen] + * Monospace: Patch Family Name to be "Ubuntu Mono" + * Monospace: Patch U+EFFD version debugging glyph to be '0.8' + + [Cody Boisclair] + * Monospace: Force .null HDMX advance to 500 + * Monospace: Remap ASCII box-drawing characters (LP: #788757) + + [Júlio Reis] + * Date corrections to 'FONTLOG' (LP: #836595) + +2011-03-08 (Paul Sladen) Ubuntu Font Family version 0.71.2 + + * (Production) Adjust Medium WeightClass to 500 (Md, MdIt) (LP: #730912) + +2011-03-07 (Paul Sladen) Ubuntu Font Family version 0.71.1 + + * (Design) Add Capitalised version of glyphs and kern. (Lt, LtIt, + Md, MdIt) DM (LP: #677446) + * (Design) Re-space and tighen Regular and Italic by amount specified + by Mark Shuttleworth (minus 4 FUnits). (Rg, It) (LP: #677149) + * (Design) Design: Latin (U+0192) made straight more like l/c f with + tail (LP: #670768) + * (Design) (U+01B3) should have hook on right, as the lowercase + (U+01B4) (LP: #681026) + * (Design) Tail of Light Italic germandbls, longs and lowercase 'f' + to match Italic/BoldItalic (LP: #623925) + * (Production) Update feature (Lt, LtIt, Md, MdIt). DM + (LP: #676538, #676539) + * (Production) Remove Bulgarian locl feature for Italics. (LP: #708578) + * (Production) Update Description information with new string: + "The Ubuntu Font Family are libre fonts funded by Canonical Ltd + on behalf of the Ubuntu project. The font design work and + technical implementation is being undertaken by Dalton Maag. The + typeface is sans-serif, uses OpenType features and is manually + hinted for clarity on desktop and mobile computing screens. The + scope of the Ubuntu Font Family includes all the languages used + by the various Ubuntu users around the world in tune with + Ubuntu's philosophy which states that every user should be able + to use their software in the language of their choice. The + project is ongoing, and we expect the family will be extended to + cover many written languages in the coming years." + (Rg, It, Bd, BdIt, Lt, LtIt, Md, MdIt) (LP: #690590) + * (Production) Pixel per em indicator added at U+F000 (Lt, LtIt, Md, + MdIt) (LP: #615787) + * (Production) Version number indicator added at U+EFFD (Lt, LtIt, Md, + MdIt) (LP: #640623) + * (Production) fstype bit set to 0 - Editable (Lt, LtIt, Md, MdIt) + (LP: #648406) + * (Production) Localisation of name table has been removed because + of problems with Mac OS/X interpretation of localisation. DM + (LP: #730785) + * (Hinting) Regular '?' dot non-circular (has incorrect control + value). (LP: #654336) + * (Hinting) Too much space after latin capital 'G' in 13pt + regular. Now reduced. (LP: #683437) + * (Hinting) Balance Indian Rupee at 18,19pt (LP: #662177) + * (Hinting) Make Regular '£' less ambiguous at 13-15 ppm (LP: #685562) + * (Hinting) Regular capital 'W' made symmetrical at 31 ppem (LP: #686168) + +2010-12-14 (Paul Sladen) Ubuntu Font Family version 0.70.1 + + Packaging, rebuilt from '2010-12-08 UbuntuFontsSourceFiles_070.zip': + * (Midstream) Fstype bit != 0 (LP: #648406) + * (Midstream) Add unit test to validate fstype bits (LP: #648406) + * (Midstream) Add unit test to validate licence + +2010-12-14 (Paul Sladen) Ubuntu Font Family version 0.70 + + Release notes 0.70: + * (Design) Add Capitalised version of glyphs and kern. (Rg, It, Bd, + BdIt) DM (LP: #676538, #677446) + * (Design) Give acute and grave a slight upright move to more match + the Hungarian double acute angle. (Rg, It, Bd, BdIt) (LP: #656647) + * (Design) Shift Bold Italic accent glyphs to be consistent with the + Italic. (BdIt only) DM (LP: #677449) + * (Design) Check spacing and kerning of dcaron, lcaron and + tcaron. (Rg, It, Bd, BdIt) (LP: #664722) + * (Design) Add positive kerning to () {} [] to open out the + combinations so they are less like a closed box. (Rg, It, Bd, + BdIt) (LP: #671228) + * (Design) Change design of acute.asc and check highest points (Bd + and BdIt only) DM + * (Production) Update feature. DM (LP: #676538, #676539) + * (Production) Remove Romanian locl feature. (Rg, It, Bd, BdIt) + (LP: #635615) + * (Production) Update Copyright information with new + strings. "Copyright 2010 Canonical Ltd. Licensed under the Ubuntu + Font Licence 1.0" Trademark string "Ubuntu and Canonical are + registered trademarks of Canonical Ltd." (Rg, It, Bd, BdIt) DM + (LP: #677450) + * (Design) Check aligning of hyphen, math signs em, en, check braces + and other brackets. 16/11 (LP: #676465) + * (Production) Pixel per em indicator added at U+F000 (Rg, It, Bd, + BdIt) (LP: #615787) + * (Production) Version number indicator added at U+EFFD (Rg, It, Bd, + BdIt) (LP: #640623) + * (Production) fstype bit set to 0 - Editable (Rg, It, Bd, BdIt) + (LP: #648406) + +2010-10-05 (Paul Sladen) Ubuntu Font Family version 0.69 + + [Dalton Maag] + * Italic, + - Hinting on lowercase Italic l amended 19ppm (LP: #632451) + - Hinting on lowercase Italic u amended 12ppm (LP: #626376) + + * Regular, Italic, Bold, BoldItalic + - New Rupee Sign added @ U+20B9 (LP: #645987) + - Ubuntu Roundel added @ U+E0FF (LP: #651606) + + [Paul Sladen] + * All + - Removed "!ubu" GSUB.calt ligature for U+E0FF (LP: #651606) + + +Acknowledgements + +If you make modifications be sure to add your name (N), email (E), +web-address (if you have one) (W) and description (D). This list is in +alphabetical order. + +N: Ryan Abdullah +W: http://www.rayan.de/ +D: Arabic calligraphy and design in collaboration with Dalton Maag +D: Arabic testing + +N: Cody Boisclair +D: Monospace low-level debugging and patching ('fixboxdrawing-ft.py') + +N: Amélie Bonet +W: http://ameliebonet.com/ +D: Type design with Dalton Maag, particularly Ubuntu Mono and Ubuntu Condensed + +N: Jason Campbell +W: http://www.campbellgraphics.com/design/fonts.shtml +D: Monospace hinting (first phase) at Dalton Maag + +N: Pilar Cano +W: http://www.pilarcano.com/ +D: Hebrew realisation with Dalton Maag + +N: Fernando Caro +D: Type design with Dalton Maag, particularly Ubuntu Condensed + +N: Ron Carpenter +W: http://www.daltonmaag.com/ +D: Type design with Dalton Maag +D: Arabic realisation in collaboration with Ryan Abdullah + +N: Vincent Connare +W: http://www.connare.com/ +D: Type design, and engineering with Dalton Maag +D: Monospace hinting (second phase) at Dalton Maag + +N: Dave Crossland +E: dave@understandingfonts.com +W: http://understandingfonts.com/ +D: Documentation and libre licensing guidance +D: Google Webfont integration at Google + +N: Steve Edwards +W: http://www.madebymake.com/ +D: font.ubuntu.com revamp implementation with Canonical Web Team + +N: Iain Farrell +W: http://www.flickr.com/photos/iain +D: Ubuntu Font Family delivery for the Ubuntu UX team at Canonical + +N: Marc Foley +W: http://www.marcfoley.co/ +D: Font Engineer at Dalton Maag for the 2015 updates + +N: Shiraaz Gabru +W: http://www.daltonmaag.com/ +D: Ubuntu Font Family project management at Dalton Maag + +N: Marcus Haslam +W: http://design.canonical.com/author/marcus-haslam/ +D: Creative inspiration + +N: Ben Laenen +D: Inspiration behind the pixels-per-em (PPEM) readout debugging glyph at U+F000 + (for this font the concept was re-implemented from scratch by Dalton-Maag) + +N: Bruno Maag +W: http://www.daltonmaag.com/ +D: Stylistic direction of the Ubuntu Font Family, as head of Dalton Maag + +N: Ivanka Majic +W: http://www.ivankamajic.com/ +D: Guiding the UX team and Cyrillic feedback + +N: David Marshall +W: http://www.daltonmaag.com/ +D: Technical guidance and administration at Dalton Maag + +N: Malcolm Wooden +W: http://www.daltonmaag.com/ +D: Font Engineering at Dalton Maag + +N: Lukas Paltram +W: http://www.daltonmaag.com/ +D: Type design with Dalton Maag + +N: Júlio Reis +D: Date fixes to the documentation + +N: Rodrigo Rivas +D: Indian Rupee Sign glyph + +N: Mark Shuttleworth +E: mark@ubuntu.com +W: http://www.markshuttleworth.com/ +D: Executive quality-control and funding + +N: Paul Sladen +E: ubuntu@paul.sladen.org +W: http://www.paul.sladen.org/ +D: Bug triaging, packaging at Ubuntu and Canonical + +N: Nicolas Spalinger +W: http://planet.open-fonts.org +D: Continuous guidance on libre/open font licensing, best practises in source + tree layout, release and packaging (pkg-fonts Debian team) + +N: Kenneth Wimer +D: Initial PPA packaging + +* Canonical Ltd is the primary commercial sponsor of the Ubuntu and + Kubuntu operating systems +* Dalton Maag are a custom type foundry headed by Bruno Maag + +For further documentation, information on contributors, source code +downloads and those involved with the Ubuntu Font Family, visit: + + http://font.ubuntu.com/ diff --git a/ubuntu/fonts/original-pack/LICENCE-FAQ.txt b/ubuntu/fonts/original-pack/LICENCE-FAQ.txt new file mode 100755 index 0000000..776a25e --- /dev/null +++ b/ubuntu/fonts/original-pack/LICENCE-FAQ.txt @@ -0,0 +1,177 @@ + Ubuntu Font Family Licensing FAQ + + Stylistic Foundations + + The Ubuntu Font Family is the first time that a libre typeface has been + designed professionally and explicitly with the intent of developing a + public and long-term community-based development process. + + When developing an open project, it is generally necessary to have firm + foundations: a font needs to maintain harmony within itself even across + many type designers and writing systems. For the [1]Ubuntu Font Family, + the process has been guided with the type foundry Dalton Maag setting + the project up with firm stylistic foundation covering several + left-to-right scripts: Latin, Greek and Cyrillic; and right-to-left + scripts: Arabic and Hebrew (due in 2011). + + With this starting point the community will, under the supervision of + [2]Canonical and [3]Dalton Maag, be able to build on the existing font + sources to expand their character coverage. Ultimately everybody will + be able to use the Ubuntu Font Family in their own written languages + across the whole of Unicode (and this will take some time!). + + Licensing + + The licence chosen by any free software project is one of the + foundational decisions that sets out how derivatives and contributions + can occur, and in turn what kind of community will form around the + project. + + Using a licence that is compatible with other popular licences is a + powerful constraint because of the [4]network effects: the freedom to + share improvements between projects allows free software to reach + high-quality over time. Licence-proliferation leads to many + incompatible licences, undermining the network effect, the freedom to + share and ultimately making the libre movement that Ubuntu is a part of + less effective. For all kinds of software, writing a new licence is not + to be taken lightly and is a choice that needs to be thoroughly + justified if this path is taken. + + Today it is not clear to Canonical what the best licence for a font + project like the Ubuntu Font Family is: one that starts life designed + by professionals and continues with the full range of community + development, from highly commercial work in new directions to curious + beginners' experimental contributions. The fast and steady pace of the + Ubuntu release cycle means that an interim libre licence has been + necessary to enable the consideration of the font family as part of + Ubuntu 10.10 operating system release. + + Before taking any decision on licensing, Canonical as sponsor and + backer of the project has reviewed the many existing licenses used for + libre/open fonts and engaged the stewards of the most popular licenses + in detailed discussions. The current interim licence is the first step + in progressing the state-of-the-art in licensing for libre/open font + development. + + The public discussion must now involve everyone in the (comparatively + new) area of the libre/open font community; including font users, + software freedom advocates, open source supporters and existing libre + font developers. Most importantly, the minds and wishes of professional + type designers considering entering the free software business + community must be taken on board. + + Conversations and discussion has taken place, privately, with + individuals from the following groups (generally speaking personally on + behalf of themselves, rather than their affiliations): + * [5]SIL International + * [6]Open Font Library + * [7]Software Freedom Law Center + * [8]Google Font API + + Document embedding + + One issue highlighted early on in the survey of existing font licences + is that of document embedding. Almost all font licences, both free and + unfree, permit embedding a font into a document to a certain degree. + Embedding a font with other works that make up a document creates a + "combined work" and copyleft would normally require the whole document + to be distributed under the terms of the font licence. As beautiful as + the font might be, such a licence makes a font too restrictive for + useful general purpose digital publishing. + + The situation is not entirely unique to fonts and is encountered also + with tools such as GNU Bison: a vanilla GNU GPL licence would require + anything generated with Bison to be made available under the terms of + the GPL as well. To avoid this, Bison is [9]published with an + additional permission to the GPL which allows the output of Bison to be + made available under any licence. + + The conflict between licensing of fonts and licensing of documents, is + addressed in two popular libre font licences, the SIL OFL and GNU GPL: + * [10]SIL Open Font Licence: When OFL fonts are embedded in a + document, the OFL's terms do not apply to that document. (See + [11]OFL-FAQ for details. + * [12]GPL Font Exception: The situation is resolved by granting an + additional permission to allow documents to not be covered by the + GPL. (The exception is being reviewed). + + The Ubuntu Font Family must also resolve this conflict, ensuring that + if the font is embedded and then extracted it is once again clearly + under the terms of its libre licence. + + Long-term licensing + + Those individuals involved, especially from Ubuntu and Canonical, are + interested in finding a long-term libre licence that finds broad favour + across the whole libre/open font community. The deliberation during the + past months has been on how to licence the Ubuntu Font Family in the + short-term, while knowingly encouraging everyone to pursue a long-term + goal. + * [13]Copyright assignment will be required so that the Ubuntu Font + Family's licensing can be progressively expanded to one (or more) + licences, as best practice continues to evolve within the + libre/open font community. + * Canonical will support and fund legal work on libre font licensing. + It is recognised that the cost and time commitments required are + likely to be significant. We invite other capable parties to join + in supporting this activity. + + The GPL version 3 (GPLv3) will be used for Ubuntu Font Family build + scripts and the CC-BY-SA for associated documentation and non-font + content: all items which do not end up embedded in general works and + documents. + +Ubuntu Font Licence + + For the short-term only, the initial licence is the [14]Ubuntu Font + License (UFL). This is loosely inspired from the work on the SIL + OFL 1.1, and seeks to clarify the issues that arose during discussions + and legal review, from the perspective of the backers, Canonical Ltd. + Those already using established licensing models such as the GPL, OFL + or Creative Commons licensing should have no worries about continuing + to use them. The Ubuntu Font Licence (UFL) and the SIL Open Font + Licence (SIL OFL) are not identical and should not be confused with + each other. Please read the terms precisely. The UFL is only intended + as an interim license, and the overriding aim is to support the + creation of a more suitable and generic libre font licence. As soon as + such a licence is developed, the Ubuntu Font Family will migrate to + it—made possible by copyright assignment in the interium. Between the + OFL 1.1, and the UFL 1.0, the following changes are made to produce the + Ubuntu Font Licence: + * Clarification: + + 1. Document embedding (see [15]embedding section above). + 2. Apply at point of distribution, instead of receipt + 3. Author vs. copyright holder disambiguation (type designers are + authors, with the copyright holder normally being the funder) + 4. Define "Propagate" (for internationalisation, similar to the GPLv3) + 5. Define "Substantially Changed" + 6. Trademarks are explicitly not transferred + 7. Refine renaming requirement + + Streamlining: + 8. Remove "not to be sold separately" clause + 9. Remove "Reserved Font Name(s)" declaration + + A visual demonstration of how these points were implemented can be + found in the accompanying coloured diff between SIL OFL 1.1 and the + Ubuntu Font Licence 1.0: [16]ofl-1.1-ufl-1.0.diff.html + +References + + 1. http://font.ubuntu.com/ + 2. http://www.canonical.com/ + 3. http://www.daltonmaag.com/ + 4. http://en.wikipedia.org/wiki/Network_effect + 5. http://scripts.sil.org/ + 6. http://openfontlibrary.org/ + 7. http://www.softwarefreedom.org/ + 8. http://code.google.com/webfonts + 9. http://www.gnu.org/licenses/gpl-faq.html#CanIUseGPLToolsForNF + 10. http://scripts.sil.org/OFL_web + 11. http://scripts.sil.org/OFL-FAQ_web + 12. http://www.gnu.org/licenses/gpl-faq.html#FontException + 13. https://launchpad.net/~uff-contributors + 14. http://font.ubuntu.com/ufl/ubuntu-font-licence-1.0.txt + 15. http://font.ubuntu.com/ufl/FAQ.html#embedding + 16. http://font.ubuntu.com/ufl/ofl-1.1-ufl-1.0.diff.html diff --git a/ubuntu/fonts/original-pack/LICENCE.txt b/ubuntu/fonts/original-pack/LICENCE.txt new file mode 100755 index 0000000..ae78a8f --- /dev/null +++ b/ubuntu/fonts/original-pack/LICENCE.txt @@ -0,0 +1,96 @@ +------------------------------- +UBUNTU FONT LICENCE Version 1.0 +------------------------------- + +PREAMBLE +This licence allows the licensed fonts to be used, studied, modified and +redistributed freely. The fonts, including any derivative works, can be +bundled, embedded, and redistributed provided the terms of this licence +are met. The fonts and derivatives, however, cannot be released under +any other licence. The requirement for fonts to remain under this +licence does not require any document created using the fonts or their +derivatives to be published under this licence, as long as the primary +purpose of the document is not to be a vehicle for the distribution of +the fonts. + +DEFINITIONS +"Font Software" refers to the set of files released by the Copyright +Holder(s) under this licence and clearly marked as such. This may +include source files, build scripts and documentation. + +"Original Version" refers to the collection of Font Software components +as received under this licence. + +"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. + +"Copyright Holder(s)" refers to all individuals and companies who have a +copyright ownership of the Font Software. + +"Substantially Changed" refers to Modified Versions which can be easily +identified as dissimilar to the Font Software by users of the Font +Software comparing the Original Version with the Modified Version. + +To "Propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification and with or without charging +a redistribution fee), making available to the public, and in some +countries other activities as well. + +PERMISSION & CONDITIONS +This licence does not grant any rights under trademark law and all such +rights are reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of the Font Software, to propagate the Font Software, subject to +the below conditions: + +1) Each copy of the Font Software must contain the above copyright +notice and this licence. 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. + +2) The font name complies with the following: +(a) The Original Version must retain its name, unmodified. +(b) Modified Versions which are Substantially Changed must be renamed to +avoid use of the name of the Original Version or similar names entirely. +(c) Modified Versions which are not Substantially Changed must be +renamed to both (i) retain the name of the Original Version and (ii) add +additional naming elements to distinguish the Modified Version from the +Original Version. The name of such Modified Versions must be the name of +the Original Version, with "derivative X" where X represents the name of +the new work, appended to that name. + +3) The name(s) of the Copyright Holder(s) and any contributor to the +Font Software shall not be used to promote, endorse or advertise any +Modified Version, except (i) as required by this licence, (ii) to +acknowledge the contribution(s) of the Copyright Holder(s) or (iii) with +their explicit written permission. + +4) The Font Software, modified or unmodified, in part or in whole, must +be distributed entirely under this licence, and must not be distributed +under any other licence. The requirement for fonts to remain under this +licence does not affect any document created using the Font Software, +except any version of the Font Software extracted from a document +created using the Font Software may only be distributed under this +licence. + +TERMINATION +This licence 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. diff --git a/ubuntu/fonts/original-pack/README.txt b/ubuntu/fonts/original-pack/README.txt new file mode 100755 index 0000000..5602821 --- /dev/null +++ b/ubuntu/fonts/original-pack/README.txt @@ -0,0 +1,16 @@ + ---------------------- + Ubuntu Font Family + ====================== + +The Ubuntu Font Family are a set of matching new libre/open fonts in +development during 2010--2011. And with further expansion work and +bug fixing during 2015. The development is being funded by +Canonical Ltd on behalf the wider Free Software community and the +Ubuntu project. The technical font design work and implementation is +being undertaken by Dalton Maag. + +Both the final font Truetype/OpenType files and the design files used +to produce the font family are distributed under an open licence and +you are expressly encouraged to experiment, modify, share and improve. + + http://font.ubuntu.com/ diff --git a/ubuntu/fonts/original-pack/TRADEMARKS.txt b/ubuntu/fonts/original-pack/TRADEMARKS.txt new file mode 100755 index 0000000..d34265b --- /dev/null +++ b/ubuntu/fonts/original-pack/TRADEMARKS.txt @@ -0,0 +1,4 @@ +Ubuntu and Canonical are registered trademarks of Canonical Ltd. + +The licence accompanying these works does not grant any rights +under trademark law and all such rights are reserved. diff --git a/ubuntu/fonts/original-pack/Ubuntu-B.ttf b/ubuntu/fonts/original-pack/Ubuntu-B.ttf new file mode 100755 index 0000000..b173da2 Binary files /dev/null and b/ubuntu/fonts/original-pack/Ubuntu-B.ttf differ diff --git a/ubuntu/fonts/original-pack/Ubuntu-BI.ttf b/ubuntu/fonts/original-pack/Ubuntu-BI.ttf new file mode 100755 index 0000000..72a5a99 Binary files /dev/null and b/ubuntu/fonts/original-pack/Ubuntu-BI.ttf differ diff --git a/ubuntu/fonts/original-pack/Ubuntu-C.ttf b/ubuntu/fonts/original-pack/Ubuntu-C.ttf new file mode 100755 index 0000000..602a3ee Binary files /dev/null and b/ubuntu/fonts/original-pack/Ubuntu-C.ttf differ diff --git a/ubuntu/fonts/original-pack/Ubuntu-L.ttf b/ubuntu/fonts/original-pack/Ubuntu-L.ttf new file mode 100755 index 0000000..ed0f5bc Binary files /dev/null and b/ubuntu/fonts/original-pack/Ubuntu-L.ttf differ diff --git a/ubuntu/fonts/original-pack/Ubuntu-LI.ttf b/ubuntu/fonts/original-pack/Ubuntu-LI.ttf new file mode 100755 index 0000000..c6cec55 Binary files /dev/null and b/ubuntu/fonts/original-pack/Ubuntu-LI.ttf differ diff --git a/ubuntu/fonts/original-pack/Ubuntu-M.ttf b/ubuntu/fonts/original-pack/Ubuntu-M.ttf new file mode 100755 index 0000000..ca9c03a Binary files /dev/null and b/ubuntu/fonts/original-pack/Ubuntu-M.ttf differ diff --git a/ubuntu/fonts/original-pack/Ubuntu-MI.ttf b/ubuntu/fonts/original-pack/Ubuntu-MI.ttf new file mode 100755 index 0000000..e8d186c Binary files /dev/null and b/ubuntu/fonts/original-pack/Ubuntu-MI.ttf differ diff --git a/ubuntu/fonts/original-pack/Ubuntu-R.ttf b/ubuntu/fonts/original-pack/Ubuntu-R.ttf new file mode 100755 index 0000000..d748728 Binary files /dev/null and b/ubuntu/fonts/original-pack/Ubuntu-R.ttf differ diff --git a/ubuntu/fonts/original-pack/Ubuntu-RI.ttf b/ubuntu/fonts/original-pack/Ubuntu-RI.ttf new file mode 100755 index 0000000..4f2d2bc Binary files /dev/null and b/ubuntu/fonts/original-pack/Ubuntu-RI.ttf differ diff --git a/ubuntu/fonts/original-pack/UbuntuMono-B.ttf b/ubuntu/fonts/original-pack/UbuntuMono-B.ttf new file mode 100755 index 0000000..7bd6665 Binary files /dev/null and b/ubuntu/fonts/original-pack/UbuntuMono-B.ttf differ diff --git a/ubuntu/fonts/original-pack/UbuntuMono-BI.ttf b/ubuntu/fonts/original-pack/UbuntuMono-BI.ttf new file mode 100755 index 0000000..6c5b8ba Binary files /dev/null and b/ubuntu/fonts/original-pack/UbuntuMono-BI.ttf differ diff --git a/ubuntu/fonts/original-pack/UbuntuMono-R.ttf b/ubuntu/fonts/original-pack/UbuntuMono-R.ttf new file mode 100755 index 0000000..fdd309d Binary files /dev/null and b/ubuntu/fonts/original-pack/UbuntuMono-R.ttf differ diff --git a/ubuntu/fonts/original-pack/UbuntuMono-RI.ttf b/ubuntu/fonts/original-pack/UbuntuMono-RI.ttf new file mode 100755 index 0000000..18f81a2 Binary files /dev/null and b/ubuntu/fonts/original-pack/UbuntuMono-RI.ttf differ diff --git a/ubuntu/fonts/original-pack/copyright.txt b/ubuntu/fonts/original-pack/copyright.txt new file mode 100755 index 0000000..7734070 --- /dev/null +++ b/ubuntu/fonts/original-pack/copyright.txt @@ -0,0 +1,5 @@ +Copyright 2010,2011 Canonical Ltd. + +This Font Software is licensed under the Ubuntu Font Licence, Version +1.0. https://launchpad.net/ubuntu-font-licence + diff --git a/ubuntu/fonts/ubuntu-bold-italic-webfont.eot b/ubuntu/fonts/ubuntu-bold-italic-webfont.eot new file mode 100755 index 0000000..9be35a0 Binary files /dev/null and b/ubuntu/fonts/ubuntu-bold-italic-webfont.eot differ diff --git a/ubuntu/fonts/ubuntu-bold-italic-webfont.svg b/ubuntu/fonts/ubuntu-bold-italic-webfont.svg new file mode 100755 index 0000000..8991b3f --- /dev/null +++ b/ubuntu/fonts/ubuntu-bold-italic-webfont.svg @@ -0,0 +1,2405 @@ + + +!"#$%&'()*+,-./0123456789:;å<>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_` abcdefghijklmnopqrstuvwxyz|{}~ \ No newline at end of file diff --git a/ubuntu/fonts/ubuntu-bold-italic-webfont.ttf b/ubuntu/fonts/ubuntu-bold-italic-webfont.ttf new file mode 100755 index 0000000..72a5a99 Binary files /dev/null and b/ubuntu/fonts/ubuntu-bold-italic-webfont.ttf differ diff --git a/ubuntu/fonts/ubuntu-bold-italic-webfont.woff b/ubuntu/fonts/ubuntu-bold-italic-webfont.woff new file mode 100755 index 0000000..5e1a99d Binary files /dev/null and b/ubuntu/fonts/ubuntu-bold-italic-webfont.woff differ diff --git a/ubuntu/fonts/ubuntu-bold-italic-webfont.woff2 b/ubuntu/fonts/ubuntu-bold-italic-webfont.woff2 new file mode 100755 index 0000000..c5c0efc Binary files /dev/null and b/ubuntu/fonts/ubuntu-bold-italic-webfont.woff2 differ diff --git a/ubuntu/fonts/ubuntu-bold-webfont.eot b/ubuntu/fonts/ubuntu-bold-webfont.eot new file mode 100755 index 0000000..4eff319 Binary files /dev/null and b/ubuntu/fonts/ubuntu-bold-webfont.eot differ diff --git a/ubuntu/fonts/ubuntu-bold-webfont.svg b/ubuntu/fonts/ubuntu-bold-webfont.svg new file mode 100755 index 0000000..f9fd661 --- /dev/null +++ b/ubuntu/fonts/ubuntu-bold-webfont.svg @@ -0,0 +1,2405 @@ + + +!"#$%&'()*+,-./0123456789:;å<>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_` abcdefghijklmnopqrstuvwxyz|{}~ \ No newline at end of file diff --git a/ubuntu/fonts/ubuntu-bold-webfont.ttf b/ubuntu/fonts/ubuntu-bold-webfont.ttf new file mode 100755 index 0000000..b173da2 Binary files /dev/null and b/ubuntu/fonts/ubuntu-bold-webfont.ttf differ diff --git a/ubuntu/fonts/ubuntu-bold-webfont.woff b/ubuntu/fonts/ubuntu-bold-webfont.woff new file mode 100755 index 0000000..5486801 Binary files /dev/null and b/ubuntu/fonts/ubuntu-bold-webfont.woff differ diff --git a/ubuntu/fonts/ubuntu-bold-webfont.woff2 b/ubuntu/fonts/ubuntu-bold-webfont.woff2 new file mode 100755 index 0000000..20fef3d Binary files /dev/null and b/ubuntu/fonts/ubuntu-bold-webfont.woff2 differ diff --git a/ubuntu/fonts/ubuntu-condensed-webfont.eot b/ubuntu/fonts/ubuntu-condensed-webfont.eot new file mode 100755 index 0000000..f571d5d Binary files /dev/null and b/ubuntu/fonts/ubuntu-condensed-webfont.eot differ diff --git a/ubuntu/fonts/ubuntu-condensed-webfont.svg b/ubuntu/fonts/ubuntu-condensed-webfont.svg new file mode 100755 index 0000000..0f872a4 --- /dev/null +++ b/ubuntu/fonts/ubuntu-condensed-webfont.svg @@ -0,0 +1,2401 @@ + + +!"#$%&'()*+,-./0123456789:;å<>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_` abcdefghijklmnopqrstuvwxyz|{}~ \ No newline at end of file diff --git a/ubuntu/fonts/ubuntu-condensed-webfont.ttf b/ubuntu/fonts/ubuntu-condensed-webfont.ttf new file mode 100755 index 0000000..602a3ee Binary files /dev/null and b/ubuntu/fonts/ubuntu-condensed-webfont.ttf differ diff --git a/ubuntu/fonts/ubuntu-condensed-webfont.woff b/ubuntu/fonts/ubuntu-condensed-webfont.woff new file mode 100755 index 0000000..a5a252c Binary files /dev/null and b/ubuntu/fonts/ubuntu-condensed-webfont.woff differ diff --git a/ubuntu/fonts/ubuntu-condensed-webfont.woff2 b/ubuntu/fonts/ubuntu-condensed-webfont.woff2 new file mode 100755 index 0000000..5f48280 Binary files /dev/null and b/ubuntu/fonts/ubuntu-condensed-webfont.woff2 differ diff --git a/ubuntu/fonts/ubuntu-light-italic-webfont.eot b/ubuntu/fonts/ubuntu-light-italic-webfont.eot new file mode 100755 index 0000000..fb5af35 Binary files /dev/null and b/ubuntu/fonts/ubuntu-light-italic-webfont.eot differ diff --git a/ubuntu/fonts/ubuntu-light-italic-webfont.svg b/ubuntu/fonts/ubuntu-light-italic-webfont.svg new file mode 100755 index 0000000..cfc2162 --- /dev/null +++ b/ubuntu/fonts/ubuntu-light-italic-webfont.svg @@ -0,0 +1,2405 @@ + + +!"#$%&'()*+,-./0123456789:;å<>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_` abcdefghijklmnopqrstuvwxyz|{}~ \ No newline at end of file diff --git a/ubuntu/fonts/ubuntu-light-italic-webfont.ttf b/ubuntu/fonts/ubuntu-light-italic-webfont.ttf new file mode 100755 index 0000000..c6cec55 Binary files /dev/null and b/ubuntu/fonts/ubuntu-light-italic-webfont.ttf differ diff --git a/ubuntu/fonts/ubuntu-light-italic-webfont.woff b/ubuntu/fonts/ubuntu-light-italic-webfont.woff new file mode 100755 index 0000000..91b3786 Binary files /dev/null and b/ubuntu/fonts/ubuntu-light-italic-webfont.woff differ diff --git a/ubuntu/fonts/ubuntu-light-italic-webfont.woff2 b/ubuntu/fonts/ubuntu-light-italic-webfont.woff2 new file mode 100755 index 0000000..5844f9f Binary files /dev/null and b/ubuntu/fonts/ubuntu-light-italic-webfont.woff2 differ diff --git a/ubuntu/fonts/ubuntu-light-webfont.eot b/ubuntu/fonts/ubuntu-light-webfont.eot new file mode 100755 index 0000000..5b030ee Binary files /dev/null and b/ubuntu/fonts/ubuntu-light-webfont.eot differ diff --git a/ubuntu/fonts/ubuntu-light-webfont.svg b/ubuntu/fonts/ubuntu-light-webfont.svg new file mode 100755 index 0000000..cdfc81d --- /dev/null +++ b/ubuntu/fonts/ubuntu-light-webfont.svg @@ -0,0 +1,2405 @@ + + +!"#$%&'()*+,-./0123456789:;å<>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_` abcdefghijklmnopqrstuvwxyz|{}~ \ No newline at end of file diff --git a/ubuntu/fonts/ubuntu-light-webfont.ttf b/ubuntu/fonts/ubuntu-light-webfont.ttf new file mode 100755 index 0000000..ed0f5bc Binary files /dev/null and b/ubuntu/fonts/ubuntu-light-webfont.ttf differ diff --git a/ubuntu/fonts/ubuntu-light-webfont.woff b/ubuntu/fonts/ubuntu-light-webfont.woff new file mode 100755 index 0000000..a492156 Binary files /dev/null and b/ubuntu/fonts/ubuntu-light-webfont.woff differ diff --git a/ubuntu/fonts/ubuntu-light-webfont.woff2 b/ubuntu/fonts/ubuntu-light-webfont.woff2 new file mode 100755 index 0000000..b355e18 Binary files /dev/null and b/ubuntu/fonts/ubuntu-light-webfont.woff2 differ diff --git a/ubuntu/fonts/ubuntu-medium-italic-webfont.eot b/ubuntu/fonts/ubuntu-medium-italic-webfont.eot new file mode 100755 index 0000000..4ee7202 Binary files /dev/null and b/ubuntu/fonts/ubuntu-medium-italic-webfont.eot differ diff --git a/ubuntu/fonts/ubuntu-medium-italic-webfont.svg b/ubuntu/fonts/ubuntu-medium-italic-webfont.svg new file mode 100755 index 0000000..ed74849 --- /dev/null +++ b/ubuntu/fonts/ubuntu-medium-italic-webfont.svg @@ -0,0 +1,2405 @@ + + +!"#$%&'()*+,-./0123456789:;å<>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_` abcdefghijklmnopqrstuvwxyz|{}~ \ No newline at end of file diff --git a/ubuntu/fonts/ubuntu-medium-italic-webfont.ttf b/ubuntu/fonts/ubuntu-medium-italic-webfont.ttf new file mode 100755 index 0000000..e8d186c Binary files /dev/null and b/ubuntu/fonts/ubuntu-medium-italic-webfont.ttf differ diff --git a/ubuntu/fonts/ubuntu-medium-italic-webfont.woff b/ubuntu/fonts/ubuntu-medium-italic-webfont.woff new file mode 100755 index 0000000..a9d05d8 Binary files /dev/null and b/ubuntu/fonts/ubuntu-medium-italic-webfont.woff differ diff --git a/ubuntu/fonts/ubuntu-medium-italic-webfont.woff2 b/ubuntu/fonts/ubuntu-medium-italic-webfont.woff2 new file mode 100755 index 0000000..4c316b8 Binary files /dev/null and b/ubuntu/fonts/ubuntu-medium-italic-webfont.woff2 differ diff --git a/ubuntu/fonts/ubuntu-medium-webfont.eot b/ubuntu/fonts/ubuntu-medium-webfont.eot new file mode 100755 index 0000000..6a8ba70 Binary files /dev/null and b/ubuntu/fonts/ubuntu-medium-webfont.eot differ diff --git a/ubuntu/fonts/ubuntu-medium-webfont.svg b/ubuntu/fonts/ubuntu-medium-webfont.svg new file mode 100755 index 0000000..a30ae93 --- /dev/null +++ b/ubuntu/fonts/ubuntu-medium-webfont.svg @@ -0,0 +1,2405 @@ + + +!"#$%&'()*+,-./0123456789:;å<>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_` abcdefghijklmnopqrstuvwxyz|{}~ \ No newline at end of file diff --git a/ubuntu/fonts/ubuntu-medium-webfont.ttf b/ubuntu/fonts/ubuntu-medium-webfont.ttf new file mode 100755 index 0000000..ca9c03a Binary files /dev/null and b/ubuntu/fonts/ubuntu-medium-webfont.ttf differ diff --git a/ubuntu/fonts/ubuntu-medium-webfont.woff b/ubuntu/fonts/ubuntu-medium-webfont.woff new file mode 100755 index 0000000..d116e5e Binary files /dev/null and b/ubuntu/fonts/ubuntu-medium-webfont.woff differ diff --git a/ubuntu/fonts/ubuntu-medium-webfont.woff2 b/ubuntu/fonts/ubuntu-medium-webfont.woff2 new file mode 100755 index 0000000..055e4cf Binary files /dev/null and b/ubuntu/fonts/ubuntu-medium-webfont.woff2 differ diff --git a/ubuntu/fonts/ubuntu-regular-italic-webfont.eot b/ubuntu/fonts/ubuntu-regular-italic-webfont.eot new file mode 100755 index 0000000..b2dfdc2 Binary files /dev/null and b/ubuntu/fonts/ubuntu-regular-italic-webfont.eot differ diff --git a/ubuntu/fonts/ubuntu-regular-italic-webfont.svg b/ubuntu/fonts/ubuntu-regular-italic-webfont.svg new file mode 100755 index 0000000..91d08d8 --- /dev/null +++ b/ubuntu/fonts/ubuntu-regular-italic-webfont.svg @@ -0,0 +1,2405 @@ + + +!"#$%&'()*+,-./0123456789:;å<>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_` abcdefghijklmnopqrstuvwxyz|{}~ \ No newline at end of file diff --git a/ubuntu/fonts/ubuntu-regular-italic-webfont.ttf b/ubuntu/fonts/ubuntu-regular-italic-webfont.ttf new file mode 100755 index 0000000..4f2d2bc Binary files /dev/null and b/ubuntu/fonts/ubuntu-regular-italic-webfont.ttf differ diff --git a/ubuntu/fonts/ubuntu-regular-italic-webfont.woff b/ubuntu/fonts/ubuntu-regular-italic-webfont.woff new file mode 100755 index 0000000..298bc58 Binary files /dev/null and b/ubuntu/fonts/ubuntu-regular-italic-webfont.woff differ diff --git a/ubuntu/fonts/ubuntu-regular-italic-webfont.woff2 b/ubuntu/fonts/ubuntu-regular-italic-webfont.woff2 new file mode 100755 index 0000000..90af5d7 Binary files /dev/null and b/ubuntu/fonts/ubuntu-regular-italic-webfont.woff2 differ diff --git a/ubuntu/fonts/ubuntu-regular-webfont.eot b/ubuntu/fonts/ubuntu-regular-webfont.eot new file mode 100755 index 0000000..87f22e6 Binary files /dev/null and b/ubuntu/fonts/ubuntu-regular-webfont.eot differ diff --git a/ubuntu/fonts/ubuntu-regular-webfont.svg b/ubuntu/fonts/ubuntu-regular-webfont.svg new file mode 100755 index 0000000..542bc76 --- /dev/null +++ b/ubuntu/fonts/ubuntu-regular-webfont.svg @@ -0,0 +1,2405 @@ + + +!"#$%&'()*+,-./0123456789:;å<>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_` abcdefghijklmnopqrstuvwxyz|{}~ \ No newline at end of file diff --git a/ubuntu/fonts/ubuntu-regular-webfont.ttf b/ubuntu/fonts/ubuntu-regular-webfont.ttf new file mode 100755 index 0000000..d748728 Binary files /dev/null and b/ubuntu/fonts/ubuntu-regular-webfont.ttf differ diff --git a/ubuntu/fonts/ubuntu-regular-webfont.woff b/ubuntu/fonts/ubuntu-regular-webfont.woff new file mode 100755 index 0000000..29e0a37 Binary files /dev/null and b/ubuntu/fonts/ubuntu-regular-webfont.woff differ diff --git a/ubuntu/fonts/ubuntu-regular-webfont.woff2 b/ubuntu/fonts/ubuntu-regular-webfont.woff2 new file mode 100755 index 0000000..1ab75a4 Binary files /dev/null and b/ubuntu/fonts/ubuntu-regular-webfont.woff2 differ diff --git a/ubuntu/fonts/ubuntumono-bold-italic-webfont.eot b/ubuntu/fonts/ubuntumono-bold-italic-webfont.eot new file mode 100755 index 0000000..7a3b09b Binary files /dev/null and b/ubuntu/fonts/ubuntumono-bold-italic-webfont.eot differ diff --git a/ubuntu/fonts/ubuntumono-bold-italic-webfont.svg b/ubuntu/fonts/ubuntumono-bold-italic-webfont.svg new file mode 100755 index 0000000..a3041f6 --- /dev/null +++ b/ubuntu/fonts/ubuntumono-bold-italic-webfont.svg @@ -0,0 +1,2465 @@ + + +!"#$%&'()*+,-./0123456789:;å<>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_` abcdefghijklmnopqrstuvwxyz|{}~ \ No newline at end of file diff --git a/ubuntu/fonts/ubuntumono-bold-italic-webfont.ttf b/ubuntu/fonts/ubuntumono-bold-italic-webfont.ttf new file mode 100755 index 0000000..6c5b8ba Binary files /dev/null and b/ubuntu/fonts/ubuntumono-bold-italic-webfont.ttf differ diff --git a/ubuntu/fonts/ubuntumono-bold-italic-webfont.woff b/ubuntu/fonts/ubuntumono-bold-italic-webfont.woff new file mode 100755 index 0000000..dbba9f4 Binary files /dev/null and b/ubuntu/fonts/ubuntumono-bold-italic-webfont.woff differ diff --git a/ubuntu/fonts/ubuntumono-bold-italic-webfont.woff2 b/ubuntu/fonts/ubuntumono-bold-italic-webfont.woff2 new file mode 100755 index 0000000..2ce32db Binary files /dev/null and b/ubuntu/fonts/ubuntumono-bold-italic-webfont.woff2 differ diff --git a/ubuntu/fonts/ubuntumono-bold-webfont.eot b/ubuntu/fonts/ubuntumono-bold-webfont.eot new file mode 100755 index 0000000..0755716 Binary files /dev/null and b/ubuntu/fonts/ubuntumono-bold-webfont.eot differ diff --git a/ubuntu/fonts/ubuntumono-bold-webfont.svg b/ubuntu/fonts/ubuntumono-bold-webfont.svg new file mode 100755 index 0000000..f657711 --- /dev/null +++ b/ubuntu/fonts/ubuntumono-bold-webfont.svg @@ -0,0 +1,2465 @@ + + +!"#$%&'()*+,-./0123456789:;å<>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_` abcdefghijklmnopqrstuvwxyz|{}~ \ No newline at end of file diff --git a/ubuntu/fonts/ubuntumono-bold-webfont.ttf b/ubuntu/fonts/ubuntumono-bold-webfont.ttf new file mode 100755 index 0000000..7bd6665 Binary files /dev/null and b/ubuntu/fonts/ubuntumono-bold-webfont.ttf differ diff --git a/ubuntu/fonts/ubuntumono-bold-webfont.woff b/ubuntu/fonts/ubuntumono-bold-webfont.woff new file mode 100755 index 0000000..5da9c8d Binary files /dev/null and b/ubuntu/fonts/ubuntumono-bold-webfont.woff differ diff --git a/ubuntu/fonts/ubuntumono-bold-webfont.woff2 b/ubuntu/fonts/ubuntumono-bold-webfont.woff2 new file mode 100755 index 0000000..9617bd7 Binary files /dev/null and b/ubuntu/fonts/ubuntumono-bold-webfont.woff2 differ diff --git a/ubuntu/fonts/ubuntumono-regular-italic-webfont.eot b/ubuntu/fonts/ubuntumono-regular-italic-webfont.eot new file mode 100755 index 0000000..34ae694 Binary files /dev/null and b/ubuntu/fonts/ubuntumono-regular-italic-webfont.eot differ diff --git a/ubuntu/fonts/ubuntumono-regular-italic-webfont.svg b/ubuntu/fonts/ubuntumono-regular-italic-webfont.svg new file mode 100755 index 0000000..8c82d1d --- /dev/null +++ b/ubuntu/fonts/ubuntumono-regular-italic-webfont.svg @@ -0,0 +1,2465 @@ + + +!"#$%&'()*+,-./0123456789:;å<>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_` abcdefghijklmnopqrstuvwxyz|{}~ \ No newline at end of file diff --git a/ubuntu/fonts/ubuntumono-regular-italic-webfont.ttf b/ubuntu/fonts/ubuntumono-regular-italic-webfont.ttf new file mode 100755 index 0000000..18f81a2 Binary files /dev/null and b/ubuntu/fonts/ubuntumono-regular-italic-webfont.ttf differ diff --git a/ubuntu/fonts/ubuntumono-regular-italic-webfont.woff b/ubuntu/fonts/ubuntumono-regular-italic-webfont.woff new file mode 100755 index 0000000..daf136d Binary files /dev/null and b/ubuntu/fonts/ubuntumono-regular-italic-webfont.woff differ diff --git a/ubuntu/fonts/ubuntumono-regular-italic-webfont.woff2 b/ubuntu/fonts/ubuntumono-regular-italic-webfont.woff2 new file mode 100755 index 0000000..d6363c2 Binary files /dev/null and b/ubuntu/fonts/ubuntumono-regular-italic-webfont.woff2 differ diff --git a/ubuntu/fonts/ubuntumono-regular-webfont.eot b/ubuntu/fonts/ubuntumono-regular-webfont.eot new file mode 100755 index 0000000..40a0551 Binary files /dev/null and b/ubuntu/fonts/ubuntumono-regular-webfont.eot differ diff --git a/ubuntu/fonts/ubuntumono-regular-webfont.svg b/ubuntu/fonts/ubuntumono-regular-webfont.svg new file mode 100755 index 0000000..ed933f8 --- /dev/null +++ b/ubuntu/fonts/ubuntumono-regular-webfont.svg @@ -0,0 +1,2465 @@ + + +!"#$%&'()*+,-./0123456789:;å<>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_` abcdefghijklmnopqrstuvwxyz|{}~ \ No newline at end of file diff --git a/ubuntu/fonts/ubuntumono-regular-webfont.ttf b/ubuntu/fonts/ubuntumono-regular-webfont.ttf new file mode 100755 index 0000000..fdd309d Binary files /dev/null and b/ubuntu/fonts/ubuntumono-regular-webfont.ttf differ diff --git a/ubuntu/fonts/ubuntumono-regular-webfont.woff b/ubuntu/fonts/ubuntumono-regular-webfont.woff new file mode 100755 index 0000000..d53a80b Binary files /dev/null and b/ubuntu/fonts/ubuntumono-regular-webfont.woff differ diff --git a/ubuntu/fonts/ubuntumono-regular-webfont.woff2 b/ubuntu/fonts/ubuntumono-regular-webfont.woff2 new file mode 100755 index 0000000..2320c01 Binary files /dev/null and b/ubuntu/fonts/ubuntumono-regular-webfont.woff2 differ diff --git a/ubuntu/package.json b/ubuntu/package.json new file mode 100755 index 0000000..48e51a6 --- /dev/null +++ b/ubuntu/package.json @@ -0,0 +1,21 @@ +{ + "name": "ubuntu-fontface", + "version": "0.1.13", + "description": "Ubuntu Font Family Bower-ready (also SASS-ready, LESS-ready, and plain CSS-ready)", + "homepage": "https://github.com/earaujoassis/ubuntu-fontface", + "author": "Ewerton Assis ", + "contributors": [ + "Jordan Last " + ], + "keywords": [ + "ubuntu", + "font", + "fontface", + "css", + "sass", + "less", + "web", + "design" + ], + "license": "SEE LICENSE IN README.md" +} diff --git a/ubuntu/site/.bowerrc b/ubuntu/site/.bowerrc new file mode 100755 index 0000000..235775b --- /dev/null +++ b/ubuntu/site/.bowerrc @@ -0,0 +1,3 @@ +{ + "directory": "_build/components" +} diff --git a/ubuntu/site/.gitignore b/ubuntu/site/.gitignore new file mode 100755 index 0000000..9b7101b --- /dev/null +++ b/ubuntu/site/.gitignore @@ -0,0 +1,3 @@ +_build +.git +.sass-cache diff --git a/ubuntu/site/_config.yml b/ubuntu/site/_config.yml new file mode 100755 index 0000000..c35160a --- /dev/null +++ b/ubuntu/site/_config.yml @@ -0,0 +1,20 @@ +# Site settings +title: Ubuntu Font (Bower project) +email: earaujoassis@gmail.com +description: Ubuntu Font Family Bower-ready +baseurl: "/ubuntu-fontface" +url: "https://earaujoassis.github.io" +creators_website: "http://earaujoassis.com" +twitter_username: earaujoassis +github_username: earaujoassis +github_project: evolve +source: . +destination: ./_build + +# Build settings +exclude: ['Gemfile', 'Gemfile.lock', 'bower.json', 'README.md'] +keep_files: ['components', '.git'] +markdown: kramdown +sass: + style: :compressed + sass_dir: _sass diff --git a/ubuntu/site/_includes/footer.html b/ubuntu/site/_includes/footer.html new file mode 100755 index 0000000..25c97c6 --- /dev/null +++ b/ubuntu/site/_includes/footer.html @@ -0,0 +1,12 @@ +
+
+
+

Created and maintained by Ewerton Assis © {{ site.time | date: '%Y' }}

+
+
+ + + +
+
+ diff --git a/ubuntu/site/_includes/head.html b/ubuntu/site/_includes/head.html new file mode 100755 index 0000000..6857742 --- /dev/null +++ b/ubuntu/site/_includes/head.html @@ -0,0 +1,17 @@ + + + + + + {% if page.title %}{{ page.title }}{% else %}{{ site.title }}{% endif %} + + + + + + + + + + + diff --git a/ubuntu/site/_includes/header.html b/ubuntu/site/_includes/header.html new file mode 100755 index 0000000..745318c --- /dev/null +++ b/ubuntu/site/_includes/header.html @@ -0,0 +1,7 @@ + diff --git a/ubuntu/site/_layouts/default.html b/ubuntu/site/_layouts/default.html new file mode 100755 index 0000000..95b71e0 --- /dev/null +++ b/ubuntu/site/_layouts/default.html @@ -0,0 +1,13 @@ + + + {% include head.html %} + + {% include header.html %} +
+
+ {{ content }} +
+
+ {% include footer.html %} + + diff --git a/ubuntu/site/_sass/_layout.scss b/ubuntu/site/_sass/_layout.scss new file mode 100755 index 0000000..7071914 --- /dev/null +++ b/ubuntu/site/_sass/_layout.scss @@ -0,0 +1,75 @@ +body { + font-family: "Ubuntu", sans-serif; + background: #fff; + color: #444; +} + +h1, h2, h3, h4, h5, h6, p { + font-family: inherit; + color: inherit; + font-weight: 300; +} + +.button, button { + &.github { + margin: 0px; + padding: 0.5rem 1.4rem; + border-radius: 4px; + background: #f3f3f3 none repeat scroll 0% 0%; + box-shadow: 0px 2px 2px rgba(0, 0, 0, 0.25); + } +} + +.page-content, .site-footer { + .button, button { + &.button { + background: #dbdbdb none repeat scroll 0% 0%; + color: #777; + box-shadow: none; + } + } +} + +pre, code { + font-family: "Ubuntu Monospace", sans-serif; +} + +.site-header { + text-align: center; + background: #dd4814; + background: -moz-linear-gradient(left, #dd4814 0%, #772953 100%); + background: -webkit-gradient(linear, left top, right top, color-stop(0%,#dd4814), color-stop(100%,#772953)); + background: -webkit-linear-gradient(left, #dd4814 0%,#772953 100%); + background: -o-linear-gradient(left, #dd4814 0%,#772953 100%); + background: -ms-linear-gradient(left, #dd4814 0%,#772953 100%); + background: linear-gradient(to right, #dd4814 0%,#772953 100%); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#dd4814', endColorstr='#772953',GradientType=1 ); + box-shadow: 0px 3px 10px rgba(0, 0, 0, 0.25); + + h1 { + margin: 120px 0; + color: #fff; + font-weight: 300; + } +} + +.page-content { + padding: 50px 0 25px; + + blockquote { + margin-left: 30px; + } + + section ~ section { + margin-top: 25px; + } +} + +.site-footer { + padding: 25px 0 50px; + color: #b6b6b6; + + a { + color: #777; + } +} diff --git a/ubuntu/site/_sass/_syntax-highlighting.scss b/ubuntu/site/_sass/_syntax-highlighting.scss new file mode 100755 index 0000000..7e2530c --- /dev/null +++ b/ubuntu/site/_sass/_syntax-highlighting.scss @@ -0,0 +1,66 @@ +/** + * Syntax highlighting styles + */ +.highlight { + background: #fff; + + .c { color: #998; font-style: italic } // Comment + .err { color: #a61717; background-color: #e3d2d2 } // Error + .k { font-weight: 300 } // Keyword + .o { font-weight: 300 } // Operator + .cm { color: #998; font-style: italic } // Comment.Multiline + .cp { color: #999; font-weight: 300 } // Comment.Preproc + .c1 { color: #998; font-style: italic } // Comment.Single + .cs { color: #999; font-weight: 300; font-style: italic } // Comment.Special + .gd { color: #000; background-color: #fdd } // Generic.Deleted + .gd .x { color: #000; background-color: #faa } // Generic.Deleted.Specific + .ge { font-style: italic } // Generic.Emph + .gr { color: #a00 } // Generic.Error + .gh { color: #999 } // Generic.Heading + .gi { color: #000; background-color: #dfd } // Generic.Inserted + .gi .x { color: #000; background-color: #afa } // Generic.Inserted.Specific + .go { color: #888 } // Generic.Output + .gp { color: #555 } // Generic.Prompt + .gs { font-weight: 300 } // Generic.Strong + .gu { color: #aaa } // Generic.Subheading + .gt { color: #a00 } // Generic.Traceback + .kc { font-weight: 300 } // Keyword.Constant + .kd { font-weight: 300 } // Keyword.Declaration + .kp { font-weight: 300 } // Keyword.Pseudo + .kr { font-weight: 300 } // Keyword.Reserved + .kt { color: #458; font-weight: 300 } // Keyword.Type + .m { color: #099 } // Literal.Number + .s { color: #d14 } // Literal.String + .na { color: #008080 } // Name.Attribute + .nb { color: #0086B3 } // Name.Builtin + .nc { color: #458; font-weight: 300 } // Name.Class + .no { color: #008080 } // Name.Constant + .ni { color: #800080 } // Name.Entity + .ne { color: #900; font-weight: 300 } // Name.Exception + .nf { color: #900; font-weight: 300 } // Name.Function + .nn { color: #555 } // Name.Namespace + .nt { color: #000080 } // Name.Tag + .nv { color: #008080 } // Name.Variable + .ow { font-weight: 300 } // Operator.Word + .w { color: #bbb } // Text.Whitespace + .mf { color: #099 } // Literal.Number.Float + .mh { color: #099 } // Literal.Number.Hex + .mi { color: #099 } // Literal.Number.Integer + .mo { color: #099 } // Literal.Number.Oct + .sb { color: #d14 } // Literal.String.Backtick + .sc { color: #d14 } // Literal.String.Char + .sd { color: #d14 } // Literal.String.Doc + .s2 { color: #d14 } // Literal.String.Double + .se { color: #d14 } // Literal.String.Escape + .sh { color: #d14 } // Literal.String.Heredoc + .si { color: #d14 } // Literal.String.Interpol + .sx { color: #d14 } // Literal.String.Other + .sr { color: #009926 } // Literal.String.Regex + .s1 { color: #d14 } // Literal.String.Single + .ss { color: #990073 } // Literal.String.Symbol + .bp { color: #999 } // Name.Builtin.Pseudo + .vc { color: #008080 } // Name.Variable.Class + .vg { color: #008080 } // Name.Variable.Global + .vi { color: #008080 } // Name.Variable.Instance + .il { color: #099 } // Literal.Number.Integer.Long +} diff --git a/ubuntu/site/about.md b/ubuntu/site/about.md new file mode 100755 index 0000000..894d1bd --- /dev/null +++ b/ubuntu/site/about.md @@ -0,0 +1,14 @@ +# Ubuntu Font Family + +> Ubuntu Font Family Bower-ready (also SCSS-ready, LESS-ready, and plain CSS-ready) + +**Requirements** + + * Ruby 1.9+ + `$ gem install jekyll` + * Bower (Node.js + NPM) + `$ bower install` + +To test the web page locally, run `$ jekyll serve` and open the browser in http://localhost:400/ubuntu-fontface/. + +## License + +Code under [MIT License](http://earaujoassis.mit-license.org/) © Ewerton Assis diff --git a/ubuntu/site/bower.json b/ubuntu/site/bower.json new file mode 100755 index 0000000..3f56fbf --- /dev/null +++ b/ubuntu/site/bower.json @@ -0,0 +1,36 @@ +{ + "name": "ubuntu-fontface/site", + "version": "0.1.13", + "homepage": "https://github.com/earaujoassis/ubuntu-fontface", + "authors": [ + "Ewerton Assis " + ], + "description": "Static website for the ubuntu-fontface project", + "keywords": [ + "ubuntu", + "font", + "fontface", + "css", + "sass", + "less", + "web", + "design" + ], + "main": "none", + "moduleType": [], + "license": "MIT", + "private": true, + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "_build/components", + "test", + "tests" + ], + "dependencies": { + "foundation": "~5.5.2", + "octicons": "~3.1.0", + "ubuntu-fontface": "~0.1.13" + } +} diff --git a/ubuntu/site/css/ubuntu-fontface-site.scss b/ubuntu/site/css/ubuntu-fontface-site.scss new file mode 100755 index 0000000..862a049 --- /dev/null +++ b/ubuntu/site/css/ubuntu-fontface-site.scss @@ -0,0 +1,6 @@ +--- +# Only the main Sass file needs front matter (the dashes are enough) +--- +@charset "utf-8"; + +@import "layout", "syntax-highlighting"; diff --git a/ubuntu/site/index.html b/ubuntu/site/index.html new file mode 100755 index 0000000..0f1ed59 --- /dev/null +++ b/ubuntu/site/index.html @@ -0,0 +1,67 @@ +--- +layout: default +--- +
+
+
+
+

How to use it

+
+
+ + + +
+
+
+
+
    +
  1. +

    Install it from Bower

    +
    +  $ bower install [--save] ubuntu-fontface
    +            
    +
  2. +
  3. +

    Import it on SCSS/LESS/CSS source code. Assuming {BOWER_PATH} is bower_components; + {SUFFIX} options are -base, -condensed and -mono; + {EXTENSION} options are css, less, scss, + depending whether you're using pure CSS, SCSS or LESS. The {SUFFIX} is not available if you're importing the pure CSS file. + A minified file is available for the pure CSS version.

    +
    +  @import "{BOWER_PATH}/ubuntu-fontface/ubuntu{SUFFIX}.{EXTENSION}";
    +            
    +
  4. +
  5. +

    If you need any help (or have found any bug 🐞), please post it on /issues. Thank you!

    +
  6. +
+
+
+
+
+
+

Examples

+
+

Любо́вь сильне́е сме́рти и стра́ха сме́рти. То́лько е́ю, то́лько любо́вью де́ржится и движется жизнь.

+
И.С.Тургенев (1818 – 1883)
+
+
+

θάνατος οὐδὲν διαφέρει τοῦ ζῆν.

+
Θαλῆς (ὁ Μιλήσιος) (c. 624 – c. 546 BC)
+
+
+

Außerordentliche Übel erfordern außerordentliche Mittel

+
Unknown author
+
+
+

Those who make quick decisions are not also safe.

+
Unknown author
+
+
+

Plus ça change, plus c'est la même chose.

+ +
+
+
+
diff --git a/ubuntu/ubuntu-base.less b/ubuntu/ubuntu-base.less new file mode 100755 index 0000000..bf965f3 --- /dev/null +++ b/ubuntu/ubuntu-base.less @@ -0,0 +1,116 @@ +/* Ubuntu Font Family Bower-ready v0.1.13 */ +/* Ubuntu @font-face kit */ + +@UbuntuFontsPath: "./fonts"; + +/* BEGIN Ubuntu Light */ +@font-face { + font-family: 'Ubuntu'; + src: url('@{UbuntuFontsPath}/ubuntu-light-webfont.eot'); + src: url('@{UbuntuFontsPath}/ubuntu-light-webfont.eot?#iefix') format('embedded-opentype'), + url('@{UbuntuFontsPath}/ubuntu-light-webfont.woff2') format('woff2'), + url('@{UbuntuFontsPath}/ubuntu-light-webfont.woff') format('woff'), + url('@{UbuntuFontsPath}/ubuntu-light-webfont.ttf') format('truetype'), + url('@{UbuntuFontsPath}/ubuntu-light-webfont.svg#ubuntulight') format('svg'); + font-weight: 300; + font-style: normal; +} +/* END Ubuntu Light */ + +/* BEGIN Ubuntu Light Italic */ +@font-face { + font-family: 'Ubuntu'; + src: url('@{UbuntuFontsPath}/ubuntu-light-italic-webfont.eot'); + src: url('@{UbuntuFontsPath}/ubuntu-light-italic-webfont.eot?#iefix') format('embedded-opentype'), + url('@{UbuntuFontsPath}/ubuntu-light-italic-webfont.woff2') format('woff2'), + url('@{UbuntuFontsPath}/ubuntu-light-italic-webfont.woff') format('woff'), + url('@{UbuntuFontsPath}/ubuntu-light-italic-webfont.ttf') format('truetype'), + url('@{UbuntuFontsPath}/ubuntu-light-italic-webfont.svg#ubuntulight_italic') format('svg'); + font-weight: 300; + font-style: italic; +} +/* END Ubuntu Light Italic */ + +/* BEGIN Ubuntu Regular */ +@font-face { + font-family: 'Ubuntu'; + src: url('@{UbuntuFontsPath}/ubuntu-regular-webfont.eot'); + src: url('@{UbuntuFontsPath}/ubuntu-regular-webfont.eot?#iefix') format('embedded-opentype'), + url('@{UbuntuFontsPath}/ubuntu-regular-webfont.woff2') format('woff2'), + url('@{UbuntuFontsPath}/ubuntu-regular-webfont.woff') format('woff'), + url('@{UbuntuFontsPath}/ubuntu-regular-webfont.ttf') format('truetype'), + url('@{UbuntuFontsPath}/ubuntu-regular-webfont.svg#ubunturegular') format('svg'); + font-weight: normal; + font-style: normal; +} +/* END Ubuntu Regular */ + +/* BEGIN Ubuntu Regular Italic */ +@font-face { + font-family: 'Ubuntu'; + src: url('@{UbuntuFontsPath}/ubuntu-regular-italic-webfont.eot'); + src: url('@{UbuntuFontsPath}/ubuntu-regular-italic-webfont.eot?#iefix') format('embedded-opentype'), + url('@{UbuntuFontsPath}/ubuntu-regular-italic-webfont.woff2') format('woff2'), + url('@{UbuntuFontsPath}/ubuntu-regular-italic-webfont.woff') format('woff'), + url('@{UbuntuFontsPath}/ubuntu-regular-italic-webfont.ttf') format('truetype'), + url('@{UbuntuFontsPath}/ubuntu-regular-italic-webfont.svg#ubuntuitalic') format('svg'); + font-weight: normal; + font-style: italic; +} +/* END Ubuntu Regular Italic */ + +/* BEGIN Ubuntu Medium */ +@font-face { + font-family: 'Ubuntu'; + src: url('@{UbuntuFontsPath}/ubuntu-medium-webfont.eot'); + src: url('@{UbuntuFontsPath}/ubuntu-medium-webfont.eot?#iefix') format('embedded-opentype'), + url('@{UbuntuFontsPath}/ubuntu-medium-webfont.woff2') format('woff2'), + url('@{UbuntuFontsPath}/ubuntu-medium-webfont.woff') format('woff'), + url('@{UbuntuFontsPath}/ubuntu-medium-webfont.ttf') format('truetype'), + url('@{UbuntuFontsPath}/ubuntu-medium-webfont.svg#ubuntumedium') format('svg'); + font-weight: 500; + font-style: normal; +} +/* END Ubuntu Medium */ + +/* BEGIN Ubuntu Medium Italic */ +@font-face { + font-family: 'Ubuntu'; + src: url('@{UbuntuFontsPath}/ubuntu-medium-italic-webfont.eot'); + src: url('@{UbuntuFontsPath}/ubuntu-medium-italic-webfont.eot?#iefix') format('embedded-opentype'), + url('@{UbuntuFontsPath}/ubuntu-medium-italic-webfont.woff2') format('woff2'), + url('@{UbuntuFontsPath}/ubuntu-medium-italic-webfont.woff') format('woff'), + url('@{UbuntuFontsPath}/ubuntu-medium-italic-webfont.ttf') format('truetype'), + url('@{UbuntuFontsPath}/ubuntu-medium-italic-webfont.svg#ubuntumedium_italic') format('svg'); + font-weight: 500; + font-style: italic; +} +/* END Ubuntu Medium Italic */ + +/* BEGIN Ubuntu Bold */ +@font-face { + font-family: 'Ubuntu'; + src: url('@{UbuntuFontsPath}/ubuntu-bold-webfont.eot'); + src: url('@{UbuntuFontsPath}/ubuntu-bold-webfont.eot?#iefix') format('embedded-opentype'), + url('@{UbuntuFontsPath}/ubuntu-bold-webfont.woff2') format('woff2'), + url('@{UbuntuFontsPath}/ubuntu-bold-webfont.woff') format('woff'), + url('@{UbuntuFontsPath}/ubuntu-bold-webfont.ttf') format('truetype'), + url('@{UbuntuFontsPath}/ubuntu-bold-webfont.svg#ubuntubold') format('svg'); + font-weight: bold; + font-style: normal; +} +/* END Ubuntu Bold */ + +/* BEGIN Ubuntu Bold Italic */ +@font-face { + font-family: 'Ubuntu'; + src: url('@{UbuntuFontsPath}/ubuntu-bold-italic-webfont.eot'); + src: url('@{UbuntuFontsPath}/ubuntu-bold-italic-webfont.eot?#iefix') format('embedded-opentype'), + url('@{UbuntuFontsPath}/ubuntu-bold-italic-webfont.woff2') format('woff2'), + url('@{UbuntuFontsPath}/ubuntu-bold-italic-webfont.woff') format('woff'), + url('@{UbuntuFontsPath}/ubuntu-bold-italic-webfont.ttf') format('truetype'), + url('@{UbuntuFontsPath}/ubuntu-bold-italic-webfont.svg#ubuntubold_italic') format('svg'); + font-weight: bold; + font-style: italic; +} +/* END Ubuntu Bold Italic */ diff --git a/ubuntu/ubuntu-condensed.less b/ubuntu/ubuntu-condensed.less new file mode 100755 index 0000000..364203d --- /dev/null +++ b/ubuntu/ubuntu-condensed.less @@ -0,0 +1,18 @@ +/* Ubuntu Font Family Bower-ready v0.1.13 */ +/* Ubuntu Condensed @font-face kit */ + +@UbuntuFontsPath: "./fonts"; + +/* BEGIN Ubuntu Condensed */ +@font-face { + font-family: 'Ubuntu Condensed'; + src: url('@{UbuntuFontsPath}/ubuntu-condensed-webfont.eot'); + src: url('@{UbuntuFontsPath}/ubuntu-condensed-webfont.eot?#iefix') format('embedded-opentype'), + url('@{UbuntuFontsPath}/ubuntu-condensed-webfont.woff2') format('woff2'), + url('@{UbuntuFontsPath}/ubuntu-condensed-webfont.woff') format('woff'), + url('@{UbuntuFontsPath}/ubuntu-condensed-webfont.ttf') format('truetype'), + url('@{UbuntuFontsPath}/ubuntu-condensed-webfont.svg#ubuntu_condensedregular') format('svg'); + font-weight: normal; + font-style: normal; +} +/* END Ubuntu Condensed */ diff --git a/ubuntu/ubuntu-mono.less b/ubuntu/ubuntu-mono.less new file mode 100755 index 0000000..cd27801 --- /dev/null +++ b/ubuntu/ubuntu-mono.less @@ -0,0 +1,62 @@ +/* Ubuntu Font Family Bower-ready v0.1.13 */ +/* Ubuntu Mono @font-face kit */ + +@UbuntuFontsPath: "./fonts"; + +/* BEGIN Ubuntu Mono Regular */ +@font-face { + font-family: 'Ubuntu Monospace'; + src: url('@{UbuntuFontsPath}/ubuntumono-regular-webfont.eot'); + src: url('@{UbuntuFontsPath}/ubuntumono-regular-webfont.eot?#iefix') format('embedded-opentype'), + url('@{UbuntuFontsPath}/ubuntumono-regular-webfont.woff2') format('woff2'), + url('@{UbuntuFontsPath}/ubuntumono-regular-webfont.woff') format('woff'), + url('@{UbuntuFontsPath}/ubuntumono-regular-webfont.ttf') format('truetype'), + url('@{UbuntuFontsPath}/ubuntumono-regular-webfont.svg#ubuntu_monoregular') format('svg'); + font-weight: normal; + font-style: normal; + +} +/* END Ubuntu Mono Regular */ + +/* BEGIN Ubuntu Mono Italic */ +@font-face { + font-family: 'Ubuntu Monospace'; + src: url('@{UbuntuFontsPath}/ubuntumono-regular-italic-webfont.eot'); + src: url('@{UbuntuFontsPath}/ubuntumono-regular-italic-webfont.eot?#iefix') format('embedded-opentype'), + url('@{UbuntuFontsPath}/ubuntumono-regular-italic-webfont.woff2') format('woff2'), + url('@{UbuntuFontsPath}/ubuntumono-regular-italic-webfont.woff') format('woff'), + url('@{UbuntuFontsPath}/ubuntumono-regular-italic-webfont.ttf') format('truetype'), + url('@{UbuntuFontsPath}/ubuntumono-regular-italic-webfont.svg#ubuntu_monoitalic') format('svg'); + font-weight: normal; + font-style: italic; +} +/* END Ubuntu Mono Italic */ + +/* BEGIN Ubuntu Mono Bold */ +@font-face { + font-family: 'Ubuntu Monospace'; + src: url('@{UbuntuFontsPath}/ubuntumono-bold-webfont.eot'); + src: url('@{UbuntuFontsPath}/ubuntumono-bold-webfont.eot?#iefix') format('embedded-opentype'), + url('@{UbuntuFontsPath}/ubuntumono-bold-webfont.woff2') format('woff2'), + url('@{UbuntuFontsPath}/ubuntumono-bold-webfont.woff') format('woff'), + url('@{UbuntuFontsPath}/ubuntumono-bold-webfont.ttf') format('truetype'), + url('@{UbuntuFontsPath}/ubuntumono-bold-webfont.svg#ubuntu_monobold') format('svg'); + font-weight: bold; + font-style: normal; +} +/* END Ubuntu Mono Bold */ + +/* BEGIN Ubuntu Mono Bold Italic */ +@font-face { + font-family: 'Ubuntu Monospace'; + src: url('@{UbuntuFontsPath}/ubuntumono-bold-italic-webfont.eot'); + src: url('@{UbuntuFontsPath}/ubuntumono-bold-italic-webfont.eot?#iefix') format('embedded-opentype'), + url('@{UbuntuFontsPath}/ubuntumono-bold-italic-webfont.woff2') format('woff2'), + url('@{UbuntuFontsPath}/ubuntumono-bold-italic-webfont.woff') format('woff'), + url('@{UbuntuFontsPath}/ubuntumono-bold-italic-webfont.ttf') format('truetype'), + url('@{UbuntuFontsPath}/ubuntumono-bold-italic-webfont.svg#ubuntu_monobold_italic') format('svg'); + font-weight: bold; + font-style: italic; + +} +/* END Ubuntu Mono Bold Italic */ diff --git a/ubuntu/ubuntu.css b/ubuntu/ubuntu.css new file mode 100755 index 0000000..2527c52 --- /dev/null +++ b/ubuntu/ubuntu.css @@ -0,0 +1,189 @@ +/* Ubuntu Font Family Bower-ready v0.1.13 */ + +/* BEGIN Ubuntu Light */ +@font-face { + font-family: 'Ubuntu'; + src: url('fonts/ubuntu-light-webfont.eot'); + src: url('fonts/ubuntu-light-webfont.eot?#iefix') format('embedded-opentype'), + url('fonts/ubuntu-light-webfont.woff2') format('woff2'), + url('fonts/ubuntu-light-webfont.woff') format('woff'), + url('fonts/ubuntu-light-webfont.ttf') format('truetype'), + url('fonts/ubuntu-light-webfont.svg#ubuntulight') format('svg'); + font-weight: 300; + font-style: normal; +} +/* END Ubuntu Light */ + +/* BEGIN Ubuntu Light Italic */ +@font-face { + font-family: 'Ubuntu'; + src: url('fonts/ubuntu-light-italic-webfont.eot'); + src: url('fonts/ubuntu-light-italic-webfont.eot?#iefix') format('embedded-opentype'), + url('fonts/ubuntu-light-italic-webfont.woff2') format('woff2'), + url('fonts/ubuntu-light-italic-webfont.woff') format('woff'), + url('fonts/ubuntu-light-italic-webfont.ttf') format('truetype'), + url('fonts/ubuntu-light-italic-webfont.svg#ubuntulight_italic') format('svg'); + font-weight: 300; + font-style: italic; +} +/* END Ubuntu Light Italic */ + +/* BEGIN Ubuntu Regular */ +@font-face { + font-family: 'Ubuntu'; + src: url('fonts/ubuntu-regular-webfont.eot'); + src: url('fonts/ubuntu-regular-webfont.eot?#iefix') format('embedded-opentype'), + url('fonts/ubuntu-regular-webfont.woff2') format('woff2'), + url('fonts/ubuntu-regular-webfont.woff') format('woff'), + url('fonts/ubuntu-regular-webfont.ttf') format('truetype'), + url('fonts/ubuntu-regular-webfont.svg#ubunturegular') format('svg'); + font-weight: normal; + font-style: normal; +} +/* END Ubuntu Regular */ + +/* BEGIN Ubuntu Regular Italic */ +@font-face { + font-family: 'Ubuntu'; + src: url('fonts/ubuntu-regular-italic-webfont.eot'); + src: url('fonts/ubuntu-regular-italic-webfont.eot?#iefix') format('embedded-opentype'), + url('fonts/ubuntu-regular-italic-webfont.woff2') format('woff2'), + url('fonts/ubuntu-regular-italic-webfont.woff') format('woff'), + url('fonts/ubuntu-regular-italic-webfont.ttf') format('truetype'), + url('fonts/ubuntu-regular-italic-webfont.svg#ubuntuitalic') format('svg'); + font-weight: normal; + font-style: italic; +} +/* END Ubuntu Regular Italic */ + +/* BEGIN Ubuntu Medium */ +@font-face { + font-family: 'Ubuntu'; + src: url('fonts/ubuntu-medium-webfont.eot'); + src: url('fonts/ubuntu-medium-webfont.eot?#iefix') format('embedded-opentype'), + url('fonts/ubuntu-medium-webfont.woff2') format('woff2'), + url('fonts/ubuntu-medium-webfont.woff') format('woff'), + url('fonts/ubuntu-medium-webfont.ttf') format('truetype'), + url('fonts/ubuntu-medium-webfont.svg#ubuntumedium') format('svg'); + font-weight: 500; + font-style: normal; +} +/* END Ubuntu Medium */ + +/* BEGIN Ubuntu Medium Italic */ +@font-face { + font-family: 'Ubuntu'; + src: url('fonts/ubuntu-medium-italic-webfont.eot'); + src: url('fonts/ubuntu-medium-italic-webfont.eot?#iefix') format('embedded-opentype'), + url('fonts/ubuntu-medium-italic-webfont.woff2') format('woff2'), + url('fonts/ubuntu-medium-italic-webfont.woff') format('woff'), + url('fonts/ubuntu-medium-italic-webfont.ttf') format('truetype'), + url('fonts/ubuntu-medium-italic-webfont.svg#ubuntumedium_italic') format('svg'); + font-weight: 500; + font-style: italic; +} +/* END Ubuntu Medium Italic */ + +/* BEGIN Ubuntu Bold */ +@font-face { + font-family: 'Ubuntu'; + src: url('fonts/ubuntu-bold-webfont.eot'); + src: url('fonts/ubuntu-bold-webfont.eot?#iefix') format('embedded-opentype'), + url('fonts/ubuntu-bold-webfont.woff2') format('woff2'), + url('fonts/ubuntu-bold-webfont.woff') format('woff'), + url('fonts/ubuntu-bold-webfont.ttf') format('truetype'), + url('fonts/ubuntu-bold-webfont.svg#ubuntubold') format('svg'); + font-weight: bold; + font-style: normal; +} +/* END Ubuntu Bold */ + +/* BEGIN Ubuntu Bold Italic */ +@font-face { + font-family: 'Ubuntu'; + src: url('fonts/ubuntu-bold-italic-webfont.eot'); + src: url('fonts/ubuntu-bold-italic-webfont.eot?#iefix') format('embedded-opentype'), + url('fonts/ubuntu-bold-italic-webfont.woff2') format('woff2'), + url('fonts/ubuntu-bold-italic-webfont.woff') format('woff'), + url('fonts/ubuntu-bold-italic-webfont.ttf') format('truetype'), + url('fonts/ubuntu-bold-italic-webfont.svg#ubuntubold_italic') format('svg'); + font-weight: bold; + font-style: italic; +} +/* END Ubuntu Bold Italic */ + + + +/* BEGIN Ubuntu Condensed */ +@font-face { + font-family: 'Ubuntu Condensed'; + src: url('fonts/ubuntu-condensed-webfont.eot'); + src: url('fonts/ubuntu-condensed-webfont.eot?#iefix') format('embedded-opentype'), + url('fonts/ubuntu-condensed-webfont.woff2') format('woff2'), + url('fonts/ubuntu-condensed-webfont.woff') format('woff'), + url('fonts/ubuntu-condensed-webfont.ttf') format('truetype'), + url('fonts/ubuntu-condensed-webfont.svg#ubuntu_condensedregular') format('svg'); + font-weight: normal; + font-style: normal; +} +/* END Ubuntu Condensed */ + + + +/* BEGIN Ubuntu Mono Regular */ +@font-face { + font-family: 'Ubuntu Monospace'; + src: url('fonts/ubuntumono-regular-webfont.eot'); + src: url('fonts/ubuntumono-regular-webfont.eot?#iefix') format('embedded-opentype'), + url('fonts/ubuntumono-regular-webfont.woff2') format('woff2'), + url('fonts/ubuntumono-regular-webfont.woff') format('woff'), + url('fonts/ubuntumono-regular-webfont.ttf') format('truetype'), + url('fonts/ubuntumono-regular-webfont.svg#ubuntu_monoregular') format('svg'); + font-weight: normal; + font-style: normal; + +} +/* END Ubuntu Mono Regular */ + +/* BEGIN Ubuntu Mono Italic */ +@font-face { + font-family: 'Ubuntu Monospace'; + src: url('fonts/ubuntumono-regular-italic-webfont.eot'); + src: url('fonts/ubuntumono-regular-italic-webfont.eot?#iefix') format('embedded-opentype'), + url('fonts/ubuntumono-regular-italic-webfont.woff2') format('woff2'), + url('fonts/ubuntumono-regular-italic-webfont.woff') format('woff'), + url('fonts/ubuntumono-regular-italic-webfont.ttf') format('truetype'), + url('fonts/ubuntumono-regular-italic-webfont.svg#ubuntu_monoitalic') format('svg'); + font-weight: normal; + font-style: italic; +} +/* END Ubuntu Mono Italic */ + +/* BEGIN Ubuntu Mono Bold */ +@font-face { + font-family: 'Ubuntu Monospace'; + src: url('fonts/ubuntumono-bold-webfont.eot'); + src: url('fonts/ubuntumono-bold-webfont.eot?#iefix') format('embedded-opentype'), + url('fonts/ubuntumono-bold-webfont.woff2') format('woff2'), + url('fonts/ubuntumono-bold-webfont.woff') format('woff'), + url('fonts/ubuntumono-bold-webfont.ttf') format('truetype'), + url('fonts/ubuntumono-bold-webfont.svg#ubuntu_monobold') format('svg'); + font-weight: bold; + font-style: normal; +} +/* END Ubuntu Mono Bold */ + +/* BEGIN Ubuntu Mono Bold Italic */ +@font-face { + font-family: 'Ubuntu Monospace'; + src: url('fonts/ubuntumono-bold-italic-webfont.eot'); + src: url('fonts/ubuntumono-bold-italic-webfont.eot?#iefix') format('embedded-opentype'), + url('fonts/ubuntumono-bold-italic-webfont.woff2') format('woff2'), + url('fonts/ubuntumono-bold-italic-webfont.woff') format('woff'), + url('fonts/ubuntumono-bold-italic-webfont.ttf') format('truetype'), + url('fonts/ubuntumono-bold-italic-webfont.svg#ubuntu_monobold_italic') format('svg'); + font-weight: bold; + font-style: italic; + +} +/* END Ubuntu Mono Bold Italic */ diff --git a/ubuntu/ubuntu.less b/ubuntu/ubuntu.less new file mode 100755 index 0000000..5b792bf --- /dev/null +++ b/ubuntu/ubuntu.less @@ -0,0 +1,8 @@ +/* Ubuntu Font Family Bower-ready v0.1.13 */ +/* Ubuntu (complete package) @font-face kit */ + +@UbuntuFontsPath: "./fonts"; + +@import "./ubuntu-base.less"; +@import "./ubuntu-condensed.less"; +@import "./ubuntu-mono.less"; diff --git a/ubuntu/ubuntu.min.css b/ubuntu/ubuntu.min.css new file mode 100755 index 0000000..49b00c6 --- /dev/null +++ b/ubuntu/ubuntu.min.css @@ -0,0 +1,2 @@ +/* Ubuntu Font Family Bower-ready v0.1.13 */ +@font-face{font-family:'Ubuntu';src:url(ubuntu/fonts/ubuntu-light-webfont.eot);src:url(ubuntu/fonts/ubuntu-light-webfont.eot?#iefix) format('embedded-opentype'),url(ubuntu/fonts/ubuntu-light-webfont.woff2) format('woff2'),url(ubuntu/fonts/ubuntu-light-webfont.woff) format('woff'),url(ubuntu/fonts/ubuntu-light-webfont.ttf) format('truetype'),url(ubuntu/fonts/ubuntu-light-webfont.svg#ubuntulight) format('svg');font-weight:300;font-style:normal}@font-face{font-family:'Ubuntu';src:url(ubuntu/fonts/ubuntu-light-italic-webfont.eot);src:url(ubuntu/fonts/ubuntu-light-italic-webfont.eot?#iefix) format('embedded-opentype'),url(ubuntu/fonts/ubuntu-light-italic-webfont.woff2) format('woff2'),url(ubuntu/fonts/ubuntu-light-italic-webfont.woff) format('woff'),url(ubuntu/fonts/ubuntu-light-italic-webfont.ttf) format('truetype'),url(ubuntu/fonts/ubuntu-light-italic-webfont.svg#ubuntulight_italic) format('svg');font-weight:300;font-style:italic}@font-face{font-family:'Ubuntu';src:url(ubuntu/fonts/ubuntu-regular-webfont.eot);src:url(ubuntu/fonts/ubuntu-regular-webfont.eot?#iefix) format('embedded-opentype'),url(ubuntu/fonts/ubuntu-regular-webfont.woff2) format('woff2'),url(ubuntu/fonts/ubuntu-regular-webfont.woff) format('woff'),url(ubuntu/fonts/ubuntu-regular-webfont.ttf) format('truetype'),url(ubuntu/fonts/ubuntu-regular-webfont.svg#ubunturegular) format('svg');font-weight:normal;font-style:normal}@font-face{font-family:'Ubuntu';src:url(ubuntu/fonts/ubuntu-regular-italic-webfont.eot);src:url(ubuntu/fonts/ubuntu-regular-italic-webfont.eot?#iefix) format('embedded-opentype'),url(ubuntu/fonts/ubuntu-regular-italic-webfont.woff2) format('woff2'),url(ubuntu/fonts/ubuntu-regular-italic-webfont.woff) format('woff'),url(ubuntu/fonts/ubuntu-regular-italic-webfont.ttf) format('truetype'),url(ubuntu/fonts/ubuntu-regular-italic-webfont.svg#ubuntuitalic) format('svg');font-weight:normal;font-style:italic}@font-face{font-family:'Ubuntu';src:url(ubuntu/fonts/ubuntu-medium-webfont.eot);src:url(ubuntu/fonts/ubuntu-medium-webfont.eot?#iefix) format('embedded-opentype'),url(ubuntu/fonts/ubuntu-medium-webfont.woff2) format('woff2'),url(ubuntu/fonts/ubuntu-medium-webfont.woff) format('woff'),url(ubuntu/fonts/ubuntu-medium-webfont.ttf) format('truetype'),url(ubuntu/fonts/ubuntu-medium-webfont.svg#ubuntumedium) format('svg');font-weight:500;font-style:normal}@font-face{font-family:'Ubuntu';src:url(ubuntu/fonts/ubuntu-medium-italic-webfont.eot);src:url(ubuntu/fonts/ubuntu-medium-italic-webfont.eot?#iefix) format('embedded-opentype'),url(ubuntu/fonts/ubuntu-medium-italic-webfont.woff2) format('woff2'),url(ubuntu/fonts/ubuntu-medium-italic-webfont.woff) format('woff'),url(ubuntu/fonts/ubuntu-medium-italic-webfont.ttf) format('truetype'),url(ubuntu/fonts/ubuntu-medium-italic-webfont.svg#ubuntumedium_italic) format('svg');font-weight:500;font-style:italic}@font-face{font-family:'Ubuntu';src:url(ubuntu/fonts/ubuntu-bold-webfont.eot);src:url(ubuntu/fonts/ubuntu-bold-webfont.eot?#iefix) format('embedded-opentype'),url(ubuntu/fonts/ubuntu-bold-webfont.woff2) format('woff2'),url(ubuntu/fonts/ubuntu-bold-webfont.woff) format('woff'),url(ubuntu/fonts/ubuntu-bold-webfont.ttf) format('truetype'),url(ubuntu/fonts/ubuntu-bold-webfont.svg#ubuntubold) format('svg');font-weight:bold;font-style:normal}@font-face{font-family:'Ubuntu';src:url(ubuntu/fonts/ubuntu-bold-italic-webfont.eot);src:url(ubuntu/fonts/ubuntu-bold-italic-webfont.eot?#iefix) format('embedded-opentype'),url(ubuntu/fonts/ubuntu-bold-italic-webfont.woff2) format('woff2'),url(ubuntu/fonts/ubuntu-bold-italic-webfont.woff) format('woff'),url(ubuntu/fonts/ubuntu-bold-italic-webfont.ttf) format('truetype'),url(ubuntu/fonts/ubuntu-bold-italic-webfont.svg#ubuntubold_italic) format('svg');font-weight:bold;font-style:italic}@font-face{font-family:'Ubuntu Condensed';src:url(ubuntu/fonts/ubuntu-condensed-webfont.eot);src:url(ubuntu/fonts/ubuntu-condensed-webfont.eot?#iefix) format('embedded-opentype'),url(ubuntu/fonts/ubuntu-condensed-webfont.woff2) format('woff2'),url(ubuntu/fonts/ubuntu-condensed-webfont.woff) format('woff'),url(ubuntu/fonts/ubuntu-condensed-webfont.ttf) format('truetype'),url(ubuntu/fonts/ubuntu-condensed-webfont.svg#ubuntu_condensedregular) format('svg');font-weight:normal;font-style:normal}@font-face{font-family:'Ubuntu Monospace';src:url(ubuntu/fonts/ubuntumono-regular-webfont.eot);src:url(ubuntu/fonts/ubuntumono-regular-webfont.eot?#iefix) format('embedded-opentype'),url(ubuntu/fonts/ubuntumono-regular-webfont.woff2) format('woff2'),url(ubuntu/fonts/ubuntumono-regular-webfont.woff) format('woff'),url(ubuntu/fonts/ubuntumono-regular-webfont.ttf) format('truetype'),url(ubuntu/fonts/ubuntumono-regular-webfont.svg#ubuntu_monoregular) format('svg');font-weight:normal;font-style:normal}@font-face{font-family:'Ubuntu Monospace';src:url(ubuntu/fonts/ubuntumono-regular-italic-webfont.eot);src:url(ubuntu/fonts/ubuntumono-regular-italic-webfont.eot?#iefix) format('embedded-opentype'),url(ubuntu/fonts/ubuntumono-regular-italic-webfont.woff2) format('woff2'),url(ubuntu/fonts/ubuntumono-regular-italic-webfont.woff) format('woff'),url(ubuntu/fonts/ubuntumono-regular-italic-webfont.ttf) format('truetype'),url(ubuntu/fonts/ubuntumono-regular-italic-webfont.svg#ubuntu_monoitalic) format('svg');font-weight:normal;font-style:italic}@font-face{font-family:'Ubuntu Monospace';src:url(ubuntu/fonts/ubuntumono-bold-webfont.eot);src:url(ubuntu/fonts/ubuntumono-bold-webfont.eot?#iefix) format('embedded-opentype'),url(ubuntu/fonts/ubuntumono-bold-webfont.woff2) format('woff2'),url(ubuntu/fonts/ubuntumono-bold-webfont.woff) format('woff'),url(ubuntu/fonts/ubuntumono-bold-webfont.ttf) format('truetype'),url(ubuntu/fonts/ubuntumono-bold-webfont.svg#ubuntu_monobold) format('svg');font-weight:bold;font-style:normal}@font-face{font-family:'Ubuntu Monospace';src:url(ubuntu/fonts/ubuntumono-bold-italic-webfont.eot);src:url(ubuntu/fonts/ubuntumono-bold-italic-webfont.eot?#iefix) format('embedded-opentype'),url(ubuntu/fonts/ubuntumono-bold-italic-webfont.woff2) format('woff2'),url(ubuntu/fonts/ubuntumono-bold-italic-webfont.woff) format('woff'),url(ubuntu/fonts/ubuntumono-bold-italic-webfont.ttf) format('truetype'),url(ubuntu/fonts/ubuntumono-bold-italic-webfont.svg#ubuntu_monobold_italic) format('svg');font-weight:bold;font-style:italic}