fontisan 0.1.0 → 0.2.1

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 (214) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop_todo.yml +672 -69
  3. data/Gemfile +1 -0
  4. data/LICENSE +5 -1
  5. data/README.adoc +1477 -297
  6. data/Rakefile +63 -41
  7. data/benchmark/variation_quick_bench.rb +47 -0
  8. data/docs/EXTRACT_TTC_MIGRATION.md +549 -0
  9. data/fontisan.gemspec +4 -1
  10. data/lib/fontisan/binary/base_record.rb +22 -1
  11. data/lib/fontisan/cli.rb +364 -4
  12. data/lib/fontisan/collection/builder.rb +341 -0
  13. data/lib/fontisan/collection/offset_calculator.rb +227 -0
  14. data/lib/fontisan/collection/table_analyzer.rb +204 -0
  15. data/lib/fontisan/collection/table_deduplicator.rb +317 -0
  16. data/lib/fontisan/collection/writer.rb +306 -0
  17. data/lib/fontisan/commands/base_command.rb +24 -1
  18. data/lib/fontisan/commands/convert_command.rb +218 -0
  19. data/lib/fontisan/commands/export_command.rb +161 -0
  20. data/lib/fontisan/commands/info_command.rb +40 -6
  21. data/lib/fontisan/commands/instance_command.rb +286 -0
  22. data/lib/fontisan/commands/ls_command.rb +113 -0
  23. data/lib/fontisan/commands/pack_command.rb +241 -0
  24. data/lib/fontisan/commands/subset_command.rb +245 -0
  25. data/lib/fontisan/commands/unpack_command.rb +338 -0
  26. data/lib/fontisan/commands/validate_command.rb +203 -0
  27. data/lib/fontisan/commands/variable_command.rb +30 -1
  28. data/lib/fontisan/config/collection_settings.yml +56 -0
  29. data/lib/fontisan/config/conversion_matrix.yml +212 -0
  30. data/lib/fontisan/config/export_settings.yml +66 -0
  31. data/lib/fontisan/config/subset_profiles.yml +100 -0
  32. data/lib/fontisan/config/svg_settings.yml +60 -0
  33. data/lib/fontisan/config/validation_rules.yml +149 -0
  34. data/lib/fontisan/config/variable_settings.yml +99 -0
  35. data/lib/fontisan/config/woff2_settings.yml +77 -0
  36. data/lib/fontisan/constants.rb +79 -0
  37. data/lib/fontisan/converters/conversion_strategy.rb +96 -0
  38. data/lib/fontisan/converters/format_converter.rb +408 -0
  39. data/lib/fontisan/converters/outline_converter.rb +998 -0
  40. data/lib/fontisan/converters/svg_generator.rb +244 -0
  41. data/lib/fontisan/converters/table_copier.rb +117 -0
  42. data/lib/fontisan/converters/woff2_encoder.rb +416 -0
  43. data/lib/fontisan/converters/woff_writer.rb +391 -0
  44. data/lib/fontisan/error.rb +203 -0
  45. data/lib/fontisan/export/exporter.rb +262 -0
  46. data/lib/fontisan/export/table_serializer.rb +255 -0
  47. data/lib/fontisan/export/transformers/font_to_ttx.rb +172 -0
  48. data/lib/fontisan/export/transformers/head_transformer.rb +96 -0
  49. data/lib/fontisan/export/transformers/hhea_transformer.rb +59 -0
  50. data/lib/fontisan/export/transformers/maxp_transformer.rb +63 -0
  51. data/lib/fontisan/export/transformers/name_transformer.rb +63 -0
  52. data/lib/fontisan/export/transformers/os2_transformer.rb +121 -0
  53. data/lib/fontisan/export/transformers/post_transformer.rb +51 -0
  54. data/lib/fontisan/export/ttx_generator.rb +527 -0
  55. data/lib/fontisan/export/ttx_parser.rb +300 -0
  56. data/lib/fontisan/font_loader.rb +122 -15
  57. data/lib/fontisan/font_writer.rb +302 -0
  58. data/lib/fontisan/formatters/text_formatter.rb +102 -0
  59. data/lib/fontisan/glyph_accessor.rb +503 -0
  60. data/lib/fontisan/hints/hint_converter.rb +310 -0
  61. data/lib/fontisan/hints/postscript_hint_applier.rb +266 -0
  62. data/lib/fontisan/hints/postscript_hint_extractor.rb +354 -0
  63. data/lib/fontisan/hints/truetype_hint_applier.rb +117 -0
  64. data/lib/fontisan/hints/truetype_hint_extractor.rb +289 -0
  65. data/lib/fontisan/loading_modes.rb +115 -0
  66. data/lib/fontisan/metrics_calculator.rb +277 -0
  67. data/lib/fontisan/models/collection_font_summary.rb +52 -0
  68. data/lib/fontisan/models/collection_info.rb +76 -0
  69. data/lib/fontisan/models/collection_list_info.rb +37 -0
  70. data/lib/fontisan/models/font_export.rb +158 -0
  71. data/lib/fontisan/models/font_summary.rb +48 -0
  72. data/lib/fontisan/models/glyph_outline.rb +343 -0
  73. data/lib/fontisan/models/hint.rb +405 -0
  74. data/lib/fontisan/models/outline.rb +664 -0
  75. data/lib/fontisan/models/table_sharing_info.rb +40 -0
  76. data/lib/fontisan/models/ttx/glyph_order.rb +31 -0
  77. data/lib/fontisan/models/ttx/tables/binary_table.rb +67 -0
  78. data/lib/fontisan/models/ttx/tables/head_table.rb +74 -0
  79. data/lib/fontisan/models/ttx/tables/hhea_table.rb +74 -0
  80. data/lib/fontisan/models/ttx/tables/maxp_table.rb +55 -0
  81. data/lib/fontisan/models/ttx/tables/name_table.rb +45 -0
  82. data/lib/fontisan/models/ttx/tables/os2_table.rb +157 -0
  83. data/lib/fontisan/models/ttx/tables/post_table.rb +50 -0
  84. data/lib/fontisan/models/ttx/ttfont.rb +49 -0
  85. data/lib/fontisan/models/validation_report.rb +203 -0
  86. data/lib/fontisan/open_type_collection.rb +156 -2
  87. data/lib/fontisan/open_type_font.rb +321 -19
  88. data/lib/fontisan/open_type_font_extensions.rb +54 -0
  89. data/lib/fontisan/optimizers/charstring_rewriter.rb +161 -0
  90. data/lib/fontisan/optimizers/pattern_analyzer.rb +308 -0
  91. data/lib/fontisan/optimizers/stack_tracker.rb +246 -0
  92. data/lib/fontisan/optimizers/subroutine_builder.rb +134 -0
  93. data/lib/fontisan/optimizers/subroutine_generator.rb +207 -0
  94. data/lib/fontisan/optimizers/subroutine_optimizer.rb +107 -0
  95. data/lib/fontisan/outline_extractor.rb +423 -0
  96. data/lib/fontisan/pipeline/format_detector.rb +249 -0
  97. data/lib/fontisan/pipeline/output_writer.rb +154 -0
  98. data/lib/fontisan/pipeline/strategies/base_strategy.rb +75 -0
  99. data/lib/fontisan/pipeline/strategies/instance_strategy.rb +93 -0
  100. data/lib/fontisan/pipeline/strategies/named_strategy.rb +118 -0
  101. data/lib/fontisan/pipeline/strategies/preserve_strategy.rb +56 -0
  102. data/lib/fontisan/pipeline/transformation_pipeline.rb +411 -0
  103. data/lib/fontisan/pipeline/variation_resolver.rb +165 -0
  104. data/lib/fontisan/subset/builder.rb +268 -0
  105. data/lib/fontisan/subset/glyph_mapping.rb +215 -0
  106. data/lib/fontisan/subset/options.rb +142 -0
  107. data/lib/fontisan/subset/profile.rb +152 -0
  108. data/lib/fontisan/subset/table_subsetter.rb +461 -0
  109. data/lib/fontisan/svg/font_face_generator.rb +278 -0
  110. data/lib/fontisan/svg/font_generator.rb +264 -0
  111. data/lib/fontisan/svg/glyph_generator.rb +168 -0
  112. data/lib/fontisan/svg/view_box_calculator.rb +137 -0
  113. data/lib/fontisan/tables/cff/cff_glyph.rb +176 -0
  114. data/lib/fontisan/tables/cff/charset.rb +282 -0
  115. data/lib/fontisan/tables/cff/charstring.rb +934 -0
  116. data/lib/fontisan/tables/cff/charstring_builder.rb +356 -0
  117. data/lib/fontisan/tables/cff/charstring_parser.rb +237 -0
  118. data/lib/fontisan/tables/cff/charstring_rebuilder.rb +172 -0
  119. data/lib/fontisan/tables/cff/charstrings_index.rb +162 -0
  120. data/lib/fontisan/tables/cff/dict.rb +351 -0
  121. data/lib/fontisan/tables/cff/dict_builder.rb +257 -0
  122. data/lib/fontisan/tables/cff/encoding.rb +274 -0
  123. data/lib/fontisan/tables/cff/header.rb +102 -0
  124. data/lib/fontisan/tables/cff/hint_operation_injector.rb +207 -0
  125. data/lib/fontisan/tables/cff/index.rb +237 -0
  126. data/lib/fontisan/tables/cff/index_builder.rb +170 -0
  127. data/lib/fontisan/tables/cff/offset_recalculator.rb +70 -0
  128. data/lib/fontisan/tables/cff/private_dict.rb +284 -0
  129. data/lib/fontisan/tables/cff/private_dict_writer.rb +125 -0
  130. data/lib/fontisan/tables/cff/table_builder.rb +221 -0
  131. data/lib/fontisan/tables/cff/top_dict.rb +236 -0
  132. data/lib/fontisan/tables/cff.rb +489 -0
  133. data/lib/fontisan/tables/cff2/blend_operator.rb +240 -0
  134. data/lib/fontisan/tables/cff2/charstring_parser.rb +591 -0
  135. data/lib/fontisan/tables/cff2/operand_stack.rb +232 -0
  136. data/lib/fontisan/tables/cff2/private_dict_blend_handler.rb +246 -0
  137. data/lib/fontisan/tables/cff2/region_matcher.rb +200 -0
  138. data/lib/fontisan/tables/cff2/table_builder.rb +574 -0
  139. data/lib/fontisan/tables/cff2/table_reader.rb +419 -0
  140. data/lib/fontisan/tables/cff2/variation_data_extractor.rb +212 -0
  141. data/lib/fontisan/tables/cff2.rb +346 -0
  142. data/lib/fontisan/tables/cvar.rb +203 -0
  143. data/lib/fontisan/tables/fvar.rb +2 -2
  144. data/lib/fontisan/tables/glyf/compound_glyph.rb +483 -0
  145. data/lib/fontisan/tables/glyf/compound_glyph_resolver.rb +136 -0
  146. data/lib/fontisan/tables/glyf/curve_converter.rb +343 -0
  147. data/lib/fontisan/tables/glyf/glyph_builder.rb +450 -0
  148. data/lib/fontisan/tables/glyf/simple_glyph.rb +382 -0
  149. data/lib/fontisan/tables/glyf.rb +235 -0
  150. data/lib/fontisan/tables/gvar.rb +231 -0
  151. data/lib/fontisan/tables/hhea.rb +124 -0
  152. data/lib/fontisan/tables/hmtx.rb +287 -0
  153. data/lib/fontisan/tables/hvar.rb +191 -0
  154. data/lib/fontisan/tables/loca.rb +322 -0
  155. data/lib/fontisan/tables/maxp.rb +192 -0
  156. data/lib/fontisan/tables/mvar.rb +185 -0
  157. data/lib/fontisan/tables/name.rb +99 -30
  158. data/lib/fontisan/tables/variation_common.rb +346 -0
  159. data/lib/fontisan/tables/vvar.rb +234 -0
  160. data/lib/fontisan/true_type_collection.rb +156 -2
  161. data/lib/fontisan/true_type_font.rb +321 -20
  162. data/lib/fontisan/true_type_font_extensions.rb +54 -0
  163. data/lib/fontisan/utilities/brotli_wrapper.rb +159 -0
  164. data/lib/fontisan/utilities/checksum_calculator.rb +60 -0
  165. data/lib/fontisan/utils/thread_pool.rb +134 -0
  166. data/lib/fontisan/validation/checksum_validator.rb +170 -0
  167. data/lib/fontisan/validation/consistency_validator.rb +197 -0
  168. data/lib/fontisan/validation/structure_validator.rb +198 -0
  169. data/lib/fontisan/validation/table_validator.rb +158 -0
  170. data/lib/fontisan/validation/validator.rb +152 -0
  171. data/lib/fontisan/validation/variable_font_validator.rb +218 -0
  172. data/lib/fontisan/variable/axis_normalizer.rb +215 -0
  173. data/lib/fontisan/variable/delta_applicator.rb +313 -0
  174. data/lib/fontisan/variable/glyph_delta_processor.rb +218 -0
  175. data/lib/fontisan/variable/instancer.rb +344 -0
  176. data/lib/fontisan/variable/metric_delta_processor.rb +282 -0
  177. data/lib/fontisan/variable/region_matcher.rb +208 -0
  178. data/lib/fontisan/variable/static_font_builder.rb +213 -0
  179. data/lib/fontisan/variable/table_updater.rb +219 -0
  180. data/lib/fontisan/variation/blend_applier.rb +199 -0
  181. data/lib/fontisan/variation/cache.rb +298 -0
  182. data/lib/fontisan/variation/cache_key_builder.rb +162 -0
  183. data/lib/fontisan/variation/converter.rb +375 -0
  184. data/lib/fontisan/variation/data_extractor.rb +86 -0
  185. data/lib/fontisan/variation/delta_applier.rb +266 -0
  186. data/lib/fontisan/variation/delta_parser.rb +228 -0
  187. data/lib/fontisan/variation/inspector.rb +275 -0
  188. data/lib/fontisan/variation/instance_generator.rb +273 -0
  189. data/lib/fontisan/variation/instance_writer.rb +341 -0
  190. data/lib/fontisan/variation/interpolator.rb +231 -0
  191. data/lib/fontisan/variation/metrics_adjuster.rb +318 -0
  192. data/lib/fontisan/variation/optimizer.rb +418 -0
  193. data/lib/fontisan/variation/parallel_generator.rb +150 -0
  194. data/lib/fontisan/variation/region_matcher.rb +221 -0
  195. data/lib/fontisan/variation/subsetter.rb +463 -0
  196. data/lib/fontisan/variation/table_accessor.rb +105 -0
  197. data/lib/fontisan/variation/tuple_variation_header.rb +51 -0
  198. data/lib/fontisan/variation/validator.rb +345 -0
  199. data/lib/fontisan/variation/variable_svg_generator.rb +268 -0
  200. data/lib/fontisan/variation/variation_context.rb +211 -0
  201. data/lib/fontisan/variation/variation_preserver.rb +288 -0
  202. data/lib/fontisan/version.rb +1 -1
  203. data/lib/fontisan/version.rb.orig +9 -0
  204. data/lib/fontisan/woff2/directory.rb +257 -0
  205. data/lib/fontisan/woff2/glyf_transformer.rb +666 -0
  206. data/lib/fontisan/woff2/header.rb +101 -0
  207. data/lib/fontisan/woff2/hmtx_transformer.rb +164 -0
  208. data/lib/fontisan/woff2/table_transformer.rb +163 -0
  209. data/lib/fontisan/woff2_font.rb +717 -0
  210. data/lib/fontisan/woff_font.rb +488 -0
  211. data/lib/fontisan.rb +132 -0
  212. data/scripts/compare_stack_aware.rb +187 -0
  213. data/scripts/measure_optimization.rb +141 -0
  214. metadata +234 -4
data/.rubocop_todo.yml CHANGED
@@ -1,62 +1,117 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2025-11-08 05:30:55 UTC using RuboCop version 1.81.7.
3
+ # on 2025-12-28 12:03:20 UTC using RuboCop version 1.81.7.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
- # Offense count: 7
10
- # This cop supports safe autocorrection (--autocorrect).
11
- # Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation.
12
- Bundler/OrderedGems:
13
- Exclude:
14
- - 'Gemfile'
15
-
16
9
  # Offense count: 1
17
10
  # Configuration parameters: Severity.
18
11
  Gemspec/RequiredRubyVersion:
19
12
  Exclude:
20
13
  - 'fontisan.gemspec'
21
14
 
22
- # Offense count: 2
15
+ # Offense count: 6
23
16
  # This cop supports safe autocorrection (--autocorrect).
24
17
  # Configuration parameters: EnforcedStyle, IndentationWidth.
25
18
  # SupportedStyles: with_first_argument, with_fixed_indentation
26
19
  Layout/ArgumentAlignment:
27
20
  Exclude:
28
- - 'lib/fontisan/tables/cmap.rb'
21
+ - 'spec/fontisan/loading_modes_spec.rb'
22
+ - 'spec/fontisan/tables/cff2/table_builder_spec.rb'
23
+ - 'spec/fontisan/variation/validator_spec.rb'
24
+ - 'spec/integration/outline_conversion_spec.rb'
29
25
 
30
26
  # Offense count: 2
31
27
  # This cop supports safe autocorrection (--autocorrect).
32
- # Configuration parameters: EnforcedStyle, IndentationWidth.
33
- # SupportedStyles: with_first_element, with_fixed_indentation
34
- Layout/ArrayAlignment:
28
+ # Configuration parameters: AllowForAlignment.
29
+ Layout/CommentIndentation:
35
30
  Exclude:
36
- - 'spec/fontisan/commands/base_command_spec.rb'
31
+ - 'lib/fontisan/tables/cff2/table_builder.rb'
32
+ - 'spec/fontisan/hints/hint_conversion_integration_spec.rb'
37
33
 
38
- # Offense count: 1
34
+ # Offense count: 2
39
35
  # This cop supports safe autocorrection (--autocorrect).
40
- # Configuration parameters: EnforcedStyleAlignWith.
41
- # SupportedStylesAlignWith: either, start_of_block, start_of_line
42
- Layout/BlockAlignment:
36
+ Layout/ElseAlignment:
43
37
  Exclude:
44
- - 'spec/fontisan/commands/base_command_spec.rb'
38
+ - 'lib/fontisan/hints/postscript_hint_extractor.rb'
39
+ - 'lib/fontisan/subset/table_subsetter.rb'
45
40
 
46
- # Offense count: 1
41
+ # Offense count: 48
47
42
  # This cop supports safe autocorrection (--autocorrect).
48
- Layout/BlockEndNewline:
43
+ Layout/EmptyLineAfterGuardClause:
49
44
  Exclude:
50
- - 'spec/fontisan/commands/base_command_spec.rb'
45
+ - 'lib/fontisan/models/hint.rb'
46
+ - 'lib/fontisan/open_type_font.rb'
47
+ - 'lib/fontisan/tables/cff/charstring.rb'
48
+ - 'lib/fontisan/tables/cff/charstring_parser.rb'
49
+ - 'lib/fontisan/tables/cff2/table_reader.rb'
50
+ - 'lib/fontisan/true_type_font.rb'
51
+ - 'lib/fontisan/woff2/glyf_transformer.rb'
52
+ - 'lib/fontisan/woff2_font.rb'
51
53
 
52
54
  # Offense count: 2
53
55
  # This cop supports safe autocorrection (--autocorrect).
56
+ # Configuration parameters: EnforcedStyleAlignWith, Severity.
57
+ # SupportedStylesAlignWith: keyword, variable, start_of_line
58
+ Layout/EndAlignment:
59
+ Exclude:
60
+ - 'lib/fontisan/hints/postscript_hint_extractor.rb'
61
+ - 'lib/fontisan/subset/table_subsetter.rb'
62
+
63
+ # Offense count: 51
64
+ # This cop supports safe autocorrection (--autocorrect).
65
+ # Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
66
+ Layout/ExtraSpacing:
67
+ Exclude:
68
+ - 'lib/fontisan/loading_modes.rb'
69
+ - 'lib/fontisan/models/hint.rb'
70
+ - 'lib/fontisan/tables/cff/charstring.rb'
71
+ - 'lib/fontisan/validation/checksum_validator.rb'
72
+ - 'lib/fontisan/woff2/glyf_transformer.rb'
73
+ - 'lib/fontisan/woff2_font.rb'
74
+ - 'spec/fontisan/hints/hint_application_integration_spec.rb'
75
+ - 'spec/fontisan/hints/postscript_hint_applier_spec.rb'
76
+ - 'spec/fontisan/hints/truetype_hint_applier_spec.rb'
77
+ - 'spec/fontisan/tables/cff/charstring_builder_spec.rb'
78
+ - 'spec/fontisan/tables/cff2/region_matcher_spec.rb'
79
+ - 'spec/fontisan/tables/cff2/table_builder_spec.rb'
80
+ - 'spec/fontisan/tables/cff2/table_reader_spec.rb'
81
+ - 'spec/fontisan/variation/delta_parser_spec.rb'
82
+ - 'spec/fontisan/variation/validator_spec.rb'
83
+
84
+ # Offense count: 24
85
+ # This cop supports safe autocorrection (--autocorrect).
86
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
87
+ # SupportedStyles: special_inside_parentheses, consistent, align_brackets
88
+ Layout/FirstArrayElementIndentation:
89
+ Exclude:
90
+ - 'spec/fontisan/variation/delta_applier_spec.rb'
91
+ - 'spec/fontisan/variation/delta_parser_spec.rb'
92
+ - 'spec/fontisan/variation/optimizer_spec.rb'
93
+ - 'spec/fontisan/variation/validator_spec.rb'
94
+
95
+ # Offense count: 18
96
+ # This cop supports safe autocorrection (--autocorrect).
97
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
98
+ # SupportedStyles: special_inside_parentheses, consistent, align_braces
99
+ Layout/FirstHashElementIndentation:
100
+ Exclude:
101
+ - 'spec/fontisan/tables/cff2/table_builder_spec.rb'
102
+ - 'spec/fontisan/variation/delta_applier_spec.rb'
103
+ - 'spec/fontisan/variation/subsetter_spec.rb'
104
+
105
+ # Offense count: 3
106
+ # This cop supports safe autocorrection (--autocorrect).
54
107
  # Configuration parameters: Width, AllowedPatterns.
55
108
  Layout/IndentationWidth:
56
109
  Exclude:
57
- - 'spec/fontisan/commands/base_command_spec.rb'
110
+ - 'lib/fontisan/hints/postscript_hint_extractor.rb'
111
+ - 'lib/fontisan/subset/table_subsetter.rb'
112
+ - 'spec/fontisan/tables/glyf_spec.rb'
58
113
 
59
- # Offense count: 94
114
+ # Offense count: 1303
60
115
  # This cop supports safe autocorrection (--autocorrect).
61
116
  # Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings.
62
117
  # URISchemes: http, https
@@ -65,139 +120,465 @@ Layout/LineLength:
65
120
 
66
121
  # Offense count: 4
67
122
  # This cop supports safe autocorrection (--autocorrect).
68
- # Configuration parameters: AllowInHeredoc.
69
- Layout/TrailingWhitespace:
123
+ # Configuration parameters: EnforcedStyle.
124
+ # SupportedStyles: symmetrical, new_line, same_line
125
+ Layout/MultilineMethodCallBraceLayout:
70
126
  Exclude:
71
- - 'lib/fontisan/tables/cmap.rb'
72
- - 'spec/fontisan/commands/base_command_spec.rb'
127
+ - 'spec/fontisan/tables/cff2/table_builder_spec.rb'
128
+ - 'spec/fontisan/variation/validator_spec.rb'
73
129
 
74
130
  # Offense count: 3
75
- # Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches, IgnoreDuplicateElseBranch.
76
- Lint/DuplicateBranch:
131
+ # This cop supports safe autocorrection (--autocorrect).
132
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
133
+ # SupportedStyles: aligned, indented, indented_relative_to_receiver
134
+ Layout/MultilineMethodCallIndentation:
77
135
  Exclude:
78
- - 'lib/fontisan/commands/base_command.rb'
79
- - 'lib/fontisan/commands/dump_table_command.rb'
136
+ - 'lib/fontisan/tables/cff2/region_matcher.rb'
80
137
  - 'lib/fontisan/tables/name.rb'
81
138
 
139
+ # Offense count: 3
140
+ # This cop supports safe autocorrection (--autocorrect).
141
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
142
+ # SupportedStyles: aligned, indented
143
+ Layout/MultilineOperationIndentation:
144
+ Exclude:
145
+ - 'lib/fontisan/hints/hint_converter.rb'
146
+ - 'lib/fontisan/hints/postscript_hint_extractor.rb'
147
+ - 'lib/fontisan/hints/truetype_hint_extractor.rb'
148
+
82
149
  # Offense count: 1
83
150
  # This cop supports safe autocorrection (--autocorrect).
151
+ # Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator, EnforcedStyleForRationalLiterals.
152
+ # SupportedStylesForExponentOperator: space, no_space
153
+ # SupportedStylesForRationalLiterals: space, no_space
154
+ Layout/SpaceAroundOperators:
155
+ Exclude:
156
+ - 'lib/fontisan/tables/cff/charstring.rb'
157
+
158
+ # Offense count: 30
159
+ # This cop supports safe autocorrection (--autocorrect).
160
+ # Configuration parameters: EnforcedStyle.
161
+ # SupportedStyles: final_newline, final_blank_line
162
+ Layout/TrailingEmptyLines:
163
+ Enabled: false
164
+
165
+ # Offense count: 29
166
+ # Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches, IgnoreDuplicateElseBranch.
167
+ Lint/DuplicateBranch:
168
+ Enabled: false
169
+
170
+ # Offense count: 2
171
+ Lint/DuplicateMethods:
172
+ Exclude:
173
+ - 'lib/fontisan/tables/glyf.rb'
174
+ - 'lib/fontisan/woff2_font.rb'
175
+
176
+ # Offense count: 2
177
+ # This cop supports unsafe autocorrection (--autocorrect-all).
178
+ Lint/DuplicateRequire:
179
+ Exclude:
180
+ - 'lib/fontisan.rb'
181
+
182
+ # Offense count: 2
183
+ # This cop supports safe autocorrection (--autocorrect).
84
184
  # Configuration parameters: AllowComments.
85
185
  Lint/EmptyConditionalBody:
86
186
  Exclude:
87
187
  - 'lib/fontisan/cli.rb'
188
+ - 'lib/fontisan/variation/variable_svg_generator.rb'
88
189
 
89
190
  # Offense count: 2
90
191
  Lint/FloatComparison:
91
192
  Exclude:
92
193
  - 'lib/fontisan/tables/post.rb'
93
194
 
94
- # Offense count: 47
195
+ # Offense count: 3
196
+ Lint/IneffectiveAccessModifier:
197
+ Exclude:
198
+ - 'lib/fontisan/models/outline.rb'
199
+ - 'lib/fontisan/models/ttx/tables/binary_table.rb'
200
+
201
+ # Offense count: 1
202
+ # Configuration parameters: AllowedParentClasses.
203
+ Lint/MissingSuper:
204
+ Exclude:
205
+ - 'lib/fontisan/tables/cff2/table_builder.rb'
206
+
207
+ # Offense count: 2
208
+ # This cop supports unsafe autocorrection (--autocorrect-all).
209
+ # Configuration parameters: AllowedMethods, InferNonNilReceiver, AdditionalNilMethods.
210
+ # AllowedMethods: instance_of?, kind_of?, is_a?, eql?, respond_to?, equal?
211
+ # AdditionalNilMethods: present?, blank?, try, try!
212
+ Lint/RedundantSafeNavigation:
213
+ Exclude:
214
+ - 'lib/fontisan/hints/hint_converter.rb'
215
+
216
+ # Offense count: 1
217
+ Lint/StructNewOverride:
218
+ Exclude:
219
+ - 'lib/fontisan/optimizers/pattern_analyzer.rb'
220
+
221
+ # Offense count: 6
222
+ # This cop supports safe autocorrection (--autocorrect).
223
+ # Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
224
+ Lint/UnusedBlockArgument:
225
+ Exclude:
226
+ - 'lib/fontisan/models/hint.rb'
227
+ - 'lib/fontisan/tables/cff2/charstring_parser.rb'
228
+ - 'lib/fontisan/tables/cff2/table_reader.rb'
229
+ - 'spec/fontisan/converters/format_converter_spec.rb'
230
+ - 'spec/fontisan/tables/cff/charstring_rebuilder_spec.rb'
231
+
232
+ # Offense count: 13
233
+ # This cop supports safe autocorrection (--autocorrect).
234
+ # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods, NotImplementedExceptions.
235
+ # NotImplementedExceptions: NotImplementedError
236
+ Lint/UnusedMethodArgument:
237
+ Exclude:
238
+ - 'lib/fontisan/commands/instance_command.rb'
239
+ - 'lib/fontisan/converters/outline_converter.rb'
240
+ - 'lib/fontisan/font_loader.rb'
241
+ - 'lib/fontisan/hints/hint_converter.rb'
242
+ - 'lib/fontisan/tables/cff2/charstring_parser.rb'
243
+ - 'lib/fontisan/tables/cff2/private_dict_blend_handler.rb'
244
+ - 'lib/fontisan/utilities/brotli_wrapper.rb'
245
+ - 'lib/fontisan/variation/table_accessor.rb'
246
+ - 'lib/fontisan/woff2/glyf_transformer.rb'
247
+
248
+ # Offense count: 16
249
+ # This cop supports safe autocorrection (--autocorrect).
250
+ Lint/UselessAssignment:
251
+ Exclude:
252
+ - 'lib/fontisan/cli.rb'
253
+ - 'lib/fontisan/converters/outline_converter.rb'
254
+ - 'lib/fontisan/hints/truetype_hint_extractor.rb'
255
+ - 'lib/fontisan/models/hint.rb'
256
+ - 'lib/fontisan/tables/cff2/charstring_parser.rb'
257
+ - 'lib/fontisan/tables/cff2/table_reader.rb'
258
+ - 'spec/fontisan/tables/cff2/table_builder_spec.rb'
259
+ - 'spec/fontisan/utilities/checksum_calculator_spec.rb'
260
+ - 'spec/fontisan/utils/thread_pool_spec.rb'
261
+ - 'spec/fontisan/variation/optimizer_spec.rb'
262
+
263
+ # Offense count: 423
95
264
  # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
96
265
  Metrics/AbcSize:
97
266
  Enabled: false
98
267
 
99
- # Offense count: 3
268
+ # Offense count: 26
100
269
  # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
101
270
  # AllowedMethods: refine
102
271
  Metrics/BlockLength:
103
- Max: 67
272
+ Max: 81
273
+
274
+ # Offense count: 4
275
+ # Configuration parameters: CountBlocks, CountModifierForms.
276
+ Metrics/BlockNesting:
277
+ Max: 5
104
278
 
105
- # Offense count: 14
279
+ # Offense count: 213
106
280
  # Configuration parameters: AllowedMethods, AllowedPatterns, Max.
107
281
  Metrics/CyclomaticComplexity:
108
- Exclude:
109
- - 'lib/fontisan/commands/info_command.rb'
110
- - 'lib/fontisan/commands/unicode_command.rb'
111
- - 'lib/fontisan/font_loader.rb'
112
- - 'lib/fontisan/formatters/text_formatter.rb'
113
- - 'lib/fontisan/open_type_font.rb'
114
- - 'lib/fontisan/tables/fvar.rb'
115
- - 'lib/fontisan/tables/gpos.rb'
116
- - 'lib/fontisan/tables/gsub.rb'
117
- - 'lib/fontisan/tables/name.rb'
118
- - 'lib/fontisan/tables/post.rb'
119
- - 'spec/fontisan/tables/post_spec.rb'
282
+ Enabled: false
120
283
 
121
- # Offense count: 42
284
+ # Offense count: 630
122
285
  # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
123
286
  Metrics/MethodLength:
124
- Max: 37
287
+ Max: 136
125
288
 
126
- # Offense count: 3
127
- # Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
289
+ # Offense count: 17
290
+ # Configuration parameters: CountKeywordArgs.
128
291
  Metrics/ParameterLists:
129
292
  Max: 39
293
+ MaxOptionalParameters: 4
130
294
 
131
- # Offense count: 7
295
+ # Offense count: 150
132
296
  # Configuration parameters: AllowedMethods, AllowedPatterns, Max.
133
297
  Metrics/PerceivedComplexity:
298
+ Enabled: false
299
+
300
+ # Offense count: 17
301
+ # Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
302
+ # AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to
303
+ Naming/MethodParameterName:
134
304
  Exclude:
135
- - 'lib/fontisan/tables/gpos.rb'
136
- - 'lib/fontisan/tables/gsub.rb'
137
- - 'lib/fontisan/tables/name.rb'
138
- - 'spec/fontisan/tables/post_spec.rb'
305
+ - 'lib/fontisan/optimizers/subroutine_optimizer.rb'
306
+ - 'lib/fontisan/tables/cff2/blend_operator.rb'
307
+ - 'lib/fontisan/tables/glyf/curve_converter.rb'
308
+ - 'lib/fontisan/variation/optimizer.rb'
139
309
 
140
- # Offense count: 2
310
+ # Offense count: 71
141
311
  # Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns.
142
312
  # SupportedStyles: snake_case, normalcase, non_integer
143
313
  # AllowedIdentifiers: TLS1_1, TLS1_2, capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339, x86_64
144
314
  Naming/VariableNumber:
145
315
  Exclude:
316
+ - 'lib/fontisan/models/ttx/tables/os2_table.rb'
317
+ - 'lib/fontisan/subset/table_subsetter.rb'
318
+ - 'lib/fontisan/tables/cff/charset.rb'
319
+ - 'lib/fontisan/tables/cff/encoding.rb'
146
320
  - 'lib/fontisan/tables/cmap.rb'
321
+ - 'lib/fontisan/tables/glyf.rb'
322
+ - 'lib/fontisan/tables/glyf/compound_glyph.rb'
323
+ - 'lib/fontisan/tables/glyf/glyph_builder.rb'
324
+ - 'lib/fontisan/tables/glyf/simple_glyph.rb'
325
+ - 'spec/fontisan/collection/table_deduplicator_spec.rb'
326
+ - 'spec/fontisan/tables/cff/charset_spec.rb'
327
+ - 'spec/fontisan/tables/glyf/glyph_builder_spec.rb'
328
+ - 'spec/fontisan/tables/glyf_spec.rb'
329
+ - 'spec/fontisan/tables/hmtx_spec.rb'
330
+ - 'spec/fontisan/tables/maxp_spec.rb'
147
331
 
148
- # Offense count: 15
332
+ # Offense count: 22
149
333
  # Configuration parameters: MinSize.
150
334
  Performance/CollectionLiteralInLoop:
151
335
  Exclude:
336
+ - 'lib/fontisan/collection/builder.rb'
152
337
  - 'lib/fontisan/open_type_font.rb'
338
+ - 'lib/fontisan/tables/cff/charstring.rb'
339
+ - 'lib/fontisan/tables/cff/private_dict_writer.rb'
340
+ - 'lib/fontisan/tables/cff2.rb'
341
+ - 'lib/fontisan/tables/cff2/region_matcher.rb'
153
342
  - 'lib/fontisan/true_type_font.rb'
343
+ - 'lib/fontisan/variation/validator.rb'
154
344
  - 'spec/fontisan/cli_spec.rb'
155
345
  - 'spec/fontisan/commands/glyphs_command_spec.rb'
156
346
  - 'spec/fontisan/commands/info_command_spec.rb'
157
347
  - 'spec/fontisan/commands/tables_command_spec.rb'
158
348
 
349
+ # Offense count: 3
350
+ # This cop supports safe autocorrection (--autocorrect).
351
+ Performance/RedundantBlockCall:
352
+ Exclude:
353
+ - 'lib/fontisan/tables/cff/charstring_rebuilder.rb'
354
+
159
355
  # Offense count: 1
356
+ # This cop supports unsafe autocorrection (--autocorrect-all).
357
+ # Configuration parameters: AllowRegexpMatch.
358
+ Performance/RedundantEqualityComparisonBlock:
359
+ Exclude:
360
+ - 'spec/fontisan/utilities/checksum_calculator_spec.rb'
361
+
362
+ # Offense count: 10
363
+ # This cop supports unsafe autocorrection (--autocorrect-all).
364
+ Performance/TimesMap:
365
+ Exclude:
366
+ - 'benchmark/variation_quick_bench.rb'
367
+ - 'lib/fontisan/tables/cff2.rb'
368
+ - 'spec/fontisan/hints/hint_application_integration_spec.rb'
369
+ - 'spec/fontisan/utilities/checksum_calculator_spec.rb'
370
+ - 'spec/fontisan/utils/thread_pool_spec.rb'
371
+ - 'spec/fontisan/variation/cache_spec.rb'
372
+ - 'spec/fontisan/variation/parallel_generator_spec.rb'
373
+
374
+ # Offense count: 23
375
+ RSpec/AnyInstance:
376
+ Exclude:
377
+ - 'spec/fontisan/converters/format_converter_spec.rb'
378
+ - 'spec/fontisan/validation/validator_spec.rb'
379
+ - 'spec/fontisan/variation/delta_applier_spec.rb'
380
+ - 'spec/fontisan/variation/instance_writer_spec.rb'
381
+ - 'spec/fontisan/variation/parallel_generator_spec.rb'
382
+ - 'spec/integration/format_conversion_spec.rb'
383
+
384
+ # Offense count: 94
160
385
  # Configuration parameters: Prefixes, AllowedPatterns.
161
386
  # Prefixes: when, with, without
162
387
  RSpec/ContextWording:
388
+ Enabled: false
389
+
390
+ # Offense count: 16
391
+ # Configuration parameters: IgnoredMetadata.
392
+ RSpec/DescribeClass:
393
+ Enabled: false
394
+
395
+ # Offense count: 1
396
+ RSpec/DescribeMethod:
163
397
  Exclude:
164
- - 'spec/fontisan/commands/scripts_command_spec.rb'
398
+ - 'spec/fontisan/collection/variable_font_builder_spec.rb'
165
399
 
166
- # Offense count: 76
400
+ # Offense count: 1108
167
401
  # Configuration parameters: CountAsOne.
168
402
  RSpec/ExampleLength:
169
403
  Max: 66
170
404
 
405
+ # Offense count: 4
406
+ # This cop supports safe autocorrection (--autocorrect).
407
+ RSpec/ExpectActual:
408
+ Exclude:
409
+ - '**/spec/routing/**/*'
410
+ - 'spec/fontisan/commands/subset_command_spec.rb'
411
+ - 'spec/fontisan/subset/builder_spec.rb'
412
+ - 'spec/fontisan/utils/thread_pool_spec.rb'
413
+ - 'spec/fontisan/variation/validator_spec.rb'
414
+
171
415
  # Offense count: 1
416
+ RSpec/IdenticalEqualityAssertion:
417
+ Exclude:
418
+ - 'spec/fontisan/utils/thread_pool_spec.rb'
419
+
420
+ # Offense count: 27
421
+ # Configuration parameters: Max, AllowedIdentifiers, AllowedPatterns.
422
+ RSpec/IndexedLet:
423
+ Exclude:
424
+ - 'spec/fontisan/collection/builder_spec.rb'
425
+ - 'spec/fontisan/collection/offset_calculator_spec.rb'
426
+ - 'spec/fontisan/collection/table_analyzer_spec.rb'
427
+ - 'spec/fontisan/collection/table_deduplicator_spec.rb'
428
+ - 'spec/fontisan/collection/writer_spec.rb'
429
+ - 'spec/fontisan/commands/pack_command_spec.rb'
430
+ - 'spec/fontisan/commands/unpack_command_spec.rb'
431
+ - 'spec/fontisan/optimizers/charstring_rewriter_spec.rb'
432
+ - 'spec/fontisan/optimizers/subroutine_builder_spec.rb'
433
+ - 'spec/fontisan/optimizers/subroutine_optimizer_spec.rb'
434
+
435
+ # Offense count: 3
436
+ # Configuration parameters: AssignmentOnly.
437
+ RSpec/InstanceVariable:
438
+ Exclude:
439
+ - 'spec/fontisan/optimizers/subroutine_builder_spec.rb'
440
+
441
+ # Offense count: 1
442
+ # This cop supports safe autocorrection (--autocorrect).
443
+ RSpec/IteratedExpectation:
444
+ Exclude:
445
+ - 'spec/fontisan/tables/glyf_spec.rb'
446
+
447
+ # Offense count: 2
448
+ # This cop supports safe autocorrection (--autocorrect).
449
+ RSpec/LeadingSubject:
450
+ Exclude:
451
+ - 'spec/fontisan/variation/blend_applier_spec.rb'
452
+ - 'spec/fontisan/variation/delta_applier_spec.rb'
453
+
454
+ # Offense count: 19
455
+ # Configuration parameters: EnforcedStyle.
456
+ # SupportedStyles: have_received, receive
457
+ RSpec/MessageSpies:
458
+ Exclude:
459
+ - 'spec/fontisan/collection/builder_spec.rb'
460
+ - 'spec/fontisan/collection/variable_font_builder_spec.rb'
461
+ - 'spec/fontisan/commands/pack_command_spec.rb'
462
+ - 'spec/fontisan/commands/unpack_command_spec.rb'
463
+ - 'spec/fontisan/glyph_accessor_spec.rb'
464
+ - 'spec/fontisan/metrics_calculator_spec.rb'
465
+ - 'spec/fontisan/subset/builder_spec.rb'
466
+ - 'spec/fontisan/variation/instance_writer_spec.rb'
467
+ - 'spec/fontisan/woff2_font_spec.rb'
468
+
469
+ # Offense count: 4
172
470
  RSpec/MultipleDescribes:
173
471
  Exclude:
472
+ - 'spec/fontisan/loading_modes_spec.rb'
174
473
  - 'spec/fontisan/models/table_info_spec.rb'
474
+ - 'spec/fontisan/utils/thread_pool_spec.rb'
475
+ - 'spec/fontisan/variation/cache_spec.rb'
175
476
 
176
- # Offense count: 151
477
+ # Offense count: 1414
177
478
  RSpec/MultipleExpectations:
178
- Max: 16
479
+ Max: 22
179
480
 
180
- # Offense count: 1
481
+ # Offense count: 132
482
+ # Configuration parameters: AllowSubject.
483
+ RSpec/MultipleMemoizedHelpers:
484
+ Max: 13
485
+
486
+ # Offense count: 16
181
487
  # Configuration parameters: AllowedGroups.
182
488
  RSpec/NestedGroups:
183
489
  Max: 4
184
490
 
185
- # Offense count: 7
491
+ # Offense count: 8
492
+ # Configuration parameters: AllowedPatterns.
493
+ # AllowedPatterns: ^expect_, ^assert_
494
+ RSpec/NoExpectationExample:
495
+ Exclude:
496
+ - 'spec/benchmarks/subroutine_optimization_benchmark.rb'
497
+ - 'spec/fontisan/variation/variable_svg_generator_spec.rb'
498
+
499
+ # Offense count: 111
500
+ # This cop supports unsafe autocorrection (--autocorrect-all).
501
+ RSpec/ReceiveMessages:
502
+ Exclude:
503
+ - 'spec/fontisan/converters/outline_converter_spec.rb'
504
+ - 'spec/fontisan/hints/postscript_hint_extractor_spec.rb'
505
+ - 'spec/fontisan/hints/truetype_hint_extractor_spec.rb'
506
+ - 'spec/fontisan/tables/cff2/table_builder_spec.rb'
507
+ - 'spec/fontisan/variation/optimizer_spec.rb'
508
+ - 'spec/fontisan/variation/parallel_generator_spec.rb'
509
+ - 'spec/fontisan/variation/subsetter_spec.rb'
510
+ - 'spec/fontisan/variation/validator_spec.rb'
511
+
512
+ # Offense count: 9
186
513
  RSpec/RepeatedExample:
187
514
  Exclude:
515
+ - 'spec/fontisan/metrics_calculator_spec.rb'
188
516
  - 'spec/fontisan/tables/os2_spec.rb'
189
517
 
518
+ # Offense count: 12
519
+ # Configuration parameters: CustomTransform, IgnoreMethods, IgnoreMetadata, InflectorPath, EnforcedInflector.
520
+ # SupportedInflectors: default, active_support
521
+ RSpec/SpecFilePathFormat:
522
+ Exclude:
523
+ - '**/spec/routing/**/*'
524
+ - 'spec/fontisan/collection/variable_font_builder_spec.rb'
525
+ - 'spec/fontisan/hints/postscript_hint_applier_spec.rb'
526
+ - 'spec/fontisan/hints/postscript_hint_extractor_spec.rb'
527
+ - 'spec/fontisan/hints/truetype_hint_applier_spec.rb'
528
+ - 'spec/fontisan/hints/truetype_hint_extractor_spec.rb'
529
+ - 'spec/fontisan/tables/cff/charstring_builder_spec.rb'
530
+ - 'spec/fontisan/tables/cff/charstring_parser_spec.rb'
531
+ - 'spec/fontisan/tables/cff/charstring_rebuilder_spec.rb'
532
+ - 'spec/fontisan/tables/cff/charstring_spec.rb'
533
+ - 'spec/fontisan/tables/glyf/curve_converter_spec.rb'
534
+ - 'spec/fontisan/tables/glyf/glyph_builder_spec.rb'
535
+ - 'spec/fontisan/woff2/header_spec.rb'
536
+
190
537
  # Offense count: 1
538
+ RSpec/SpecFilePathSuffix:
539
+ Exclude:
540
+ - 'spec/benchmarks/subroutine_optimization_benchmark.rb'
541
+
542
+ # Offense count: 1
543
+ RSpec/StubbedMock:
544
+ Exclude:
545
+ - 'spec/fontisan/woff2_font_spec.rb'
546
+
547
+ # Offense count: 10
548
+ RSpec/SubjectStub:
549
+ Exclude:
550
+ - 'spec/fontisan/variation/delta_applier_spec.rb'
551
+
552
+ # Offense count: 4
553
+ # This cop supports unsafe autocorrection (--autocorrect-all).
554
+ RSpec/VerifiedDoubleReference:
555
+ Exclude:
556
+ - 'spec/fontisan/variation/parallel_generator_spec.rb'
557
+
558
+ # Offense count: 292
559
+ # Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
560
+ RSpec/VerifiedDoubles:
561
+ Enabled: false
562
+
563
+ # Offense count: 2
191
564
  Rake/MethodDefinitionInTask:
192
565
  Exclude:
193
566
  - 'Rakefile'
194
567
 
195
- # Offense count: 1
568
+ # Offense count: 2
196
569
  Security/Open:
197
570
  Exclude:
198
571
  - 'Rakefile'
199
572
 
200
- # Offense count: 1
573
+ # Offense count: 2
574
+ # This cop supports safe autocorrection (--autocorrect).
575
+ # Configuration parameters: EnforcedStyle.
576
+ # SupportedStyles: separated, grouped
577
+ Style/AccessorGrouping:
578
+ Exclude:
579
+ - 'lib/fontisan/woff2_font.rb'
580
+
581
+ # Offense count: 17
201
582
  # This cop supports safe autocorrection (--autocorrect).
202
583
  # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
203
584
  # SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
@@ -206,12 +587,234 @@ Security/Open:
206
587
  # AllowedMethods: lambda, proc, it
207
588
  Style/BlockDelimiters:
208
589
  Exclude:
209
- - 'spec/fontisan/commands/base_command_spec.rb'
590
+ - 'spec/fontisan/commands/convert_command_spec.rb'
591
+ - 'spec/fontisan/hints/postscript_hint_applier_spec.rb'
592
+ - 'spec/fontisan/lazy_loading_spec.rb'
593
+ - 'spec/fontisan/loading_modes_spec.rb'
594
+ - 'spec/fontisan/tables/cff/charstring_rebuilder_spec.rb'
595
+ - 'spec/fontisan/tables/cff2/table_builder_spec.rb'
596
+ - 'spec/fontisan/utilities/checksum_calculator_spec.rb'
210
597
 
211
- # Offense count: 2
598
+ # Offense count: 4
599
+ # This cop supports unsafe autocorrection (--autocorrect-all).
600
+ Style/CombinableLoops:
601
+ Exclude:
602
+ - 'lib/fontisan/collection/offset_calculator.rb'
603
+ - 'lib/fontisan/font_writer.rb'
604
+ - 'lib/fontisan/tables/cff/hint_operation_injector.rb'
605
+ - 'lib/fontisan/woff2_font.rb'
606
+
607
+ # Offense count: 4
608
+ # This cop supports safe autocorrection (--autocorrect).
609
+ # Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
610
+ # SupportedStyles: assign_to_condition, assign_inside_condition
611
+ Style/ConditionalAssignment:
612
+ Exclude:
613
+ - 'lib/fontisan/tables/cff/charstring_rebuilder.rb'
614
+ - 'lib/fontisan/tables/cff2/table_builder.rb'
615
+ - 'lib/fontisan/woff2/glyf_transformer.rb'
616
+
617
+ # Offense count: 9
618
+ # This cop supports safe autocorrection (--autocorrect).
619
+ # Configuration parameters: EnforcedStyle, AllowComments.
620
+ # SupportedStyles: empty, nil, both
621
+ Style/EmptyElse:
622
+ Exclude:
623
+ - 'lib/fontisan/converters/outline_converter.rb'
624
+ - 'lib/fontisan/hints/postscript_hint_applier.rb'
625
+ - 'lib/fontisan/hints/postscript_hint_extractor.rb'
626
+ - 'lib/fontisan/hints/truetype_hint_extractor.rb'
627
+ - 'spec/fontisan/converters/outline_converter_spec.rb'
628
+ - 'spec/integration/outline_conversion_spec.rb'
629
+
630
+ # Offense count: 17
212
631
  # This cop supports safe autocorrection (--autocorrect).
213
632
  # Configuration parameters: EnforcedStyle, MaxUnannotatedPlaceholdersAllowed, Mode, AllowedMethods, AllowedPatterns.
214
633
  # SupportedStyles: annotated, template, unannotated
215
634
  Style/FormatStringToken:
216
635
  Exclude:
217
636
  - 'lib/fontisan/formatters/text_formatter.rb'
637
+ - 'scripts/measure_optimization.rb'
638
+
639
+ # Offense count: 4
640
+ # This cop supports unsafe autocorrection (--autocorrect-all).
641
+ # Configuration parameters: AllowedReceivers.
642
+ # AllowedReceivers: Thread.current
643
+ Style/HashEachMethods:
644
+ Exclude:
645
+ - 'lib/fontisan/converters/woff_writer.rb'
646
+ - 'lib/fontisan/subset/table_subsetter.rb'
647
+ - 'spec/fontisan/subset/glyph_mapping_spec.rb'
648
+
649
+ # Offense count: 2
650
+ # Configuration parameters: MinBranchesCount.
651
+ Style/HashLikeCase:
652
+ Exclude:
653
+ - 'lib/fontisan/commands/unpack_command.rb'
654
+ - 'lib/fontisan/models/validation_report.rb'
655
+
656
+ # Offense count: 8
657
+ # This cop supports unsafe autocorrection (--autocorrect-all).
658
+ Style/IdenticalConditionalBranches:
659
+ Exclude:
660
+ - 'lib/fontisan/models/hint.rb'
661
+ - 'lib/fontisan/woff2/glyf_transformer.rb'
662
+ - 'spec/fontisan/tables/cff/charstring_rebuilder_spec.rb'
663
+
664
+ # Offense count: 1
665
+ # This cop supports safe autocorrection (--autocorrect).
666
+ # Configuration parameters: AllowMethodComparison, ComparisonsThreshold.
667
+ Style/MultipleComparison:
668
+ Exclude:
669
+ - 'lib/fontisan/tables/cff2/table_builder.rb'
670
+
671
+ # Offense count: 1
672
+ # This cop supports unsafe autocorrection (--autocorrect-all).
673
+ # Configuration parameters: EnforcedStyle.
674
+ # SupportedStyles: literals, strict
675
+ Style/MutableConstant:
676
+ Exclude:
677
+ - 'lib/fontisan/hints/truetype_hint_extractor.rb'
678
+
679
+ # Offense count: 1
680
+ # This cop supports safe autocorrection (--autocorrect).
681
+ Style/NegatedIfElseCondition:
682
+ Exclude:
683
+ - 'lib/fontisan/converters/outline_converter.rb'
684
+
685
+ # Offense count: 1
686
+ # This cop supports safe autocorrection (--autocorrect).
687
+ Style/NestedTernaryOperator:
688
+ Exclude:
689
+ - 'lib/fontisan/font_loader.rb'
690
+
691
+ # Offense count: 3
692
+ # This cop supports safe autocorrection (--autocorrect).
693
+ Style/NilLambda:
694
+ Exclude:
695
+ - 'lib/fontisan/models/font_export.rb'
696
+ - 'lib/fontisan/models/validation_report.rb'
697
+
698
+ # Offense count: 2
699
+ # This cop supports unsafe autocorrection (--autocorrect-all).
700
+ # Configuration parameters: EnforcedStyle, AllowedMethods, AllowedPatterns.
701
+ # SupportedStyles: predicate, comparison
702
+ Style/NumericPredicate:
703
+ Exclude:
704
+ - 'spec/**/*'
705
+ - 'lib/fontisan/hints/hint_converter.rb'
706
+ - 'lib/fontisan/tables/cff2/private_dict_blend_handler.rb'
707
+
708
+ # Offense count: 2
709
+ # This cop supports safe autocorrection (--autocorrect).
710
+ Style/ParallelAssignment:
711
+ Exclude:
712
+ - 'spec/fontisan/variation/blend_applier_spec.rb'
713
+
714
+ # Offense count: 2
715
+ # This cop supports safe autocorrection (--autocorrect).
716
+ Style/RedundantAssignment:
717
+ Exclude:
718
+ - 'lib/fontisan/woff2/glyf_transformer.rb'
719
+ - 'spec/fontisan/variation/subsetter_spec.rb'
720
+
721
+ # Offense count: 4
722
+ # This cop supports safe autocorrection (--autocorrect).
723
+ Style/RedundantBegin:
724
+ Exclude:
725
+ - 'lib/fontisan/hints/postscript_hint_extractor.rb'
726
+ - 'lib/fontisan/hints/truetype_hint_extractor.rb'
727
+ - 'lib/fontisan/tables/cff2/table_reader.rb'
728
+
729
+ # Offense count: 10
730
+ # This cop supports unsafe autocorrection (--autocorrect-all).
731
+ # Configuration parameters: SafeForConstants.
732
+ Style/RedundantFetchBlock:
733
+ Exclude:
734
+ - 'spec/fontisan/variation/cache_spec.rb'
735
+
736
+ # Offense count: 24
737
+ # This cop supports safe autocorrection (--autocorrect).
738
+ Style/RedundantFreeze:
739
+ Exclude:
740
+ - 'lib/fontisan/constants.rb'
741
+
742
+ # Offense count: 5
743
+ # This cop supports safe autocorrection (--autocorrect).
744
+ Style/RedundantParentheses:
745
+ Exclude:
746
+ - 'lib/fontisan/tables/cff/charstring_parser.rb'
747
+ - 'spec/fontisan/tables/cff2/region_matcher_spec.rb'
748
+
749
+ # Offense count: 5
750
+ # This cop supports unsafe autocorrection (--autocorrect-all).
751
+ # Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength.
752
+ # AllowedMethods: present?, blank?, presence, try, try!
753
+ Style/SafeNavigation:
754
+ Exclude:
755
+ - 'Rakefile'
756
+ - 'lib/fontisan/subset/table_subsetter.rb'
757
+ - 'lib/fontisan/tables/cff2/table_builder.rb'
758
+ - 'lib/fontisan/woff2_font.rb'
759
+
760
+ # Offense count: 2
761
+ # This cop supports unsafe autocorrection (--autocorrect-all).
762
+ Style/SlicingWithRange:
763
+ Exclude:
764
+ - 'lib/fontisan/tables/cff2/table_builder.rb'
765
+ - 'spec/fontisan/tables/cff2/table_builder_spec.rb'
766
+
767
+ # Offense count: 5
768
+ # This cop supports safe autocorrection (--autocorrect).
769
+ Style/StderrPuts:
770
+ Exclude:
771
+ - 'lib/fontisan/commands/instance_command.rb'
772
+
773
+ # Offense count: 3
774
+ # This cop supports safe autocorrection (--autocorrect).
775
+ # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
776
+ # SupportedStyles: single_quotes, double_quotes
777
+ Style/StringLiterals:
778
+ Exclude:
779
+ - 'benchmark/variation_quick_bench.rb'
780
+
781
+ # Offense count: 1
782
+ # This cop supports safe autocorrection (--autocorrect).
783
+ # Configuration parameters: .
784
+ # SupportedStyles: percent, brackets
785
+ Style/SymbolArray:
786
+ EnforcedStyle: percent
787
+ MinSize: 14
788
+
789
+ # Offense count: 220
790
+ # This cop supports safe autocorrection (--autocorrect).
791
+ # Configuration parameters: EnforcedStyleForMultiline.
792
+ # SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma
793
+ Style/TrailingCommaInArguments:
794
+ Enabled: false
795
+
796
+ # Offense count: 108
797
+ # This cop supports safe autocorrection (--autocorrect).
798
+ # Configuration parameters: EnforcedStyleForMultiline.
799
+ # SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma
800
+ Style/TrailingCommaInArrayLiteral:
801
+ Enabled: false
802
+
803
+ # Offense count: 77
804
+ # This cop supports safe autocorrection (--autocorrect).
805
+ # Configuration parameters: EnforcedStyleForMultiline.
806
+ # SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma
807
+ Style/TrailingCommaInHashLiteral:
808
+ Enabled: false
809
+
810
+ # Offense count: 1
811
+ # This cop supports safe autocorrection (--autocorrect).
812
+ Style/UnlessElse:
813
+ Exclude:
814
+ - 'lib/fontisan/woff2/glyf_transformer.rb'
815
+
816
+ # Offense count: 1
817
+ # This cop supports unsafe autocorrection (--autocorrect-all).
818
+ Style/ZeroLengthPredicate:
819
+ Exclude:
820
+ - 'lib/fontisan/hints/hint_converter.rb'