fontisan 0.2.13 → 0.2.14

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 368b69c9050597188840f118f60dcb46247feae93ffe7e53c1954991d790ab95
4
- data.tar.gz: 4c3e591c4a180734430a099a07036c2888ec7da62f5ccb39d33440b9a2b2346b
3
+ metadata.gz: f8d495575ec4d2504df2181032e5ac8908f503772b1e82171e60e3ffbbd9039a
4
+ data.tar.gz: 80bb603d185b5a96ad53dad56fb2a2b2ab170175ccfb7f924ce8a216bd2eddf9
5
5
  SHA512:
6
- metadata.gz: 73e614a107d14632d9fa25b1e0605503e3e5d7642230f9acc1a0ebe93a6262f7947b95e73a7c7aa5a5a0f0ec0b56fb34d8e148b7c59c57c30a4690795c280a22
7
- data.tar.gz: 6b1144b3f402d2c374c5fc4b16918c66751a603a7a4af15a63b9df36c3f7a617a0ce7ca1e6774fb40c55174e52f7f588c23831655f31c0b722281f15f2ba6179
6
+ metadata.gz: 8c189ad3392f6acfc15a4bda354785d5310a859c9e282606cbbde57b3b187420f0739ad593f03e703f5f537dd8dcc148114e114b2e437cc5b77891d7fcf7a856
7
+ data.tar.gz: 67de3c882d2399a3118aa40d1f0d05c101c77c93ebe0005959fd9ed16fe2d6854a81085337d1b99d74f125771982fa8b340a106163d9e8e4e2e48956e2ff48ea
data/.rubocop_todo.yml CHANGED
@@ -1,103 +1,23 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2026-01-21 09:04:34 UTC using RuboCop version 1.82.1.
3
+ # on 2026-02-05 04:16:45 UTC using RuboCop version 1.82.1.
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: 1
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
  Gemspec/RequiredRubyVersion:
18
11
  Exclude:
19
12
  - 'fontisan.gemspec'
20
13
 
21
- # Offense count: 2
22
- # This cop supports safe autocorrection (--autocorrect).
23
- # Configuration parameters: EnforcedStyle, IndentationWidth.
24
- # SupportedStyles: with_first_argument, with_fixed_indentation
25
- Layout/ArgumentAlignment:
26
- Exclude:
27
- - 'lib/fontisan/type1/cff_to_type1_converter.rb'
28
- - 'spec/performance/type1_performance_spec.rb'
29
-
30
- # Offense count: 2
31
- # This cop supports safe autocorrection (--autocorrect).
32
- Layout/ElseAlignment:
33
- Exclude:
34
- - 'lib/fontisan/commands/info_command.rb'
35
- - 'lib/fontisan/converters/type1_converter.rb'
36
-
37
- # Offense count: 1
38
- # This cop supports safe autocorrection (--autocorrect).
39
- Layout/EmptyLineAfterGuardClause:
40
- Exclude:
41
- - 'spec/validation/type1_validation_spec.rb'
42
-
43
- # Offense count: 2
44
- # This cop supports safe autocorrection (--autocorrect).
45
- # Configuration parameters: EnforcedStyleAlignWith.
46
- # SupportedStylesAlignWith: keyword, variable, start_of_line
47
- Layout/EndAlignment:
48
- Exclude:
49
- - 'lib/fontisan/commands/info_command.rb'
50
- - 'lib/fontisan/converters/type1_converter.rb'
51
-
52
- # Offense count: 63
53
- # This cop supports safe autocorrection (--autocorrect).
54
- # Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
55
- Layout/ExtraSpacing:
56
- Exclude:
57
- - 'lib/fontisan/commands/info_command.rb'
58
- - 'lib/fontisan/converters/type1_converter.rb'
59
- - 'lib/fontisan/type1/cff_to_type1_converter.rb'
60
- - 'lib/fontisan/type1/seac_expander.rb'
61
- - 'spec/fontisan/converters/type1_converter_spec.rb'
62
- - 'spec/fontisan/type1/cff_to_type1_converter_spec.rb'
63
- - 'spec/fontisan/type1/seac_expander_spec.rb'
64
-
65
- # Offense count: 24
66
- # This cop supports safe autocorrection (--autocorrect).
67
- # Configuration parameters: EnforcedStyle, IndentationWidth.
68
- # SupportedStyles: special_inside_parentheses, consistent, align_braces
69
- Layout/FirstHashElementIndentation:
70
- Exclude:
71
- - 'spec/fontisan/converters/type1_converter_spec.rb'
72
- - 'spec/fontisan/type1/seac_expander_spec.rb'
73
- - 'spec/integration/type1_conversion_spec.rb'
74
- - 'spec/validation/type1_validation_spec.rb'
75
-
76
- # Offense count: 2
77
- # This cop supports safe autocorrection (--autocorrect).
78
- # Configuration parameters: Width, AllowedPatterns.
79
- Layout/IndentationWidth:
80
- Exclude:
81
- - 'lib/fontisan/commands/info_command.rb'
82
- - 'lib/fontisan/converters/type1_converter.rb'
83
-
84
- # Offense count: 1596
14
+ # Offense count: 1585
85
15
  # This cop supports safe autocorrection (--autocorrect).
86
16
  # Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
87
17
  # URISchemes: http, https
88
18
  Layout/LineLength:
89
19
  Enabled: false
90
20
 
91
- # Offense count: 2
92
- # This cop supports safe autocorrection (--autocorrect).
93
- # Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator, EnforcedStyleForRationalLiterals.
94
- # SupportedStylesForExponentOperator: space, no_space
95
- # SupportedStylesForRationalLiterals: space, no_space
96
- Layout/SpaceAroundOperators:
97
- Exclude:
98
- - 'lib/fontisan/converters/type1_converter.rb'
99
- - 'spec/validation/type1_validation_spec.rb'
100
-
101
21
  # Offense count: 3
102
22
  Lint/CopDirectiveSyntax:
103
23
  Exclude:
@@ -153,17 +73,6 @@ Lint/MissingSuper:
153
73
  - 'lib/fontisan/commands/validate_command.rb'
154
74
  - 'lib/fontisan/tables/cff2/table_builder.rb'
155
75
 
156
- # Offense count: 9
157
- # This cop supports unsafe autocorrection (--autocorrect-all).
158
- # Configuration parameters: AllowedMethods, InferNonNilReceiver, AdditionalNilMethods.
159
- # AllowedMethods: instance_of?, kind_of?, is_a?, eql?, respond_to?, equal?
160
- # AdditionalNilMethods: present?, blank?, try, try!
161
- Lint/RedundantSafeNavigation:
162
- Exclude:
163
- - 'lib/fontisan/converters/type1_converter.rb'
164
- - 'lib/fontisan/type1/cff_to_type1_converter.rb'
165
- - 'spec/fontisan/converters/type1_property_spec.rb'
166
-
167
76
  # Offense count: 1
168
77
  Lint/StructNewOverride:
169
78
  Exclude:
@@ -183,20 +92,13 @@ Lint/UnusedMethodArgument:
183
92
  - 'lib/fontisan/woff2/glyf_transformer.rb'
184
93
  - 'lib/fontisan/woff_font.rb'
185
94
 
186
- # Offense count: 5
187
- # This cop supports safe autocorrection (--autocorrect).
188
- Lint/UselessAssignment:
189
- Exclude:
190
- - 'lib/fontisan/type1/seac_expander.rb'
191
- - 'spec/performance/type1_performance_spec.rb'
192
-
193
95
  # Offense count: 5
194
96
  Lint/UselessConstantScoping:
195
97
  Exclude:
196
98
  - 'lib/fontisan/conversion_options.rb'
197
99
  - 'lib/fontisan/type1/charstrings.rb'
198
100
 
199
- # Offense count: 552
101
+ # Offense count: 549
200
102
  # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
201
103
  Metrics/AbcSize:
202
104
  Enabled: false
@@ -205,7 +107,7 @@ Metrics/AbcSize:
205
107
  # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
206
108
  # AllowedMethods: refine
207
109
  Metrics/BlockLength:
208
- Max: 101
110
+ Max: 104
209
111
 
210
112
  # Offense count: 8
211
113
  # Configuration parameters: CountBlocks, CountModifierForms.
@@ -224,7 +126,7 @@ Metrics/CollectionLiteralLength:
224
126
  Metrics/CyclomaticComplexity:
225
127
  Enabled: false
226
128
 
227
- # Offense count: 905
129
+ # Offense count: 902
228
130
  # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
229
131
  Metrics/MethodLength:
230
132
  Max: 135
@@ -306,13 +208,7 @@ RSpec/AnyInstance:
306
208
  - 'spec/fontisan/variation/parallel_generator_spec.rb'
307
209
  - 'spec/integration/format_conversion_spec.rb'
308
210
 
309
- # Offense count: 1
310
- # This cop supports unsafe autocorrection (--autocorrect-all).
311
- RSpec/BeEq:
312
- Exclude:
313
- - 'spec/fontisan/converters/type1_property_spec.rb'
314
-
315
- # Offense count: 127
211
+ # Offense count: 128
316
212
  # Configuration parameters: Prefixes, AllowedPatterns.
317
213
  # Prefixes: when, with, without
318
214
  RSpec/ContextWording:
@@ -334,7 +230,7 @@ RSpec/DescribeMethod:
334
230
  - 'spec/fontisan/type1/seac_expander_spec.rb'
335
231
  - 'spec/fontisan/type1_real_fonts_spec.rb'
336
232
 
337
- # Offense count: 1426
233
+ # Offense count: 1428
338
234
  # Configuration parameters: CountAsOne.
339
235
  RSpec/ExampleLength:
340
236
  Max: 66
@@ -386,12 +282,6 @@ RSpec/IteratedExpectation:
386
282
  Exclude:
387
283
  - 'spec/fontisan/tables/glyf_spec.rb'
388
284
 
389
- # Offense count: 1
390
- # This cop supports safe autocorrection (--autocorrect).
391
- RSpec/LeadingSubject:
392
- Exclude:
393
- - 'spec/fontisan/type1/seac_expander_spec.rb'
394
-
395
285
  # Offense count: 25
396
286
  # Configuration parameters: EnforcedStyle.
397
287
  # SupportedStyles: have_received, receive
@@ -417,7 +307,7 @@ RSpec/MultipleDescribes:
417
307
  - 'spec/fontisan/utils/thread_pool_spec.rb'
418
308
  - 'spec/fontisan/variation/cache_spec.rb'
419
309
 
420
- # Offense count: 1852
310
+ # Offense count: 1855
421
311
  RSpec/MultipleExpectations:
422
312
  Max: 19
423
313
 
@@ -441,16 +331,6 @@ RSpec/NoExpectationExample:
441
331
  - 'spec/fontisan/validators/validator_spec.rb'
442
332
  - 'spec/fontisan/variation/variable_svg_generator_spec.rb'
443
333
 
444
- # Offense count: 415
445
- # This cop supports unsafe autocorrection (--autocorrect-all).
446
- RSpec/ReceiveMessages:
447
- Exclude:
448
- - 'spec/fontisan/converters/type1_converter_spec.rb'
449
- - 'spec/fontisan/converters/type1_property_spec.rb'
450
- - 'spec/integration/type1_conversion_spec.rb'
451
- - 'spec/performance/type1_performance_spec.rb'
452
- - 'spec/validation/type1_validation_spec.rb'
453
-
454
334
  # Offense count: 13
455
335
  RSpec/RepeatedExample:
456
336
  Exclude:
@@ -495,17 +375,6 @@ Security/Open:
495
375
  Exclude:
496
376
  - 'Rakefile'
497
377
 
498
- # Offense count: 2
499
- # This cop supports safe autocorrection (--autocorrect).
500
- # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
501
- # SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
502
- # ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
503
- # FunctionalMethods: let, let!, subject, watch
504
- # AllowedMethods: lambda, proc, it
505
- Style/BlockDelimiters:
506
- Exclude:
507
- - 'spec/fontisan/type1/seac_expander_spec.rb'
508
-
509
378
  # Offense count: 6
510
379
  # This cop supports safe autocorrection (--autocorrect).
511
380
  Style/ComparableClamp:
@@ -515,14 +384,6 @@ Style/ComparableClamp:
515
384
  - 'lib/fontisan/variable/axis_normalizer.rb'
516
385
  - 'lib/fontisan/variation/interpolator.rb'
517
386
 
518
- # Offense count: 4
519
- # This cop supports safe autocorrection (--autocorrect).
520
- # Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
521
- # SupportedStyles: assign_to_condition, assign_inside_condition
522
- Style/ConditionalAssignment:
523
- Exclude:
524
- - 'lib/fontisan/converters/type1_converter.rb'
525
-
526
387
  # Offense count: 2
527
388
  # This cop supports safe autocorrection (--autocorrect).
528
389
  # Configuration parameters: EnforcedStyle, AllowComments.
@@ -540,12 +401,6 @@ Style/FormatStringToken:
540
401
  - 'lib/fontisan/formatters/text_formatter.rb'
541
402
  - 'scripts/measure_optimization.rb'
542
403
 
543
- # Offense count: 1
544
- # This cop supports unsafe autocorrection (--autocorrect-all).
545
- Style/HashExcept:
546
- Exclude:
547
- - 'lib/fontisan/hints/hint_converter.rb'
548
-
549
404
  # Offense count: 3
550
405
  # Configuration parameters: MinBranchesCount.
551
406
  Style/HashLikeCase:
@@ -554,79 +409,9 @@ Style/HashLikeCase:
554
409
  - 'lib/fontisan/commands/unpack_command.rb'
555
410
  - 'lib/fontisan/models/validation_report.rb'
556
411
 
557
- # Offense count: 4
558
- # This cop supports unsafe autocorrection (--autocorrect-all).
559
- # Configuration parameters: EnforcedStyle, AllowedMethods, AllowedPatterns.
560
- # SupportedStyles: predicate, comparison
561
- Style/NumericPredicate:
562
- Exclude:
563
- - 'spec/**/*'
564
- - 'lib/fontisan/type1/cff_to_type1_converter.rb'
565
- - 'lib/fontisan/type1/seac_expander.rb'
566
-
567
412
  # Offense count: 1
568
413
  # Configuration parameters: AllowedMethods.
569
414
  # AllowedMethods: respond_to_missing?
570
415
  Style/OptionalBooleanParameter:
571
416
  Exclude:
572
417
  - 'lib/fontisan/conversion_options.rb'
573
-
574
- # Offense count: 1
575
- # This cop supports safe autocorrection (--autocorrect).
576
- Style/ParallelAssignment:
577
- Exclude:
578
- - 'lib/fontisan/type1/cff_to_type1_converter.rb'
579
-
580
- # Offense count: 2
581
- # This cop supports unsafe autocorrection (--autocorrect-all).
582
- # Configuration parameters: Methods.
583
- Style/RedundantArgument:
584
- Exclude:
585
- - 'lib/fontisan/type1/cff_to_type1_converter.rb'
586
-
587
- # Offense count: 1
588
- # This cop supports safe autocorrection (--autocorrect).
589
- Style/RedundantParentheses:
590
- Exclude:
591
- - 'lib/fontisan/converters/type1_converter.rb'
592
-
593
- # Offense count: 1
594
- # This cop supports safe autocorrection (--autocorrect).
595
- # Configuration parameters: AllowModifier.
596
- Style/SoleNestedConditional:
597
- Exclude:
598
- - 'lib/fontisan/converters/type1_converter.rb'
599
-
600
- # Offense count: 1
601
- # This cop supports safe autocorrection (--autocorrect).
602
- # Configuration parameters: EnforcedStyle, AllowSafeAssignment.
603
- # SupportedStyles: require_parentheses, require_no_parentheses, require_parentheses_when_complex
604
- Style/TernaryParentheses:
605
- Exclude:
606
- - 'lib/fontisan/converters/type1_converter.rb'
607
-
608
- # Offense count: 2
609
- # This cop supports safe autocorrection (--autocorrect).
610
- # Configuration parameters: EnforcedStyleForMultiline.
611
- # SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma
612
- Style/TrailingCommaInArguments:
613
- Exclude:
614
- - 'lib/fontisan/converters/type1_converter.rb'
615
-
616
- # Offense count: 4
617
- # This cop supports safe autocorrection (--autocorrect).
618
- # Configuration parameters: EnforcedStyleForMultiline.
619
- # SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma
620
- Style/TrailingCommaInArrayLiteral:
621
- Exclude:
622
- - 'spec/fontisan/converters/type1_property_spec.rb'
623
- - 'spec/fontisan/type1/seac_expander_spec.rb'
624
-
625
- # Offense count: 8
626
- # This cop supports safe autocorrection (--autocorrect).
627
- # Configuration parameters: EnforcedStyleForMultiline.
628
- # SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma
629
- Style/TrailingCommaInHashLiteral:
630
- Exclude:
631
- - 'lib/fontisan/type1/seac_expander.rb'
632
- - 'spec/fontisan/type1/seac_expander_spec.rb'
data/Gemfile CHANGED
@@ -11,7 +11,6 @@ gem "get_process_mem", "~> 0.2"
11
11
  gem "bigdecimal"
12
12
  gem "openssl", "~> 3.0"
13
13
  # sys-proctable is required by get_process_mem on Windows
14
- gem "sys-proctable", platforms: %i[mswin mingw mswin64]
15
14
  gem "rake"
16
15
  gem "rspec"
17
16
  gem "rubocop"
@@ -19,3 +18,4 @@ gem "rubocop-performance"
19
18
  gem "rubocop-rake"
20
19
  gem "rubocop-rspec"
21
20
  gem "rubyzip"
21
+ gem "sys-proctable", platforms: %i[mswin mingw mswin64]
@@ -161,10 +161,10 @@ module Fontisan
161
161
 
162
162
  # Check if variable font (Type1 fonts are never variable)
163
163
  info.is_variable = if font.is_a?(Type1Font)
164
- false
165
- else
166
- font.has_table?(Constants::FVAR_TAG)
167
- end
164
+ false
165
+ else
166
+ font.has_table?(Constants::FVAR_TAG)
167
+ end
168
168
  end
169
169
 
170
170
  # Populate essential fields for brief mode (metadata tables only).
@@ -273,7 +273,7 @@ module Fontisan
273
273
  info.version = font_info.version
274
274
  info.copyright = font_info.copyright
275
275
  info.description = font_info.notice
276
- info.designer = nil # Type 1 fonts may not have designer info
276
+ info.designer = nil # Type 1 fonts may not have designer info
277
277
 
278
278
  # Metrics
279
279
  if font_dict&.font_b_box
@@ -351,7 +351,8 @@ _options)
351
351
  is_type1 = font.is_a?(Type1Font)
352
352
 
353
353
  unless is_type1 || font.respond_to?(:table)
354
- raise ArgumentError, "Font must respond to :table method or be a Type1Font"
354
+ raise ArgumentError,
355
+ "Font must respond to :table method or be a Type1Font"
355
356
  end
356
357
 
357
358
  unless target_format.is_a?(Symbol)