Skip to content

Commit 2887a0d

Browse files
authored
Merge pull request #5227 from Sukhpreet-s/5198-font-issue-missing-gs
Fix missing 'g's from PDFs
2 parents fa48014 + 3703471 commit 2887a0d

File tree

8 files changed

+16
-9
lines changed

8 files changed

+16
-9
lines changed

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ gem 'bootsnap', require: false
107107
# specific versions for compatibility reasons.
108108
gem "nokogiri", ">= 1.10.4"
109109
gem "sprockets", "~> 4.2.2"
110+
gem "prawn", "~> 2.4.0"
111+
gem "ttfunk", "~>1.7.0"
110112

111113
group :production, :staging do
112114
# Reduce the noise of logs and include custom fields to it for easier access

Gemfile.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ GEM
463463
parser (3.3.8.0)
464464
ast (~> 2.4.1)
465465
racc
466-
pdf-core (0.10.0)
466+
pdf-core (0.9.0)
467467
pdf-reader (2.14.1)
468468
Ascii85 (>= 1.0, < 3.0, != 2.0.0)
469469
afm (~> 0.2.1)
@@ -474,10 +474,9 @@ GEM
474474
popper_js (2.11.8)
475475
pp (0.6.2)
476476
prettyprint
477-
prawn (2.5.0)
478-
matrix (~> 0.4)
479-
pdf-core (~> 0.10.0)
480-
ttfunk (~> 1.8)
477+
prawn (2.4.0)
478+
pdf-core (~> 0.9.0)
479+
ttfunk (~> 1.7)
481480
prawn-rails (1.6.0)
482481
actionview (>= 3.1.0)
483482
activesupport (>= 3.1.0)
@@ -707,8 +706,7 @@ GEM
707706
thor (1.3.2)
708707
tilt (2.2.0)
709708
timeout (0.4.3)
710-
ttfunk (1.8.0)
711-
bigdecimal (~> 3.1)
709+
ttfunk (1.7.0)
712710
turbo-rails (2.0.13)
713711
actionpack (>= 7.1.0)
714712
railties (>= 7.1.0)
@@ -805,6 +803,7 @@ DEPENDENCIES
805803
paper_trail
806804
pdf-reader
807805
pg (~> 1.5.9)
806+
prawn (~> 2.4.0)
808807
prawn-rails
809808
pry-doc
810809
pry-nav
@@ -834,9 +833,10 @@ DEPENDENCIES
834833
stimulus-rails
835834
strong_migrations
836835
terser
836+
ttfunk (~> 1.7.0)
837837
turbo-rails
838838
web-console
839839
webmock (~> 3.25)
840840

841841
BUNDLED WITH
842-
2.6.7
842+
2.6.9
-3.75 KB
Binary file not shown.
-3.67 KB
Binary file not shown.
-3.75 KB
Binary file not shown.
-3.76 KB
Binary file not shown.
-3.76 KB
Binary file not shown.

spec/pdfs/distribution_pdf_spec.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def compare_pdf(distribution, expected_file_path)
137137
begin
138138
# Run the following from Rails sandbox console (bin/rails/console --sandbox) to regenerate these comparison PDFs:
139139
# => load "lib/test_helpers/pdf_comparison_test_factory.rb"
140-
# => Rails::ConsoleMethods.send(:prepend, PDFComparisonTestFactory)
140+
# => Flipper.enable(:enable_packs)
141141
# => PDFComparisonTestFactory.create_comparison_pdfs
142142
expect(pdf_file).to eq(IO.binread(expected_file_path))
143143
rescue RSpec::Expectations::ExpectationNotMetError => e
@@ -146,6 +146,11 @@ def compare_pdf(distribution, expected_file_path)
146146
end
147147
end
148148

149+
# The generated PDFs (PDFs to use for comparison) are expecting the packs feature to be enabled.
150+
before(:each) do
151+
Flipper.enable(:enable_packs)
152+
end
153+
149154
let(:partner) { PDFComparisonTestFactory.create_partner(organization) }
150155
let(:file_paths) { PDFComparisonTestFactory.get_file_paths }
151156
let(:expected_different_address_file_path) { file_paths.expected_different_address_file_path }

0 commit comments

Comments
 (0)