fontisan 0.2.12 → 0.2.13
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 +4 -4
- data/.rubocop_todo.yml +185 -106
- data/Gemfile +5 -0
- data/README.adoc +3 -2
- data/docs/CONVERSION_GUIDE.adoc +633 -0
- data/docs/TYPE1_FONTS.adoc +445 -0
- data/lib/fontisan/commands/info_command.rb +83 -2
- data/lib/fontisan/converters/format_converter.rb +15 -5
- data/lib/fontisan/converters/type1_converter.rb +734 -59
- data/lib/fontisan/font_loader.rb +1 -1
- data/lib/fontisan/hints/hint_converter.rb +4 -1
- data/lib/fontisan/type1/cff_to_type1_converter.rb +302 -0
- data/lib/fontisan/type1/font_dictionary.rb +62 -0
- data/lib/fontisan/type1/pfa_generator.rb +31 -5
- data/lib/fontisan/type1/pfa_parser.rb +31 -30
- data/lib/fontisan/type1/pfb_generator.rb +28 -5
- data/lib/fontisan/type1/private_dict.rb +57 -0
- data/lib/fontisan/type1/seac_expander.rb +501 -0
- data/lib/fontisan/type1.rb +2 -0
- data/lib/fontisan/type1_font.rb +21 -34
- data/lib/fontisan/version.rb +1 -1
- metadata +6 -3
- data/docs/DOCUMENTATION_SUMMARY.md +0 -141
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 368b69c9050597188840f118f60dcb46247feae93ffe7e53c1954991d790ab95
|
|
4
|
+
data.tar.gz: 4c3e591c4a180734430a099a07036c2888ec7da62f5ccb39d33440b9a2b2346b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 73e614a107d14632d9fa25b1e0605503e3e5d7642230f9acc1a0ebe93a6262f7947b95e73a7c7aa5a5a0f0ec0b56fb34d8e148b7c59c57c30a4690795c280a22
|
|
7
|
+
data.tar.gz: 6b1144b3f402d2c374c5fc4b16918c66751a603a7a4af15a63b9df36c3f7a617a0ce7ca1e6774fb40c55174e52f7f588c23831655f31c0b722281f15f2ba6179
|
data/.rubocop_todo.yml
CHANGED
|
@@ -1,88 +1,87 @@
|
|
|
1
1
|
# This configuration was generated by
|
|
2
2
|
# `rubocop --auto-gen-config`
|
|
3
|
-
# on 2026-01-
|
|
3
|
+
# on 2026-01-21 09:04:34 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
|
+
|
|
9
16
|
# Offense count: 1
|
|
10
17
|
Gemspec/RequiredRubyVersion:
|
|
11
18
|
Exclude:
|
|
12
19
|
- 'fontisan.gemspec'
|
|
13
20
|
|
|
14
|
-
# Offense count:
|
|
21
|
+
# Offense count: 2
|
|
15
22
|
# This cop supports safe autocorrection (--autocorrect).
|
|
16
23
|
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
|
17
24
|
# SupportedStyles: with_first_argument, with_fixed_indentation
|
|
18
25
|
Layout/ArgumentAlignment:
|
|
19
26
|
Exclude:
|
|
20
|
-
- 'lib/fontisan/
|
|
21
|
-
- 'spec/
|
|
27
|
+
- 'lib/fontisan/type1/cff_to_type1_converter.rb'
|
|
28
|
+
- 'spec/performance/type1_performance_spec.rb'
|
|
22
29
|
|
|
23
|
-
# Offense count:
|
|
30
|
+
# Offense count: 2
|
|
24
31
|
# This cop supports safe autocorrection (--autocorrect).
|
|
25
|
-
|
|
26
|
-
# SupportedStylesAlignWith: either, start_of_block, start_of_line
|
|
27
|
-
Layout/BlockAlignment:
|
|
32
|
+
Layout/ElseAlignment:
|
|
28
33
|
Exclude:
|
|
29
|
-
- '
|
|
34
|
+
- 'lib/fontisan/commands/info_command.rb'
|
|
35
|
+
- 'lib/fontisan/converters/type1_converter.rb'
|
|
30
36
|
|
|
31
37
|
# Offense count: 1
|
|
32
38
|
# This cop supports safe autocorrection (--autocorrect).
|
|
33
|
-
Layout/
|
|
39
|
+
Layout/EmptyLineAfterGuardClause:
|
|
34
40
|
Exclude:
|
|
35
|
-
- 'spec/
|
|
41
|
+
- 'spec/validation/type1_validation_spec.rb'
|
|
36
42
|
|
|
37
43
|
# Offense count: 2
|
|
38
44
|
# This cop supports safe autocorrection (--autocorrect).
|
|
39
|
-
|
|
45
|
+
# Configuration parameters: EnforcedStyleAlignWith.
|
|
46
|
+
# SupportedStylesAlignWith: keyword, variable, start_of_line
|
|
47
|
+
Layout/EndAlignment:
|
|
40
48
|
Exclude:
|
|
41
|
-
- '
|
|
49
|
+
- 'lib/fontisan/commands/info_command.rb'
|
|
50
|
+
- 'lib/fontisan/converters/type1_converter.rb'
|
|
42
51
|
|
|
43
|
-
# Offense count:
|
|
52
|
+
# Offense count: 63
|
|
44
53
|
# This cop supports safe autocorrection (--autocorrect).
|
|
45
|
-
# Configuration parameters: AllowForAlignment.
|
|
46
|
-
Layout/
|
|
54
|
+
# Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
|
|
55
|
+
Layout/ExtraSpacing:
|
|
47
56
|
Exclude:
|
|
48
|
-
- '
|
|
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'
|
|
49
64
|
|
|
50
|
-
# Offense count:
|
|
65
|
+
# Offense count: 24
|
|
51
66
|
# This cop supports safe autocorrection (--autocorrect).
|
|
52
67
|
# Configuration parameters: EnforcedStyle, IndentationWidth.
|
|
53
|
-
# SupportedStyles:
|
|
54
|
-
Layout/
|
|
68
|
+
# SupportedStyles: special_inside_parentheses, consistent, align_braces
|
|
69
|
+
Layout/FirstHashElementIndentation:
|
|
55
70
|
Exclude:
|
|
56
|
-
- 'spec/fontisan/type1/pfm_parser_spec.rb'
|
|
57
|
-
|
|
58
|
-
# Offense count: 10
|
|
59
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
60
|
-
# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
|
|
61
|
-
# SupportedHashRocketStyles: key, separator, table
|
|
62
|
-
# SupportedColonStyles: key, separator, table
|
|
63
|
-
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
|
|
64
|
-
Layout/HashAlignment:
|
|
65
|
-
Exclude:
|
|
66
|
-
- 'lib/fontisan/cli.rb'
|
|
67
|
-
- 'spec/fontisan/commands/convert_command_spec.rb'
|
|
68
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'
|
|
69
75
|
|
|
70
76
|
# Offense count: 2
|
|
71
77
|
# This cop supports safe autocorrection (--autocorrect).
|
|
72
|
-
# Configuration parameters: EnforcedStyle.
|
|
73
|
-
# SupportedStyles: normal, indented_internal_methods
|
|
74
|
-
Layout/IndentationConsistency:
|
|
75
|
-
Exclude:
|
|
76
|
-
- 'spec/fontisan/converters/collection_converter_spec.rb'
|
|
77
|
-
|
|
78
|
-
# Offense count: 4
|
|
79
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
80
78
|
# Configuration parameters: Width, AllowedPatterns.
|
|
81
79
|
Layout/IndentationWidth:
|
|
82
80
|
Exclude:
|
|
83
|
-
- '
|
|
81
|
+
- 'lib/fontisan/commands/info_command.rb'
|
|
82
|
+
- 'lib/fontisan/converters/type1_converter.rb'
|
|
84
83
|
|
|
85
|
-
# Offense count:
|
|
84
|
+
# Offense count: 1596
|
|
86
85
|
# This cop supports safe autocorrection (--autocorrect).
|
|
87
86
|
# Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
|
|
88
87
|
# URISchemes: http, https
|
|
@@ -91,26 +90,13 @@ Layout/LineLength:
|
|
|
91
90
|
|
|
92
91
|
# Offense count: 2
|
|
93
92
|
# This cop supports safe autocorrection (--autocorrect).
|
|
94
|
-
# Configuration parameters:
|
|
95
|
-
#
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
- 'spec/fontisan/type1/pfm_parser_spec.rb'
|
|
99
|
-
|
|
100
|
-
# Offense count: 1
|
|
101
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
102
|
-
# Configuration parameters: EnforcedStyle.
|
|
103
|
-
# SupportedStyles: final_newline, final_blank_line
|
|
104
|
-
Layout/TrailingEmptyLines:
|
|
93
|
+
# Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator, EnforcedStyleForRationalLiterals.
|
|
94
|
+
# SupportedStylesForExponentOperator: space, no_space
|
|
95
|
+
# SupportedStylesForRationalLiterals: space, no_space
|
|
96
|
+
Layout/SpaceAroundOperators:
|
|
105
97
|
Exclude:
|
|
106
|
-
- '
|
|
107
|
-
|
|
108
|
-
# Offense count: 4
|
|
109
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
110
|
-
# Configuration parameters: AllowInHeredoc.
|
|
111
|
-
Layout/TrailingWhitespace:
|
|
112
|
-
Exclude:
|
|
113
|
-
- 'spec/fontisan/converters/type1_converter_spec.rb'
|
|
98
|
+
- 'lib/fontisan/converters/type1_converter.rb'
|
|
99
|
+
- 'spec/validation/type1_validation_spec.rb'
|
|
114
100
|
|
|
115
101
|
# Offense count: 3
|
|
116
102
|
Lint/CopDirectiveSyntax:
|
|
@@ -119,16 +105,15 @@ Lint/CopDirectiveSyntax:
|
|
|
119
105
|
- 'lib/fontisan/woff2_font.rb'
|
|
120
106
|
- 'spec/fontisan/variation/cache_spec.rb'
|
|
121
107
|
|
|
122
|
-
# Offense count:
|
|
108
|
+
# Offense count: 49
|
|
123
109
|
# Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches, IgnoreDuplicateElseBranch.
|
|
124
110
|
Lint/DuplicateBranch:
|
|
125
111
|
Enabled: false
|
|
126
112
|
|
|
127
|
-
# Offense count:
|
|
113
|
+
# Offense count: 2
|
|
128
114
|
Lint/DuplicateMethods:
|
|
129
115
|
Exclude:
|
|
130
116
|
- 'lib/fontisan/tables/glyf.rb'
|
|
131
|
-
- 'lib/fontisan/type1_font.rb'
|
|
132
117
|
- 'lib/fontisan/woff2_font.rb'
|
|
133
118
|
|
|
134
119
|
# Offense count: 1
|
|
@@ -168,18 +153,22 @@ Lint/MissingSuper:
|
|
|
168
153
|
- 'lib/fontisan/commands/validate_command.rb'
|
|
169
154
|
- 'lib/fontisan/tables/cff2/table_builder.rb'
|
|
170
155
|
|
|
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
|
+
|
|
171
167
|
# Offense count: 1
|
|
172
168
|
Lint/StructNewOverride:
|
|
173
169
|
Exclude:
|
|
174
170
|
- 'lib/fontisan/optimizers/pattern_analyzer.rb'
|
|
175
171
|
|
|
176
|
-
# Offense count: 2
|
|
177
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
178
|
-
# Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments.
|
|
179
|
-
Lint/UnusedBlockArgument:
|
|
180
|
-
Exclude:
|
|
181
|
-
- 'spec/fontisan/converters/type1_converter_spec.rb'
|
|
182
|
-
|
|
183
172
|
# Offense count: 8
|
|
184
173
|
# This cop supports safe autocorrection (--autocorrect).
|
|
185
174
|
# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods, NotImplementedExceptions.
|
|
@@ -194,22 +183,29 @@ Lint/UnusedMethodArgument:
|
|
|
194
183
|
- 'lib/fontisan/woff2/glyf_transformer.rb'
|
|
195
184
|
- 'lib/fontisan/woff_font.rb'
|
|
196
185
|
|
|
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
|
+
|
|
197
193
|
# Offense count: 5
|
|
198
194
|
Lint/UselessConstantScoping:
|
|
199
195
|
Exclude:
|
|
200
196
|
- 'lib/fontisan/conversion_options.rb'
|
|
201
197
|
- 'lib/fontisan/type1/charstrings.rb'
|
|
202
198
|
|
|
203
|
-
# Offense count:
|
|
199
|
+
# Offense count: 552
|
|
204
200
|
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
|
|
205
201
|
Metrics/AbcSize:
|
|
206
202
|
Enabled: false
|
|
207
203
|
|
|
208
|
-
# Offense count:
|
|
204
|
+
# Offense count: 33
|
|
209
205
|
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
|
|
210
206
|
# AllowedMethods: refine
|
|
211
207
|
Metrics/BlockLength:
|
|
212
|
-
Max:
|
|
208
|
+
Max: 101
|
|
213
209
|
|
|
214
210
|
# Offense count: 8
|
|
215
211
|
# Configuration parameters: CountBlocks, CountModifierForms.
|
|
@@ -223,12 +219,12 @@ Metrics/CollectionLiteralLength:
|
|
|
223
219
|
- 'lib/fontisan/type1/agl.rb'
|
|
224
220
|
- 'lib/fontisan/type1/encodings.rb'
|
|
225
221
|
|
|
226
|
-
# Offense count:
|
|
222
|
+
# Offense count: 301
|
|
227
223
|
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
|
|
228
224
|
Metrics/CyclomaticComplexity:
|
|
229
225
|
Enabled: false
|
|
230
226
|
|
|
231
|
-
# Offense count:
|
|
227
|
+
# Offense count: 905
|
|
232
228
|
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
|
233
229
|
Metrics/MethodLength:
|
|
234
230
|
Max: 135
|
|
@@ -239,12 +235,12 @@ Metrics/ParameterLists:
|
|
|
239
235
|
Max: 39
|
|
240
236
|
MaxOptionalParameters: 4
|
|
241
237
|
|
|
242
|
-
# Offense count:
|
|
238
|
+
# Offense count: 229
|
|
243
239
|
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
|
|
244
240
|
Metrics/PerceivedComplexity:
|
|
245
241
|
Enabled: false
|
|
246
242
|
|
|
247
|
-
# Offense count:
|
|
243
|
+
# Offense count: 24
|
|
248
244
|
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
|
|
249
245
|
# AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to
|
|
250
246
|
Naming/MethodParameterName:
|
|
@@ -252,6 +248,7 @@ Naming/MethodParameterName:
|
|
|
252
248
|
- 'lib/fontisan/optimizers/subroutine_optimizer.rb'
|
|
253
249
|
- 'lib/fontisan/tables/cff2/blend_operator.rb'
|
|
254
250
|
- 'lib/fontisan/tables/glyf/curve_converter.rb'
|
|
251
|
+
- 'lib/fontisan/type1/seac_expander.rb'
|
|
255
252
|
- 'lib/fontisan/type1/ttf_to_type1_converter.rb'
|
|
256
253
|
- 'lib/fontisan/variation/optimizer.rb'
|
|
257
254
|
|
|
@@ -292,7 +289,7 @@ Naming/VariableName:
|
|
|
292
289
|
- 'lib/fontisan/type1/pfm_generator.rb'
|
|
293
290
|
- 'lib/fontisan/type1/pfm_parser.rb'
|
|
294
291
|
|
|
295
|
-
# Offense count:
|
|
292
|
+
# Offense count: 113
|
|
296
293
|
# Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns.
|
|
297
294
|
# SupportedStyles: snake_case, normalcase, non_integer
|
|
298
295
|
# AllowedIdentifiers: TLS1_1, TLS1_2, capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339, x86_64
|
|
@@ -309,27 +306,35 @@ RSpec/AnyInstance:
|
|
|
309
306
|
- 'spec/fontisan/variation/parallel_generator_spec.rb'
|
|
310
307
|
- 'spec/integration/format_conversion_spec.rb'
|
|
311
308
|
|
|
312
|
-
# Offense count:
|
|
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
|
|
313
316
|
# Configuration parameters: Prefixes, AllowedPatterns.
|
|
314
317
|
# Prefixes: when, with, without
|
|
315
318
|
RSpec/ContextWording:
|
|
316
319
|
Enabled: false
|
|
317
320
|
|
|
318
|
-
# Offense count:
|
|
321
|
+
# Offense count: 27
|
|
319
322
|
# Configuration parameters: IgnoredMetadata.
|
|
320
323
|
RSpec/DescribeClass:
|
|
321
324
|
Enabled: false
|
|
322
325
|
|
|
323
|
-
# Offense count:
|
|
326
|
+
# Offense count: 7
|
|
324
327
|
RSpec/DescribeMethod:
|
|
325
328
|
Exclude:
|
|
326
329
|
- 'spec/fontisan/collection/variable_font_builder_spec.rb'
|
|
327
330
|
- 'spec/fontisan/converters/woff2_encoder_integration_spec.rb'
|
|
328
331
|
- 'spec/fontisan/type1/afm_parser_spec.rb'
|
|
332
|
+
- 'spec/fontisan/type1/cff_to_type1_converter_spec.rb'
|
|
329
333
|
- 'spec/fontisan/type1/pfm_parser_spec.rb'
|
|
334
|
+
- 'spec/fontisan/type1/seac_expander_spec.rb'
|
|
330
335
|
- 'spec/fontisan/type1_real_fonts_spec.rb'
|
|
331
336
|
|
|
332
|
-
# Offense count:
|
|
337
|
+
# Offense count: 1426
|
|
333
338
|
# Configuration parameters: CountAsOne.
|
|
334
339
|
RSpec/ExampleLength:
|
|
335
340
|
Max: 66
|
|
@@ -381,6 +386,12 @@ RSpec/IteratedExpectation:
|
|
|
381
386
|
Exclude:
|
|
382
387
|
- 'spec/fontisan/tables/glyf_spec.rb'
|
|
383
388
|
|
|
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
|
+
|
|
384
395
|
# Offense count: 25
|
|
385
396
|
# Configuration parameters: EnforcedStyle.
|
|
386
397
|
# SupportedStyles: have_received, receive
|
|
@@ -406,11 +417,11 @@ RSpec/MultipleDescribes:
|
|
|
406
417
|
- 'spec/fontisan/utils/thread_pool_spec.rb'
|
|
407
418
|
- 'spec/fontisan/variation/cache_spec.rb'
|
|
408
419
|
|
|
409
|
-
# Offense count:
|
|
420
|
+
# Offense count: 1852
|
|
410
421
|
RSpec/MultipleExpectations:
|
|
411
422
|
Max: 19
|
|
412
423
|
|
|
413
|
-
# Offense count:
|
|
424
|
+
# Offense count: 152
|
|
414
425
|
# Configuration parameters: AllowSubject.
|
|
415
426
|
RSpec/MultipleMemoizedHelpers:
|
|
416
427
|
Max: 13
|
|
@@ -430,11 +441,15 @@ RSpec/NoExpectationExample:
|
|
|
430
441
|
- 'spec/fontisan/validators/validator_spec.rb'
|
|
431
442
|
- 'spec/fontisan/variation/variable_svg_generator_spec.rb'
|
|
432
443
|
|
|
433
|
-
# Offense count:
|
|
444
|
+
# Offense count: 415
|
|
434
445
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
435
446
|
RSpec/ReceiveMessages:
|
|
436
447
|
Exclude:
|
|
437
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'
|
|
438
453
|
|
|
439
454
|
# Offense count: 13
|
|
440
455
|
RSpec/RepeatedExample:
|
|
@@ -444,15 +459,7 @@ RSpec/RepeatedExample:
|
|
|
444
459
|
- 'spec/fontisan/metrics_calculator_spec.rb'
|
|
445
460
|
- 'spec/fontisan/tables/os2_spec.rb'
|
|
446
461
|
|
|
447
|
-
# Offense count:
|
|
448
|
-
# This cop supports safe autocorrection (--autocorrect).
|
|
449
|
-
# Configuration parameters: EnforcedStyle.
|
|
450
|
-
# SupportedStyles: and_return, block
|
|
451
|
-
RSpec/ReturnFromStub:
|
|
452
|
-
Exclude:
|
|
453
|
-
- 'spec/fontisan/converters/type1_converter_spec.rb'
|
|
454
|
-
|
|
455
|
-
# Offense count: 20
|
|
462
|
+
# Offense count: 22
|
|
456
463
|
# Configuration parameters: CustomTransform, IgnoreMethods, IgnoreMetadata, InflectorPath, EnforcedInflector.
|
|
457
464
|
# SupportedInflectors: default, active_support
|
|
458
465
|
RSpec/SpecFilePathFormat:
|
|
@@ -473,7 +480,7 @@ RSpec/SubjectStub:
|
|
|
473
480
|
Exclude:
|
|
474
481
|
- 'spec/fontisan/variation/delta_applier_spec.rb'
|
|
475
482
|
|
|
476
|
-
# Offense count:
|
|
483
|
+
# Offense count: 427
|
|
477
484
|
# Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
|
|
478
485
|
RSpec/VerifiedDoubles:
|
|
479
486
|
Enabled: false
|
|
@@ -488,7 +495,7 @@ Security/Open:
|
|
|
488
495
|
Exclude:
|
|
489
496
|
- 'Rakefile'
|
|
490
497
|
|
|
491
|
-
# Offense count:
|
|
498
|
+
# Offense count: 2
|
|
492
499
|
# This cop supports safe autocorrection (--autocorrect).
|
|
493
500
|
# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
|
|
494
501
|
# SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
|
|
@@ -497,9 +504,7 @@ Security/Open:
|
|
|
497
504
|
# AllowedMethods: lambda, proc, it
|
|
498
505
|
Style/BlockDelimiters:
|
|
499
506
|
Exclude:
|
|
500
|
-
- 'spec/fontisan/
|
|
501
|
-
- 'spec/fontisan/converters/outline_converter_spec.rb'
|
|
502
|
-
- 'spec/fontisan/converters/type1_converter_spec.rb'
|
|
507
|
+
- 'spec/fontisan/type1/seac_expander_spec.rb'
|
|
503
508
|
|
|
504
509
|
# Offense count: 6
|
|
505
510
|
# This cop supports safe autocorrection (--autocorrect).
|
|
@@ -510,6 +515,22 @@ Style/ComparableClamp:
|
|
|
510
515
|
- 'lib/fontisan/variable/axis_normalizer.rb'
|
|
511
516
|
- 'lib/fontisan/variation/interpolator.rb'
|
|
512
517
|
|
|
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
|
+
# Offense count: 2
|
|
527
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
528
|
+
# Configuration parameters: EnforcedStyle, AllowComments.
|
|
529
|
+
# SupportedStyles: empty, nil, both
|
|
530
|
+
Style/EmptyElse:
|
|
531
|
+
Exclude:
|
|
532
|
+
- 'lib/fontisan/type1/seac_expander.rb'
|
|
533
|
+
|
|
513
534
|
# Offense count: 11
|
|
514
535
|
# This cop supports safe autocorrection (--autocorrect).
|
|
515
536
|
# Configuration parameters: EnforcedStyle, MaxUnannotatedPlaceholdersAllowed, Mode, AllowedMethods, AllowedPatterns.
|
|
@@ -519,6 +540,12 @@ Style/FormatStringToken:
|
|
|
519
540
|
- 'lib/fontisan/formatters/text_formatter.rb'
|
|
520
541
|
- 'scripts/measure_optimization.rb'
|
|
521
542
|
|
|
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
|
+
|
|
522
549
|
# Offense count: 3
|
|
523
550
|
# Configuration parameters: MinBranchesCount.
|
|
524
551
|
Style/HashLikeCase:
|
|
@@ -527,6 +554,16 @@ Style/HashLikeCase:
|
|
|
527
554
|
- 'lib/fontisan/commands/unpack_command.rb'
|
|
528
555
|
- 'lib/fontisan/models/validation_report.rb'
|
|
529
556
|
|
|
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
|
+
|
|
530
567
|
# Offense count: 1
|
|
531
568
|
# Configuration parameters: AllowedMethods.
|
|
532
569
|
# AllowedMethods: respond_to_missing?
|
|
@@ -534,20 +571,62 @@ Style/OptionalBooleanParameter:
|
|
|
534
571
|
Exclude:
|
|
535
572
|
- 'lib/fontisan/conversion_options.rb'
|
|
536
573
|
|
|
537
|
-
# Offense count:
|
|
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
|
|
538
609
|
# This cop supports safe autocorrection (--autocorrect).
|
|
539
610
|
# Configuration parameters: EnforcedStyleForMultiline.
|
|
540
611
|
# SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma
|
|
541
612
|
Style/TrailingCommaInArguments:
|
|
542
613
|
Exclude:
|
|
543
|
-
- '
|
|
544
|
-
- 'spec/fontisan/converters/outline_converter_spec.rb'
|
|
545
|
-
- 'spec/fontisan/converters/type1_converter_spec.rb'
|
|
614
|
+
- 'lib/fontisan/converters/type1_converter.rb'
|
|
546
615
|
|
|
547
|
-
# Offense count:
|
|
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
|
|
548
626
|
# This cop supports safe autocorrection (--autocorrect).
|
|
549
627
|
# Configuration parameters: EnforcedStyleForMultiline.
|
|
550
628
|
# SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma
|
|
551
629
|
Style/TrailingCommaInHashLiteral:
|
|
552
630
|
Exclude:
|
|
553
|
-
- '
|
|
631
|
+
- 'lib/fontisan/type1/seac_expander.rb'
|
|
632
|
+
- 'spec/fontisan/type1/seac_expander_spec.rb'
|
data/Gemfile
CHANGED
|
@@ -6,7 +6,12 @@ source "https://rubygems.org"
|
|
|
6
6
|
gemspec
|
|
7
7
|
|
|
8
8
|
gem "canon", "~> 0.1.3"
|
|
9
|
+
gem "get_process_mem", "~> 0.2"
|
|
10
|
+
# bigdecimal is required by get_process_mem for Ruby 3.4+ compatibility
|
|
11
|
+
gem "bigdecimal"
|
|
9
12
|
gem "openssl", "~> 3.0"
|
|
13
|
+
# sys-proctable is required by get_process_mem on Windows
|
|
14
|
+
gem "sys-proctable", platforms: %i[mswin mingw mswin64]
|
|
10
15
|
gem "rake"
|
|
11
16
|
gem "rspec"
|
|
12
17
|
gem "rubocop"
|
data/README.adoc
CHANGED
|
@@ -9,8 +9,8 @@ image:https://github.com/fontist/fontisan/actions/workflows/test.yml/badge.svg[B
|
|
|
9
9
|
Fontisan is a Ruby gem providing font analysis tools and utilities.
|
|
10
10
|
|
|
11
11
|
It is designed as a pure Ruby implementation with full object-oriented
|
|
12
|
-
architecture, supporting extraction of information from OpenType
|
|
13
|
-
fonts (OTF, TTF, OTC, TTC, dfont).
|
|
12
|
+
architecture, supporting extraction of information from OpenType, TrueType,
|
|
13
|
+
and Adobe Type 1 fonts (OTF, TTF, OTC, TTC, dfont, PFB, PFA).
|
|
14
14
|
|
|
15
15
|
The gem provides both a Ruby library API and a command-line interface, with
|
|
16
16
|
structured output formats (YAML, JSON, text) via lutaml-model.
|
|
@@ -81,6 +81,7 @@ Font operations::
|
|
|
81
81
|
|
|
82
82
|
Font format support::
|
|
83
83
|
* TTF, OTF, TTC, OTC font formats (production ready)
|
|
84
|
+
* Adobe Type 1 fonts (PFB/PFA) with bidirectional conversion (see link:docs/TYPE1_FONTS.adoc[Type 1 Fonts Guide])
|
|
84
85
|
* WOFF/WOFF2 format support with reading, writing, and conversion (see link:docs/WOFF_WOFF2_FORMATS.adoc[WOFF/WOFF2 Guide])
|
|
85
86
|
* Apple legacy font support: 'true' signature TrueType fonts and dfont format (see link:docs/APPLE_LEGACY_FONTS.adoc[Apple Legacy Fonts Guide])
|
|
86
87
|
* SVG font generation (complete)
|