ea 0.6.17 → 0.6.19
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/lib/ea/fonts/carlito_metrics.json +1 -1
- data/lib/ea/fonts/metrics.rb +74 -34
- data/lib/ea/model/diagram_connector.rb +7 -0
- data/lib/ea/sources/qea/diagram_builder.rb +4 -0
- data/lib/ea/svg/ea_emitter/bounds_calculator.rb +11 -71
- data/lib/ea/svg/ea_emitter/compartment/note_body.rb +28 -2
- data/lib/ea/svg/ea_emitter/element/attribute_renderer.rb +5 -1
- data/lib/ea/svg/ea_emitter/element/enumeration_literal_renderer.rb +6 -2
- data/lib/ea/svg/ea_emitter/element/header_line_pipeline.rb +4 -3
- data/lib/ea/svg/ea_emitter/element/header_line_provider/name.rb +21 -15
- data/lib/ea/svg/ea_emitter/element/header_line_provider/stereotype_label.rb +5 -13
- data/lib/ea/svg/ea_emitter/elements.rb +23 -1
- data/lib/ea/svg/ea_emitter/label/end_label.rb +13 -22
- data/lib/ea/svg/ea_emitter/labels.rb +4 -0
- data/lib/ea/theme/definition.rb +1 -1
- data/lib/ea/version.rb +1 -1
- data/lib/tasks/fonts.rake +20 -15
- metadata +2 -2
data/lib/tasks/fonts.rake
CHANGED
|
@@ -3,30 +3,35 @@
|
|
|
3
3
|
require "ea/fonts/metrics"
|
|
4
4
|
|
|
5
5
|
namespace :fonts do
|
|
6
|
-
desc "Validate the shipped
|
|
6
|
+
desc "Validate the shipped font metrics against Fontist-resolved TTFs"
|
|
7
7
|
task :validate do
|
|
8
|
-
files = Ea::Fonts::Metrics.carlito_font_files
|
|
9
|
-
abort "Carlito not resolvable via Fontist — install it first" if files.empty?
|
|
10
|
-
|
|
11
8
|
shipped = JSON.parse(File.read(Ea::Fonts::Metrics::DATA_PATH))["advance"]
|
|
12
9
|
style_key = { "regular" => "regular", "bold" => "bold",
|
|
13
10
|
"italic" => "italic", "bold_italic" => "bold_italic",
|
|
14
11
|
"bolditalic" => "bold_italic" }
|
|
15
12
|
drift = []
|
|
16
13
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
14
|
+
shipped.keys.each do |family|
|
|
15
|
+
files = Ea::Fonts::Metrics.font_files_for(family)
|
|
16
|
+
if files.empty?
|
|
17
|
+
puts "#{family}: NOT RESOLVABLE VIA FONTIST — skipped"
|
|
18
|
+
next
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
files.each do |style, path|
|
|
22
|
+
table = shipped[family][style_key[style.downcase]] || {}
|
|
23
|
+
actual = Ea::Fonts::Metrics.advances_from_font(path)
|
|
24
|
+
missing = actual.keys.count { |cp| table[format("U+%04X", cp)].nil? }
|
|
25
|
+
puts " (shipped #{family}/#{style} table lacks #{missing} of #{actual.size} codepoints — skipped)"
|
|
26
|
+
actual.each do |cp, adv|
|
|
27
|
+
key = format("U+%04X", cp)
|
|
28
|
+
ours = table[key]
|
|
29
|
+
next if ours.nil? || (ours - adv).abs <= 0.0005
|
|
26
30
|
|
|
27
|
-
|
|
31
|
+
drift << format("%s/%s %s: json=%s font=%s", family, style, key, ours, adv)
|
|
32
|
+
end
|
|
33
|
+
puts "#{family}/#{style}: #{path} — #{actual.size} codepoints checked"
|
|
28
34
|
end
|
|
29
|
-
puts "#{style}: #{path} — #{actual.size} codepoints checked"
|
|
30
35
|
end
|
|
31
36
|
|
|
32
37
|
if drift.empty?
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ea
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.6.
|
|
4
|
+
version: 0.6.19
|
|
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-10-
|
|
11
|
+
date: 2026-10-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: lutaml-model
|