fontisan 0.4.44 → 0.4.45
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/TODO.bug-fixes/30-eliminate-send-in-specs.md +36 -0
- data/TODO.bug-fixes/README.md +5 -2
- data/lib/fontisan/commands/base_command.rb +1 -1
- data/lib/fontisan/commands/info_command.rb +1 -1
- data/lib/fontisan/conversion_options.rb +1 -1
- data/lib/fontisan/converters/format_converter.rb +1 -1
- data/lib/fontisan/converters/type1_converter.rb +1 -1
- data/lib/fontisan/hints/hint_converter.rb +1 -1
- data/lib/fontisan/optimizers/pattern_analyzer.rb +1 -1
- data/lib/fontisan/parsers/dfont_parser.rb +2 -2
- data/lib/fontisan/pipeline/transformation_pipeline.rb +1 -1
- data/lib/fontisan/tables/cff2/table_builder.rb +1 -1
- data/lib/fontisan/type1/charstring_converter.rb +1 -1
- data/lib/fontisan/variation/converter.rb +1 -1
- data/lib/fontisan/variation/metrics_adjuster.rb +1 -3
- data/lib/fontisan/version.rb +1 -1
- data/lib/fontisan/woff2_font.rb +2 -2
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5809fbd27b8c1e2d11d559e90e45201748c35aee50106d6eda8e34f363c4ead7
|
|
4
|
+
data.tar.gz: 897ed09e0131fc562d21b5796d1c4e263967277bbbbc038b1eac3ea4f10ffc9e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 31e50b7dc96edb8ad675f5ad4843264708890a40b77586496a75ca61335dc46a5ab1e96b587d66e03512b5cca8b38a7d6d78804ea3d3520797b5b9cd740571c4
|
|
7
|
+
data.tar.gz: 19d29274a8fd77b7fe5dc39dec2f2435f38ecfc16df1a00c560051afd5b42f14add68cf92f0873b3cb59c1d35647904917a99826ca5b10c1c4710871cacdae7f
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# 30 — Eliminate .send(:private_method) calls in specs
|
|
2
|
+
|
|
3
|
+
## Priority
|
|
4
|
+
P1
|
|
5
|
+
|
|
6
|
+
## Problem
|
|
7
|
+
288 `.send(:method_name, ...)` calls in spec files bypass
|
|
8
|
+
encapsulation to test private methods directly. This violates the
|
|
9
|
+
"never use private send methods" rule.
|
|
10
|
+
|
|
11
|
+
## Approach
|
|
12
|
+
For each method tested via `.send()`:
|
|
13
|
+
1. Make it public (move above `private` keyword)
|
|
14
|
+
2. Replace `.send(:method, args)` with `.method(args)` in specs
|
|
15
|
+
|
|
16
|
+
Rationale: if a method is important enough to test directly,
|
|
17
|
+
it should be part of the public API.
|
|
18
|
+
|
|
19
|
+
## Top files by send count
|
|
20
|
+
- type1_converter_spec.rb (66)
|
|
21
|
+
- cff2/table_builder_spec.rb (34)
|
|
22
|
+
- format_converter_spec.rb (17)
|
|
23
|
+
- type1_property_spec.rb (13)
|
|
24
|
+
- outline_converter_spec.rb (11)
|
|
25
|
+
- conversion_options_spec.rb (10)
|
|
26
|
+
- info_command_spec.rb (10)
|
|
27
|
+
- base_command_spec.rb (10)
|
|
28
|
+
- pattern_analyzer_spec.rb (10)
|
|
29
|
+
- variation/converter_spec.rb (10)
|
|
30
|
+
- woff2_font_spec.rb (10)
|
|
31
|
+
- Plus ~15 more files
|
|
32
|
+
|
|
33
|
+
## Acceptance criteria
|
|
34
|
+
- 0 `.send(:` calls in spec/
|
|
35
|
+
- All tested methods are public
|
|
36
|
+
- All specs pass
|
data/TODO.bug-fixes/README.md
CHANGED
|
@@ -45,5 +45,8 @@ Each file is `NN-short-name.md` where `NN` is the priority order.
|
|
|
45
45
|
|
|
46
46
|
### P3 — Architecture polish (post-#137 audit)
|
|
47
47
|
- [x] ~~[27 — Table class registry (OCP: eliminate case/when tag dispatch)](27-table-class-registry.md)~~ ✓ Done (#138)
|
|
48
|
-
- [
|
|
49
|
-
- [x] ~~[29 — Strategy registries for per-tag dispatch](29-strategy-registries.md)~~ ✓ Done
|
|
48
|
+
- [x] ~~[28 — Spec doubles cleanup](28-spec-doubles-cleanup.md)~~ ✓ Done (#140-#145)
|
|
49
|
+
- [x] ~~[29 — Strategy registries for per-tag dispatch](29-strategy-registries.md)~~ ✓ Done (#139)
|
|
50
|
+
|
|
51
|
+
### P3 — Encapsulation completion (post-#146 audit)
|
|
52
|
+
- [ ] [30 — Eliminate .send(:private_method) calls in specs](30-eliminate-send-in-specs.md)
|
|
@@ -83,7 +83,7 @@ module Fontisan
|
|
|
83
83
|
@patterns.values.sort_by { |p| -p.savings }
|
|
84
84
|
end
|
|
85
85
|
|
|
86
|
-
private
|
|
86
|
+
# Methods below were private; made public for testability (TODO 30)
|
|
87
87
|
|
|
88
88
|
# Find operator boundaries in CharString
|
|
89
89
|
# Returns positions where operators end, which are valid pattern boundaries
|
|
@@ -184,8 +184,8 @@ module Fontisan
|
|
|
184
184
|
io.read(data_length)
|
|
185
185
|
end
|
|
186
186
|
|
|
187
|
-
|
|
188
|
-
|
|
187
|
+
# parse_header, find_sfnt_resources, extract_resource_data
|
|
188
|
+
# were private_class_method; made public for testability (TODO 30)
|
|
189
189
|
end
|
|
190
190
|
end
|
|
191
191
|
end
|
|
@@ -118,7 +118,7 @@ module Fontisan
|
|
|
118
118
|
true
|
|
119
119
|
end
|
|
120
120
|
|
|
121
|
-
private
|
|
121
|
+
# Methods below were private; made public for testability (TODO 30)
|
|
122
122
|
|
|
123
123
|
# Extract regions from ItemVariationStore
|
|
124
124
|
#
|
|
@@ -213,8 +213,6 @@ module Fontisan
|
|
|
213
213
|
end
|
|
214
214
|
end
|
|
215
215
|
|
|
216
|
-
public
|
|
217
|
-
|
|
218
216
|
# Maps MVAR metric tags to [table_tag, method] for base value lookup.
|
|
219
217
|
METRIC_SOURCES = {
|
|
220
218
|
"hasc" => ["hhea", :ascender],
|
data/lib/fontisan/version.rb
CHANGED
data/lib/fontisan/woff2_font.rb
CHANGED
|
@@ -55,7 +55,7 @@ module Fontisan
|
|
|
55
55
|
TRANSFORM_VERSIONS.fetch(tag, TRANSFORM_NONE)
|
|
56
56
|
end
|
|
57
57
|
|
|
58
|
-
private
|
|
58
|
+
# Methods below were private; made public for testability (TODO 30)
|
|
59
59
|
|
|
60
60
|
def tag_index
|
|
61
61
|
@flags & 0x3F
|
|
@@ -726,7 +726,7 @@ module Fontisan
|
|
|
726
726
|
sfnt_data[head_offset + 8, 4] = [adjustment].pack("N")
|
|
727
727
|
end
|
|
728
728
|
|
|
729
|
-
private
|
|
729
|
+
# Methods below were private; made public for testability (TODO 30)
|
|
730
730
|
|
|
731
731
|
# Read variable-length UIntBase128 integer from IO
|
|
732
732
|
def read_uint_base128(io)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fontisan
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.45
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-07-
|
|
11
|
+
date: 2026-07-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: base64
|
|
@@ -162,6 +162,7 @@ files:
|
|
|
162
162
|
- TODO.bug-fixes/27-table-class-registry.md
|
|
163
163
|
- TODO.bug-fixes/28-spec-doubles-cleanup.md
|
|
164
164
|
- TODO.bug-fixes/29-strategy-registries.md
|
|
165
|
+
- TODO.bug-fixes/30-eliminate-send-in-specs.md
|
|
165
166
|
- TODO.bug-fixes/README.md
|
|
166
167
|
- TODO.improvements/01-cbdt-cblc-gid-stable-propagation.md
|
|
167
168
|
- TODO.improvements/02-collection-outline-priority.md
|