Skip to content

Commit

Permalink
[DDW-552] Line breaks on the address from exported PDF (#2402)
Browse files Browse the repository at this point in the history
* [DDW-552] Remove line break characters from address on the exported pdf

* [DDW-552] Update changelog

* [DDW-552] Apply small font for address on the exported pdf

* [DDW-552] Updates CHANGELOG

* [DDW-552] Adjust font sizes of text contents in exported pdf

Co-authored-by: Nikola Glumac <niglumac@gmail.com>
  • Loading branch information
topseniors and nikolaglumac committed Mar 4, 2021
1 parent 2234654 commit ae24ad9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ Changelog

- Implemented the syncing state for the Stake Pools settings screen ([PR 2418](https://github.com/input-output-hk/daedalus/pull/2418))

### Chores

- Removed line break characters on the address from exported PDF ([PR 2402](https://github.com/input-output-hk/daedalus/pull/2402))

## 4.0.1-FC2

### Fixes
Expand Down
11 changes: 5 additions & 6 deletions source/main/ipc/generateAddressPDFChannel.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ export const handleAddressPDFRequests = () => {
size: [width, height],
margins: {
bottom: 20,
left: 30,
right: 30,
left: 20,
right: 20,
top: 20,
},
info: {
Expand Down Expand Up @@ -115,18 +115,17 @@ export const handleAddressPDFRequests = () => {
doc.moveDown();

// Address
doc.font(fontBufferMono).fontSize(19).text(address, {
doc.font(fontBufferMono).fontSize(9).text(address, {
align: 'center',
characterSpacing: 1.5,
});

if (note) {
doc.moveDown();
// Note title
doc.font(fontBufferRegular).fontSize(14).text(noteLabel);
doc.font(fontBufferRegular).fontSize(12).text(noteLabel);

// Note
doc.font(fontBufferUnicode).text(note);
doc.font(fontBufferUnicode).fontSize(12).text(note);
}

doc.moveDown();
Expand Down

0 comments on commit ae24ad9

Please sign in to comment.