Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Draft: [#45896] Generate PDF document from a work package description

as-op9370164c8d25
diff --git a/app/models/work_package/pdf_export/document_generator.rb b/app/models/work_package/pdf_export/document_generator.rb
new file mode 100644
index 00000000000..88dd91cad7e
--- /dev/null
+++ b/app/models/work_package/pdf_export/document_generator.rb
@@ -0,0 +1,89 @@
+#-- copyright
+# OpenProject is an open source project management software.
+# Copyright (C) 2012-2024 the OpenProject GmbH
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License version 3.
+#
+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
+# Copyright (C) 2006-2013 Jean-Philippe Lang
+# Copyright (C) 2010-2013 the ChiliProject Team
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# See COPYRIGHT and LICENSE files for more details.
+#++
+
+class WorkPackage::PDFExport::DocumentGenerator < Exports::Exporter
+ include WorkPackage::PDFExport::Common::Common
+ include WorkPackage::PDFExport::Common::Attachments
+ include WorkPackage::PDFExport::Common::Logo
+ include WorkPackage::PDFExport::Common::Macro
+ include WorkPackage::PDFExport::Generator::Generator
+
+ attr_accessor :pdf
+
+ self.model = WorkPackage
+
+ alias :work_package :object
+
+ def self.key
+ :generate_pdf
+ end
+
+ def initialize(work_package, _options = {})
+ super
+
+ setup_page!
+ end
+
+ def setup_page!
+ self.pdf = get_pdf(current_language)
+ end
+
+ def export!
+ render_doc
+ success(pdf.render)
+ rescue StandardError => e
+ Rails.logger.error { "Failed to generate PDF: #{e} #{e.message}}." }
+ error(I18n.t(:error_pdf_failed_to_export, error: e.message))
+ end
+
+ def render_doc
+ generate_doc!(
+ work_package,
+ apply_markdown_field_macros(work_package.description || "", work_package),
+ "contracts.yml"
+ )
+ end
+
+ def heading
+ "#{work_package.type} ##{work_package.id} - #{work_package.subject}"
+ end
+
+ def footer_title
+ work_package.name
+ end
+
+ def title
+ # <project>_<type>_<ID>_<subject><YYYY-MM-DD>_<HH-MM>.pdf
+ build_pdf_filename([work_package.project, work_package.type,
+ "##{work_package.id}", work_package.subject].join("_"))
+ end
+
+ def with_images?
+ true
+ end
+end
diff --git a/app/models/work_package/pdf_export/generator/contracts.yml b/app/models/work_package/pdf_export/generator/contracts.yml
new file mode 100644
index 00000000000..c6983b51f1f
--- /dev/null
+++ b/app/models/work_package/pdf_export/generator/contracts.yml
@@ -0,0 +1,187 @@
+page:
+ font: 'OpenSans'
+ size: 11
+ character-spacing: 0
+ styles: []
+ color: '000000'
+ page-size: 'A4'
+ page-layout: 'portrait'
+ margin-left: 20mm
+ margin-right: 20mm
+ margin-top: 40mm
+ margin-bottom: 35mm
+ leading: 6
+
+page-footer:
+ filter-pages: [ ]
+ align: "left"
+ offset: -51
+ size: 8
+
+page-footer-2:
+ filter-pages: [ ]
+ align: "center"
+ offset: -51
+ size: 8
+
+page-footer-3:
+ filter-pages: [ ]
+ align: "right"
+ offset: -51
+ size: 8
+
+page-header:
+ filter-pages: [ ]
+ align: "right"
+ offset: 0
+ size: 8
+ leading: 4
+
+page-logo:
+ filter-pages: [ ]
+ align: "left"
+ max-width: 40mm
+ offset: -70
+
+paragraph:
+ align: 'justify'
+ padding-bottom: 3mm
+
+link:
+ color: '1b69b6'
+
+unordered-list:
+ spacing: 3mm
+ padding-bottom: 3mm
+
+unordered-list-point:
+ sign: "•"
+ spacing: 0.75mm
+
+ordered-list:
+ spacing: 3mm
+ padding-bottom: 3mm
+
+ordered-list-point:
+ spanning: true
+
+ordered-list-point-1:
+ template: '(<number>)'
+
+ordered-list-point-2:
+ template: '<number>)'
+ alphabetical: true
+
+hrule:
+ margin-top: 2mm
+ margin-bottom: 4mm
+ line-width: 1
+
+header:
+ styles: [ 'bold' ]
+ padding-top: 2mm
+ padding-bottom: 2mm
+
+header-1:
+ size: 18
+ padding-top: 6mm
+header-2:
+ size: 14
+ padding-top: 5mm
+header-3:
+ size: 12
+ padding-top: 4mm
+header-4:
+ size: 11
+ padding-top: 3mm
+header-5:
+ size: 10
+header-6:
+ size: 10
+header-7:
+ size: 10
+header-8:
+ size: 10
+
+table:
+ margin-top: 2mm
+ margin-bottom: 4mm
+ header:
+ styles: [ 'bold' ]
+ background-color: 'F0F0F0'
+ size: 10
+ cell:
+ no-border: true
+ padding: 1mm
+ size: 9
+
+headless-table:
+ margin-top: 2mm
+ margin-bottom: 4mm
+ cell:
+ no-border: true
+ padding: 1mm
+ size: 9
+
+blockquote:
+ background-color: 'f4f9ff'
+ size: 11
+ styles: [ 'italic' ]
+ color: '0f3b66'
+ border-color: 'b8d6f4'
+ border-width: 1
+ no-border-right: true
+ no-border-left: false
+ no-border-bottom: true
+ no-border-top: true
+ padding: 8mm
+ padding-left: 4mm
+ padding-right: 4mm
+ margin-top: 2mm
+ margin-bottom: 2mm
+
+code:
+ font: 'SpaceMono'
+ color: '880000'
+
+codeblock:
+ background-color: 'F5F5F5'
+ font: 'SpaceMono'
+ size: 8
+ color: '880000'
+ padding: 3mm
+ margin-top: 2mm
+ margin-bottom: 2mm
+
+image:
+ max-width: 50mm
+ margin: 2mm
+ margin-bottom: 3mm
+ align: "center"
+
+image-classes:
+ small:
+ max-width: 10mm
+ left:
+ margin: 0
+ align: "left"
+ center:
+ margin: 0
+ align: "center"
+ right:
+ margin: 0
+ align: "right"
+
+footnote-definition:
+ point:
+ size: 13
+ styles: [ 'superscript' ]
+ color: '000000'
+
+footnote-reference:
+ size: 13
+ styles: [ 'superscript' ]
+ color: '000088'
+
+fields-default:
+ pdf_hyphenation: true
diff --git a/app/models/work_package/pdf_export/generator/generator.rb b/app/models/work_package/pdf_export/generator/generator.rb
new file mode 100644
index 00000000000..41382af36f0
--- /dev/null
+++ b/app/models/work_package/pdf_export/generator/generator.rb
@@ -0,0 +1,146 @@
+#-- copyright
+# OpenProject is an open source project management software.
+# Copyright (C) 2012-2024 the OpenProject GmbH
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License version 3.
+#
+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
+# Copyright (C) 2006-2013 Jean-Philippe Lang
+# Copyright (C) 2010-2013 the ChiliProject Team
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# See COPYRIGHT and LICENSE files for more details.
+#++
+
+require "md_to_pdf/core"
+
+module WorkPackage::PDFExport::Generator::Generator
+ class MD2PDFGenerator
+ include MarkdownToPDF::Core
+ include MarkdownToPDF::Parser
+ include MarkdownToPDF::StyleSchema
+
+ def initialize(styling_yml)
+ symbol_yml = symbolize(styling_yml)
+ validate_schema!(symbol_yml, styles_schema)
+ @styles = MarkdownToPDF::Styles.new(symbol_yml)
+ init_options({ auto_generate_header_ids: false })
+ end
+
+ def init_pdf(pdf)
+ @pdf = pdf
+ page_style = @styles.page
+ page_margins = opts_margin(page_style)
+ pdf.options[:page_layout] = (page_style[:page_layout] || "portrait").to_sym
+ %i[top_margin left_margin bottom_margin right_margin].each do |margin|
+ pdf.options[margin] = page_margins[margin]
+ end
+ end
+
+ def generate!(markdown, options, image_loader)
+ @image_loader = image_loader
+ fields = {}
+ .merge(@styles.default_fields)
+ .merge(options)
+ doc = parse_frontmatter_markdown(markdown, fields)
+ @hyphens = Hyphen.new(doc[:language], doc[:hyphenation])
+ render_doc(doc)
+ end
+
+ def render_doc(doc)
+ style = @styles.page
+ opts = pdf_root_options(style)
+ root = doc[:root]
+ draw_node(root, opts, true)
+ draw_footnotes(opts)
+ repeating_page_footer(doc, opts)
+ repeating_page_header(doc, opts)
+ repeating_page_logo(doc[:logo], root, opts)
+ end
+
+ def image_url_to_local_file(url, _node = nil)
+ return nil if url.blank? || @image_loader.nil?
+
+ @image_loader.call(url)
+ end
+
+ def hyphenate(text)
+ text # @hyphens.hyphenate(text)
+ end
+
+ def handle_mention_html_tag(tag, node, opts)
+ if tag.text.blank?
+ # <mention class="mention" data-id="46012" data-type="work_package" data-text="#46012"></mention>
+ # <mention class="mention" data-id="3" data-type="user" data-text="@Some User">
+ text = tag.attr("data-text")
+ if text.present? && !node.next.respond_to?(:string_content) && node.next.string_content != text
+ return [text_hash(text, opts)]
+ end
+ end
+ # <mention class="mention" data-id="3" data-type="user" data-text="@Some User">@Some User</mention>
+ []
+ end
+
+ def handle_unknown_inline_html_tag(tag, node, opts)
+ result = if tag.name == "mention"
+ handle_mention_html_tag(tag, node, opts)
+ else
+ # unknown/unsupported html tags eg. <foo>hi</foo> are ignored
+ # but scanned for supported or text children
+ data_inlinehtml_tag(tag, node, opts)
+ end
+ [result, opts]
+ end
+
+ def handle_unknown_html_tag(_tag, _node, opts)
+ # unknown/unsupported html tags eg. <foo>hi</foo> are ignored
+ # but scanned for supported or text children [true, ...]
+ [true, opts]
+ end
+
+ def warn(text, element, node)
+ Rails.logger.warn "PDF-Export: #{text}\nGot #{element} at #{node.source_position.inspect}\n\n"
+ end
+ end
+
+ def generate_doc!(work_package, markdown, stlying)
+ styling = YAML::load_file(File.join(styling_asset_path, stlying))
+ md2pdf = MD2PDFGenerator.new(styling)
+ md2pdf.init_pdf(pdf)
+ # rubocop:disable Naming/VariableNumber
+ options = {
+ pdf_footer: footer_date,
+ pdf_footer_2: footer_title,
+ pdf_footer_3: I18n.t("export.page_nr_footer", page: "<page>", total: "<total>"),
+ pdf_header_logo: logo_image_filename
+ }
+ # rubocop:enable Naming/VariableNumber
+ md2pdf.generate!(markdown, options, ->(src) {
+ if src == logo_image_filename
+ logo_image_filename
+ else
+ attachment_image_filepath(work_package, src)
+ end
+ })
+ end
+
+ private
+
+ def styling_asset_path
+ File.dirname(File.expand_path(__FILE__))
+ end
+end
diff --git a/config/initializers/export_formats.rb b/config/initializers/export_formats.rb
index ae50c624cb3..0f11825fd7b 100644
--- a/config/initializers/export_formats.rb
+++ b/config/initializers/export_formats.rb
@@ -1,10 +1,13 @@
Rails.application.configure do |application|
application.config.to_prepare do
+ Mime::Type.register("application/pdf", :generate_pdf)
+
Exports::Register.register do
list WorkPackage, WorkPackage::Exports::CSV
list WorkPackage, WorkPackage::PDFExport::WorkPackageListToPdf
single WorkPackage, WorkPackage::PDFExport::WorkPackageToPdf
+ single WorkPackage, WorkPackage::PDFExport::DocumentGenerator
formatter WorkPackage, WorkPackage::Exports::Formatters::EstimatedHours
formatter WorkPackage, WorkPackage::Exports::Formatters::RemainingHours
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 7b85f8fc56e..176e6f5504d 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -1719,7 +1719,7 @@ Project attributes and sections are defined in the <a href=%{admin_settings_url}
units:
hours: h
days: d
-
+ page_nr_footer: "Page %{page} of %{total}"
extraction:
available:
pdftotext: "Pdftotext available (optional)"
diff --git a/config/locales/js-en.yml b/config/locales/js-en.yml
index 52200cae597..5fdbe076fe1 100644
--- a/config/locales/js-en.yml
+++ b/config/locales/js-en.yml
@@ -121,6 +121,7 @@ en:
button_uncheck_all: "Uncheck all"
button_update: "Update"
button_export-pdf: "Download PDF"
+ button_generate-pdf: "Generate PDF"
button_export-atom: "Download Atom"
button_create: "Create"
diff --git a/frontend/src/app/features/work-packages/components/wp-table/context-menu-helper/wp-context-menu-helper.service.ts b/frontend/src/app/features/work-packages/components/wp-table/context-menu-helper/wp-context-menu-helper.service.ts
index 7c5bfd72dd1..8818c29ae18 100644
--- a/frontend/src/app/features/work-packages/components/wp-table/context-menu-helper/wp-context-menu-helper.service.ts
+++ b/frontend/src/app/features/work-packages/components/wp-table/context-menu-helper/wp-context-menu-helper.service.ts
@@ -91,7 +91,7 @@ export class WorkPackageContextMenuHelperService {
// remove some actions on Gantt
if (this.wpViewTimeline.isVisible) {
allowedActions = allowedActions.filter((el) => {
- const ganttNotAllowedActions = ['log_time', 'copy', 'copy_to_other_project', 'export-pdf', 'export-atom', 'log_costs'];
+ const ganttNotAllowedActions = ['log_time', 'copy', 'copy_to_other_project', 'export-pdf', 'generate-pdf', 'export-atom', 'log_costs'];
return !(ganttNotAllowedActions.includes(el.key));
});
}
diff --git a/frontend/src/app/shared/components/op-context-menu/wp-context-menu/wp-static-context-menu-actions.ts b/frontend/src/app/shared/components/op-context-menu/wp-context-menu/wp-static-context-menu-actions.ts
index 39ec6c6fb9a..8794b535fac 100644
--- a/frontend/src/app/shared/components/op-context-menu/wp-context-menu/wp-static-context-menu-actions.ts
+++ b/frontend/src/app/shared/components/op-context-menu/wp-context-menu/wp-static-context-menu-actions.ts
@@ -32,6 +32,10 @@ export const PERMITTED_CONTEXT_MENU_ACTIONS:WorkPackageAction[] = [
key: 'export-pdf',
link: 'pdf',
},
+ {
+ key: 'generate-pdf',
+ link: 'generate_pdf',
+ },
{
key: 'export-atom',
link: 'atom',
diff --git a/lib/api/v3/work_packages/work_package_representer.rb b/lib/api/v3/work_packages/work_package_representer.rb
index b282a43722c..6acfdab87fd 100644
--- a/lib/api/v3/work_packages/work_package_representer.rb
+++ b/lib/api/v3/work_packages/work_package_representer.rb
@@ -132,6 +132,17 @@ module API
}
end
+ link :generate_pdf,
+ cache_if: -> { export_work_packages_allowed? } do
+ next if represented.new_record?
+
+ {
+ href: work_package_path(id: represented.id, format: :generate_pdf),
+ type: "application/pdf",
+ title: "Generate PDF"
+ }
+ end
+
link :atom,
cache_if: -> { export_work_packages_allowed? } do
next if represented.new_record? || !Setting.feeds_enabled?
diff --git a/public/fonts/opensans/LICENSE_APACHE.txt b/public/fonts/opensans/LICENSE_APACHE.txt
new file mode 100644
index 00000000000..d6456956733
--- /dev/null
+++ b/public/fonts/opensans/LICENSE_APACHE.txt
@@ -0,0 +1,202 @@
+
+ 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.
diff --git a/public/fonts/opensans/OpenSans-Bold.ttf b/public/fonts/opensans/OpenSans-Bold.ttf
new file mode 100644
index 00000000000..fd79d43bea0
Binary files /dev/null and b/public/fonts/opensans/OpenSans-Bold.ttf differ
diff --git a/public/fonts/opensans/OpenSans-BoldItalic.ttf b/public/fonts/opensans/OpenSans-BoldItalic.ttf
new file mode 100644
index 00000000000..9bc800958a4
Binary files /dev/null and b/public/fonts/opensans/OpenSans-BoldItalic.ttf differ
diff --git a/public/fonts/opensans/OpenSans-Italic.ttf b/public/fonts/opensans/OpenSans-Italic.ttf
new file mode 100644
index 00000000000..c90da48ff3b
Binary files /dev/null and b/public/fonts/opensans/OpenSans-Italic.ttf differ
diff --git a/public/fonts/opensans/OpenSans-Regular.ttf b/public/fonts/opensans/OpenSans-Regular.ttf
new file mode 100644
index 00000000000..db433349b70
Binary files /dev/null and b/public/fonts/opensans/OpenSans-Regular.ttf differ