rubyXL-git-ref-6002046 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +20 -0
  3. data/Gemfile.lock +63 -0
  4. data/LICENSE.txt +20 -0
  5. data/README.rdoc +197 -0
  6. data/Rakefile +58 -0
  7. data/VERSION +1 -0
  8. data/lib/rubyXL.rb +21 -0
  9. data/lib/rubyXL/cell.rb +325 -0
  10. data/lib/rubyXL/generic_storage.rb +40 -0
  11. data/lib/rubyXL/objects/border.rb +53 -0
  12. data/lib/rubyXL/objects/cell_style.rb +73 -0
  13. data/lib/rubyXL/objects/color.rb +23 -0
  14. data/lib/rubyXL/objects/column_range.rb +88 -0
  15. data/lib/rubyXL/objects/data_validation.rb +31 -0
  16. data/lib/rubyXL/objects/defined_name.rb +27 -0
  17. data/lib/rubyXL/objects/fill.rb +42 -0
  18. data/lib/rubyXL/objects/font.rb +109 -0
  19. data/lib/rubyXL/objects/formula.rb +8 -0
  20. data/lib/rubyXL/objects/ooxml_object.rb +177 -0
  21. data/lib/rubyXL/objects/reference.rb +98 -0
  22. data/lib/rubyXL/objects/sheet_view.rb +62 -0
  23. data/lib/rubyXL/objects/worksheet.rb +11 -0
  24. data/lib/rubyXL/parser.rb +307 -0
  25. data/lib/rubyXL/private_class.rb +95 -0
  26. data/lib/rubyXL/shared_strings.rb +35 -0
  27. data/lib/rubyXL/workbook.rb +342 -0
  28. data/lib/rubyXL/worksheet.rb +1118 -0
  29. data/lib/rubyXL/writer/app_writer.rb +51 -0
  30. data/lib/rubyXL/writer/calc_chain_writer.rb +18 -0
  31. data/lib/rubyXL/writer/content_types_writer.rb +113 -0
  32. data/lib/rubyXL/writer/core_writer.rb +34 -0
  33. data/lib/rubyXL/writer/generic_writer.rb +33 -0
  34. data/lib/rubyXL/writer/root_rels_writer.rb +17 -0
  35. data/lib/rubyXL/writer/shared_strings_writer.rb +21 -0
  36. data/lib/rubyXL/writer/styles_writer.rb +64 -0
  37. data/lib/rubyXL/writer/theme_writer.rb +337 -0
  38. data/lib/rubyXL/writer/workbook_rels_writer.rb +43 -0
  39. data/lib/rubyXL/writer/workbook_writer.rb +73 -0
  40. data/lib/rubyXL/writer/worksheet_writer.rb +164 -0
  41. data/lib/rubyXL/zip.rb +20 -0
  42. data/rdoc/created.rid +36 -0
  43. data/rdoc/fonts.css +167 -0
  44. data/rdoc/fonts/Lato-Light.ttf +0 -0
  45. data/rdoc/fonts/Lato-LightItalic.ttf +0 -0
  46. data/rdoc/fonts/Lato-Regular.ttf +0 -0
  47. data/rdoc/fonts/Lato-RegularItalic.ttf +0 -0
  48. data/rdoc/fonts/SourceCodePro-Bold.ttf +0 -0
  49. data/rdoc/fonts/SourceCodePro-Regular.ttf +0 -0
  50. data/rdoc/images/add.png +0 -0
  51. data/rdoc/images/arrow_up.png +0 -0
  52. data/rdoc/images/brick.png +0 -0
  53. data/rdoc/images/brick_link.png +0 -0
  54. data/rdoc/images/bug.png +0 -0
  55. data/rdoc/images/bullet_black.png +0 -0
  56. data/rdoc/images/bullet_toggle_minus.png +0 -0
  57. data/rdoc/images/bullet_toggle_plus.png +0 -0
  58. data/rdoc/images/date.png +0 -0
  59. data/rdoc/images/delete.png +0 -0
  60. data/rdoc/images/find.png +0 -0
  61. data/rdoc/images/loadingAnimation.gif +0 -0
  62. data/rdoc/images/macFFBgHack.png +0 -0
  63. data/rdoc/images/package.png +0 -0
  64. data/rdoc/images/page_green.png +0 -0
  65. data/rdoc/images/page_white_text.png +0 -0
  66. data/rdoc/images/page_white_width.png +0 -0
  67. data/rdoc/images/plugin.png +0 -0
  68. data/rdoc/images/ruby.png +0 -0
  69. data/rdoc/images/tag_blue.png +0 -0
  70. data/rdoc/images/tag_green.png +0 -0
  71. data/rdoc/images/transparent.png +0 -0
  72. data/rdoc/images/wrench.png +0 -0
  73. data/rdoc/images/wrench_orange.png +0 -0
  74. data/rdoc/images/zoom.png +0 -0
  75. data/rdoc/js/darkfish.js +140 -0
  76. data/rdoc/js/jquery.js +18 -0
  77. data/rdoc/js/navigation.js +142 -0
  78. data/rdoc/js/search.js +109 -0
  79. data/rdoc/js/search_index.js +1 -0
  80. data/rdoc/js/searcher.js +228 -0
  81. data/rdoc/rdoc.css +580 -0
  82. data/rubyXL-git-ref-6002046.gemspec +143 -0
  83. data/spec/lib/cell_spec.rb +407 -0
  84. data/spec/lib/color_spec.rb +14 -0
  85. data/spec/lib/parser_spec.rb +80 -0
  86. data/spec/lib/workbook_spec.rb +73 -0
  87. data/spec/lib/worksheet_spec.rb +1789 -0
  88. metadata +231 -0
@@ -0,0 +1,43 @@
1
+ module RubyXL
2
+ module Writer
3
+
4
+ class WorkbookRelsWriter < GenericWriter
5
+
6
+ def filepath
7
+ File.join('xl', '_rels', 'workbook.xml.rels')
8
+ end
9
+
10
+ #all attributes out of order
11
+ def write()
12
+ rels = []
13
+
14
+ @workbook.worksheets.each_index { |i|
15
+ rels << [ "worksheets/sheet#{i + 1}.xml", 'worksheet' ]
16
+ }
17
+
18
+ @workbook.external_links.each_key { |k|
19
+ rels << [ "externalLinks/#{k}", 'externalLink' ]
20
+ }
21
+
22
+ rels << [ 'theme/theme1.xml', 'theme' ]
23
+ rels << [ 'styles.xml', 'styles' ]
24
+ rels << [ 'sharedStrings.xml', 'sharedStrings' ] unless @workbook.shared_strings.empty?
25
+
26
+ render_xml do |xml|
27
+ xml << (xml.create_element('Relationships',
28
+ :xmlns => 'http://schemas.openxmlformats.org/package/2006/relationships') { |root|
29
+
30
+ rels.each_with_index { |rel, i|
31
+ root << xml.create_element('Relationship',
32
+ { :Id => "rId#{i + 1}",
33
+ :Type => "http://schemas.openxmlformats.org/officeDocument/2006/relationships/#{rel.last}",
34
+ :Target => rel.first })
35
+ }
36
+ })
37
+ end
38
+
39
+ end
40
+
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,73 @@
1
+ module RubyXL
2
+ module Writer
3
+ class WorkbookWriter < GenericWriter
4
+
5
+ def filepath
6
+ File.join('xl', 'workbook.xml')
7
+ end
8
+
9
+ def write()
10
+ new_xml = render_xml do |xml|
11
+ xml << (xml.create_element('workbook',
12
+ :xmlns => 'http://schemas.openxmlformats.org/spreadsheetml/2006/main',
13
+ 'xmlns:r' => 'http://schemas.openxmlformats.org/officeDocument/2006/relationships') { |root|
14
+ root << xml.create_element('fileVersion', { :appName => 'xl', :lastEdited => 4,
15
+ :lowestEdited => 4, :rupBuild => 4505 })
16
+
17
+ params = { :showInkAnnotation => 0, :autoCompressPictures => 0 }
18
+
19
+ #TODO following line - date 1904? check if mac only
20
+ params[:date1904] = 1 if @workbook.date1904
21
+ root << xml.create_element('workbookPr', params)
22
+
23
+ root << (xml.create_element('bookViews') { |views|
24
+ views << xml.create_element('workbookView', { :xWindow => -20, :yWindow => -20,
25
+ :windowWidth => 21600, :windowHeight => 13340, :tabRatio => 500 })
26
+ })
27
+
28
+ index = 1
29
+ root << (xml.create_element('sheets') { |sheet_xml|
30
+ @workbook.worksheets.each_with_index { |sheet, i|
31
+ sheet_xml << xml.create_element('sheet', { :name => sheet.sheet_name,
32
+ :sheetId => sheet.sheet_id || index,
33
+ 'r:id'=> "rId#{index}" })
34
+ index += 1
35
+ }
36
+ })
37
+
38
+ unless @workbook.external_links.empty?
39
+
40
+ root << (xml.create_element('externalReferences') { |refs|
41
+ # Need to correlate these with WorkbookRelsWriter
42
+ @workbook.external_links.each_value {
43
+ refs << xml.create_element('externalReference', { 'r:id' => "rId#{index}" })
44
+ index += 1
45
+ }
46
+ })
47
+ end
48
+
49
+ unless @workbook.defined_names.empty?
50
+ root << xml.create_element('definedNames') { |names|
51
+ @workbook.defined_names.each { |name| names << name.write_xml(xml) }
52
+ }
53
+ end
54
+
55
+ #TODO see if this changes with formulas
56
+ #attributes out of order here
57
+ root << xml.create_element('calcPr', { :calcId => 130407, :concurrentCalc => 0 } )
58
+
59
+ root << (xml.create_element('extLst') { |list|
60
+ list << (xml.create_element('ext', {
61
+ 'xmlns:mx' => 'http://schemas.microsoft.com/office/mac/excel/2008/main',
62
+ :uri => 'http://schemas.microsoft.com/office/mac/excel/2008/main'}) { |ext|
63
+ ext << xml.create_element('mx:ArchID', { :Flags => 2 })
64
+
65
+ })
66
+ })
67
+ })
68
+ end
69
+ end
70
+
71
+ end
72
+ end
73
+ end
@@ -0,0 +1,164 @@
1
+ module RubyXL
2
+ module Writer
3
+ class WorksheetWriter < GenericWriter
4
+
5
+ def initialize(workbook, sheet_index = 0)
6
+ @workbook = workbook
7
+ @sheet_index = sheet_index
8
+ @worksheet = @workbook.worksheets[@sheet_index]
9
+ end
10
+
11
+ def filepath
12
+ File.join('xl', 'worksheets', "sheet#{@sheet_index + 1}.xml")
13
+ end
14
+
15
+ def write()
16
+ render_xml do |xml|
17
+ xml << (xml.create_element('worksheet',
18
+ 'xmlns' => 'http://schemas.openxmlformats.org/spreadsheetml/2006/main',
19
+ 'xmlns:r' => 'http://schemas.openxmlformats.org/officeDocument/2006/relationships',
20
+ 'xmlns:mc' => 'http://schemas.openxmlformats.org/markup-compatibility/2006',
21
+ 'xmlns:mv' => 'urn:schemas-microsoft-com:mac:vml',
22
+ 'mc:Ignorable' => 'mv',
23
+ 'mc:PreserveAttributes' => 'mv:*') { |root|
24
+
25
+ col = @worksheet.sheet_data.max_by{ |row| row.size }.size
26
+ row = @worksheet.sheet_data.size
27
+
28
+ root << xml.create_element('dimension', { :ref => RubyXL::Reference.new(0, row - 1, 0, col - 1) })
29
+
30
+ unless @worksheet.sheet_views.empty?
31
+ root << xml.create_element('sheetViews') { |sheet_views|
32
+ @worksheet.sheet_views.each { |sheet_view| sheet_views << sheet_view.write_xml(xml) }
33
+ }
34
+ end
35
+
36
+ root << xml.create_element('sheetFormatPr', { :baseColWidth => 10, :defaultRowHeight => 13 })
37
+
38
+ ranges = @worksheet.column_ranges
39
+ unless ranges.nil? || ranges.empty?
40
+ root << (xml.create_element('cols') { |cols|
41
+ ranges.each do |range|
42
+
43
+ col_attrs = { :min => range.min + 1,
44
+ :max => range.max + 1,
45
+ :width => range.width || 10,
46
+ :customWidth => range.custom_width || 0 }
47
+
48
+ col_attrs[:style] = range.style_index if range.style_index
49
+ cols << (xml.create_element('col', col_attrs))
50
+ end
51
+ })
52
+ end
53
+
54
+ root << (xml.create_element('sheetData') { |data|
55
+ @worksheet.sheet_data.each_with_index { |row, i|
56
+ #TODO fix this spans thing. could be 2:3 (not necessary)
57
+ if @worksheet.row_styles[(i+1)].nil?
58
+ @worksheet.row_styles[(i+1)] = {}
59
+ @worksheet.row_styles[(i+1)][:style] = 0
60
+ end
61
+ custom_format = '1'
62
+
63
+ if @worksheet.row_styles[(i+1)][:style].to_s == '0'
64
+ custom_format = '0'
65
+ end
66
+
67
+ row_opts = {
68
+ :r => i + 1,
69
+ :spans => "1:#{row.size}",
70
+ :customFormat => custom_format
71
+ }
72
+
73
+ unless @worksheet.row_styles[(i+1)][:style].to_s == ''
74
+ row_opts[:s] = @worksheet.row_styles[(i+1)][:style]
75
+ end
76
+
77
+ unless @worksheet.row_styles[(i+1)][:height].to_s == ''
78
+ row_opts[:ht] = @worksheet.row_styles[(i+1)][:height]
79
+ end
80
+
81
+ unless @worksheet.row_styles[(i+1)][:customheight].to_s == ''
82
+ row_opts[:customHeight] = @worksheet.row_styles[(i+1)][:customHeight]
83
+ end
84
+
85
+ data << (xml.create_element('row', row_opts) { |row_xml|
86
+ row.each_with_index { |cell, j|
87
+ unless cell.nil?
88
+ #TODO do xml.c for all cases, inside specific.
89
+ # if cell.formula.nil?
90
+ c_opts = { :r => RubyXL::Reference.ind2ref(i, j), :s => cell.style_index }
91
+
92
+ unless cell.datatype.nil? || cell.datatype == ''
93
+ c_opts[:t] = cell.datatype
94
+ end
95
+
96
+ row_xml << (xml.create_element('c', c_opts) { |cell_xml|
97
+ unless cell.formula.nil?
98
+
99
+ attrs = {}
100
+ attrs[:t] = cell.formula_attributes['t'] unless cell.formula_attributes['t'].nil?
101
+ attrs[:ref] = cell.formula_attributes['ref'] unless cell.formula_attributes['ref'].nil?
102
+ attrs[:si] = cell.formula_attributes['si'] unless cell.formula_attributes['si'].nil?
103
+
104
+ cell_xml << xml.create_element('f', attrs, cell.formula)
105
+ end
106
+
107
+ cell_value = if (cell.datatype == RubyXL::Cell::SHARED_STRING) then
108
+ @workbook.shared_strings.get_index(cell.value).to_s
109
+ else cell.value
110
+ end
111
+
112
+ cell_xml << xml.create_element('v', cell_value) unless cell_value.nil?
113
+ })
114
+ end #unless cell.nil?
115
+ } #row.each_with_index
116
+ })
117
+ }
118
+ })
119
+
120
+ root << xml.create_element('sheetCalcPr', { :fullCalcOnLoad => 1 })
121
+
122
+ merged_cells = @worksheet.merged_cells
123
+ unless merged_cells.empty?
124
+ root << xml.create_element('mergeCells', { :count => merged_cells.size }) { |mc|
125
+ @worksheet.merged_cells.each { |ref| mc << xml.create_element('mergeCell', { 'ref' => ref }) }
126
+ }
127
+ end
128
+
129
+ root << xml.create_element('phoneticPr', { :fontId => 1, :type => 'noConversion' })
130
+
131
+ unless @worksheet.validations.empty?
132
+ root << (xml.create_element('dataValidations', { :count => @worksheet.validations.size }) { |validations|
133
+ @worksheet.validations.each { |validation| validations << validation.write_xml(xml) }
134
+ })
135
+ end
136
+
137
+ root << xml.create_element('pageMargins', { :left => 0.75, :right => 0.75, :top => 1, :bottom => 1,
138
+ :header => 0.5, :footer => 0.5 })
139
+ root << xml.create_element('pageSetup', { :orientation => 'portrait',
140
+ :horizontalDpi => 4294967292, :verticalDpi => 4294967292 })
141
+
142
+ @worksheet.legacy_drawings.each { |drawing| root << drawing.write_xml(xml) }
143
+
144
+ unless @worksheet.extLst.nil?
145
+ root << (xml.create_element('extLst') { |extlst|
146
+ extlst << (xml.create_element('ext', {
147
+ 'xmlns:mx' => 'http://schemas.microsoft.com/office/mac/excel/2008/main',
148
+ 'uri' => 'http://schemas.microsoft.com/office/mac/excel/2008/main' }) { |ext|
149
+ ext << xml.create_element('mx:PLV', { :Mode => 1, :OnePage => 0, :WScale => 0 })
150
+ })
151
+ })
152
+ end
153
+
154
+ @worksheet.drawings.each { |d| root << xml.create_element('drawing', { 'r:id' => d }) }
155
+
156
+ })
157
+ end
158
+
159
+ end
160
+
161
+ end # class
162
+
163
+ end
164
+ end
@@ -0,0 +1,20 @@
1
+ require 'rubygems'
2
+ require 'zip'
3
+ #require 'zipfilesystem'
4
+
5
+ module RubyXL
6
+ class MyZip
7
+
8
+ # Unzips .zip file at zipPath to zipDirPath
9
+ def unzip(zipPath,zipDirPath)
10
+ Zip::File.open(zipPath) { |zip_file|
11
+ zip_file.each { |f|
12
+ fpath = File.join(zipDirPath, f.name)
13
+ FileUtils.mkdir_p(File.dirname(fpath))
14
+ zip_file.extract(f, fpath) unless File.exist?(fpath)
15
+ }
16
+ }
17
+ end
18
+
19
+ end
20
+ end
@@ -0,0 +1,36 @@
1
+ Thu, 16 Jan 2014 12:33:36 -0600
2
+ README.rdoc Thu, 09 Jan 2014 02:40:53 -0600
3
+ lib/rubyXL.rb Thu, 16 Jan 2014 12:32:19 -0600
4
+ lib/rubyXL/cell.rb Thu, 16 Jan 2014 12:32:19 -0600
5
+ lib/rubyXL/generic_storage.rb Thu, 09 Jan 2014 02:40:53 -0600
6
+ lib/rubyXL/objects/border.rb Tue, 14 Jan 2014 20:14:58 -0600
7
+ lib/rubyXL/objects/cell_style.rb Tue, 14 Jan 2014 20:14:58 -0600
8
+ lib/rubyXL/objects/color.rb Tue, 14 Jan 2014 20:14:58 -0600
9
+ lib/rubyXL/objects/column_range.rb Thu, 16 Jan 2014 12:32:19 -0600
10
+ lib/rubyXL/objects/data_validation.rb Thu, 16 Jan 2014 12:32:19 -0600
11
+ lib/rubyXL/objects/defined_name.rb Fri, 10 Jan 2014 03:01:43 -0600
12
+ lib/rubyXL/objects/fill.rb Tue, 14 Jan 2014 20:14:58 -0600
13
+ lib/rubyXL/objects/font.rb Tue, 14 Jan 2014 20:14:58 -0600
14
+ lib/rubyXL/objects/formula.rb Thu, 16 Jan 2014 12:32:19 -0600
15
+ lib/rubyXL/objects/ooxml_object.rb Tue, 14 Jan 2014 20:14:58 -0600
16
+ lib/rubyXL/objects/reference.rb Thu, 09 Jan 2014 02:40:53 -0600
17
+ lib/rubyXL/objects/sheet_view.rb Sat, 11 Jan 2014 17:25:47 -0600
18
+ lib/rubyXL/objects/worksheet.rb Sat, 11 Jan 2014 17:25:47 -0600
19
+ lib/rubyXL/parser.rb Thu, 16 Jan 2014 12:32:19 -0600
20
+ lib/rubyXL/private_class.rb Thu, 16 Jan 2014 12:32:19 -0600
21
+ lib/rubyXL/shared_strings.rb Thu, 09 Jan 2014 02:40:53 -0600
22
+ lib/rubyXL/workbook.rb Thu, 16 Jan 2014 12:32:19 -0600
23
+ lib/rubyXL/worksheet.rb Thu, 16 Jan 2014 12:32:19 -0600
24
+ lib/rubyXL/writer/app_writer.rb Tue, 14 Jan 2014 20:14:58 -0600
25
+ lib/rubyXL/writer/calc_chain_writer.rb Tue, 14 Jan 2014 20:14:58 -0600
26
+ lib/rubyXL/writer/content_types_writer.rb Tue, 14 Jan 2014 20:14:58 -0600
27
+ lib/rubyXL/writer/core_writer.rb Tue, 14 Jan 2014 20:14:58 -0600
28
+ lib/rubyXL/writer/generic_writer.rb Tue, 14 Jan 2014 20:14:58 -0600
29
+ lib/rubyXL/writer/root_rels_writer.rb Tue, 14 Jan 2014 20:14:58 -0600
30
+ lib/rubyXL/writer/shared_strings_writer.rb Tue, 14 Jan 2014 20:14:58 -0600
31
+ lib/rubyXL/writer/styles_writer.rb Tue, 14 Jan 2014 20:14:58 -0600
32
+ lib/rubyXL/writer/theme_writer.rb Tue, 14 Jan 2014 20:14:58 -0600
33
+ lib/rubyXL/writer/workbook_rels_writer.rb Tue, 14 Jan 2014 20:14:58 -0600
34
+ lib/rubyXL/writer/workbook_writer.rb Tue, 14 Jan 2014 20:14:58 -0600
35
+ lib/rubyXL/writer/worksheet_writer.rb Thu, 16 Jan 2014 12:32:19 -0600
36
+ lib/rubyXL/zip.rb Thu, 09 Jan 2014 02:40:53 -0600
@@ -0,0 +1,167 @@
1
+ /*
2
+ * Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/),
3
+ * with Reserved Font Name "Source". All Rights Reserved. Source is a
4
+ * trademark of Adobe Systems Incorporated in the United States and/or other
5
+ * countries.
6
+ *
7
+ * This Font Software is licensed under the SIL Open Font License, Version
8
+ * 1.1.
9
+ *
10
+ * This license is copied below, and is also available with a FAQ at:
11
+ * http://scripts.sil.org/OFL
12
+ */
13
+
14
+ @font-face {
15
+ font-family: "Source Code Pro";
16
+ font-style: normal;
17
+ font-weight: 400;
18
+ src: local("Source Code Pro"),
19
+ local("SourceCodePro-Regular"),
20
+ url("fonts/SourceCodePro-Regular.ttf") format("truetype");
21
+ }
22
+
23
+ @font-face {
24
+ font-family: "Source Code Pro";
25
+ font-style: normal;
26
+ font-weight: 700;
27
+ src: local("Source Code Pro Bold"),
28
+ local("SourceCodePro-Bold"),
29
+ url("fonts/SourceCodePro-Bold.ttf") format("truetype");
30
+ }
31
+
32
+ /*
33
+ * Copyright (c) 2010, Łukasz Dziedzic (dziedzic@typoland.com),
34
+ * with Reserved Font Name Lato.
35
+ *
36
+ * This Font Software is licensed under the SIL Open Font License, Version
37
+ * 1.1.
38
+ *
39
+ * This license is copied below, and is also available with a FAQ at:
40
+ * http://scripts.sil.org/OFL
41
+ */
42
+
43
+ @font-face {
44
+ font-family: "Lato";
45
+ font-style: normal;
46
+ font-weight: 300;
47
+ src: local("Lato Light"),
48
+ local("Lato-Light"),
49
+ url("fonts/Lato-Light.ttf") format("truetype");
50
+ }
51
+
52
+ @font-face {
53
+ font-family: "Lato";
54
+ font-style: italic;
55
+ font-weight: 300;
56
+ src: local("Lato Light Italic"),
57
+ local("Lato-LightItalic"),
58
+ url("fonts/Lato-LightItalic.ttf") format("truetype");
59
+ }
60
+
61
+ @font-face {
62
+ font-family: "Lato";
63
+ font-style: normal;
64
+ font-weight: 700;
65
+ src: local("Lato Regular"),
66
+ local("Lato-Regular"),
67
+ url("fonts/Lato-Regular.ttf") format("truetype");
68
+ }
69
+
70
+ @font-face {
71
+ font-family: "Lato";
72
+ font-style: italic;
73
+ font-weight: 700;
74
+ src: local("Lato Italic"),
75
+ local("Lato-Italic"),
76
+ url("fonts/Lato-RegularItalic.ttf") format("truetype");
77
+ }
78
+
79
+ /*
80
+ * -----------------------------------------------------------
81
+ * SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
82
+ * -----------------------------------------------------------
83
+ *
84
+ * PREAMBLE
85
+ * The goals of the Open Font License (OFL) are to stimulate worldwide
86
+ * development of collaborative font projects, to support the font creation
87
+ * efforts of academic and linguistic communities, and to provide a free and
88
+ * open framework in which fonts may be shared and improved in partnership
89
+ * with others.
90
+ *
91
+ * The OFL allows the licensed fonts to be used, studied, modified and
92
+ * redistributed freely as long as they are not sold by themselves. The
93
+ * fonts, including any derivative works, can be bundled, embedded,
94
+ * redistributed and/or sold with any software provided that any reserved
95
+ * names are not used by derivative works. The fonts and derivatives,
96
+ * however, cannot be released under any other type of license. The
97
+ * requirement for fonts to remain under this license does not apply
98
+ * to any document created using the fonts or their derivatives.
99
+ *
100
+ * DEFINITIONS
101
+ * "Font Software" refers to the set of files released by the Copyright
102
+ * Holder(s) under this license and clearly marked as such. This may
103
+ * include source files, build scripts and documentation.
104
+ *
105
+ * "Reserved Font Name" refers to any names specified as such after the
106
+ * copyright statement(s).
107
+ *
108
+ * "Original Version" refers to the collection of Font Software components as
109
+ * distributed by the Copyright Holder(s).
110
+ *
111
+ * "Modified Version" refers to any derivative made by adding to, deleting,
112
+ * or substituting -- in part or in whole -- any of the components of the
113
+ * Original Version, by changing formats or by porting the Font Software to a
114
+ * new environment.
115
+ *
116
+ * "Author" refers to any designer, engineer, programmer, technical
117
+ * writer or other person who contributed to the Font Software.
118
+ *
119
+ * PERMISSION & CONDITIONS
120
+ * Permission is hereby granted, free of charge, to any person obtaining
121
+ * a copy of the Font Software, to use, study, copy, merge, embed, modify,
122
+ * redistribute, and sell modified and unmodified copies of the Font
123
+ * Software, subject to the following conditions:
124
+ *
125
+ * 1) Neither the Font Software nor any of its individual components,
126
+ * in Original or Modified Versions, may be sold by itself.
127
+ *
128
+ * 2) Original or Modified Versions of the Font Software may be bundled,
129
+ * redistributed and/or sold with any software, provided that each copy
130
+ * contains the above copyright notice and this license. These can be
131
+ * included either as stand-alone text files, human-readable headers or
132
+ * in the appropriate machine-readable metadata fields within text or
133
+ * binary files as long as those fields can be easily viewed by the user.
134
+ *
135
+ * 3) No Modified Version of the Font Software may use the Reserved Font
136
+ * Name(s) unless explicit written permission is granted by the corresponding
137
+ * Copyright Holder. This restriction only applies to the primary font name as
138
+ * presented to the users.
139
+ *
140
+ * 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
141
+ * Software shall not be used to promote, endorse or advertise any
142
+ * Modified Version, except to acknowledge the contribution(s) of the
143
+ * Copyright Holder(s) and the Author(s) or with their explicit written
144
+ * permission.
145
+ *
146
+ * 5) The Font Software, modified or unmodified, in part or in whole,
147
+ * must be distributed entirely under this license, and must not be
148
+ * distributed under any other license. The requirement for fonts to
149
+ * remain under this license does not apply to any document created
150
+ * using the Font Software.
151
+ *
152
+ * TERMINATION
153
+ * This license becomes null and void if any of the above conditions are
154
+ * not met.
155
+ *
156
+ * DISCLAIMER
157
+ * THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
158
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
159
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
160
+ * OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
161
+ * COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
162
+ * INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
163
+ * DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
164
+ * FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
165
+ * OTHER DEALINGS IN THE FONT SOFTWARE.
166
+ */
167
+