-
-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ff03f8b
commit b7541a0
Showing
63 changed files
with
54 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,4 @@ | ||
|
||
# :mega: borb release notes | ||
|
||
This release features `GoogleTrueTypeFont` which enables users to access the Google Font API, | ||
to directly use a `TrueTypeFont` in `borb` by specifying its name. | ||
|
||
Tests have been added for this feature: | ||
|
||
- `test_add_paragraphs_using_jacquard_12` | ||
- `test_add_paragraphs_using_pacifico` | ||
- `test_add_paragraphs_using_shadows_into_light` | ||
|
||
Some tests have been added to guard code quality: | ||
|
||
- `TestCodeFilesContainSortedMethods` | ||
- `TestCodeFilesContainVisibilityComments` | ||
- `TestCodeFilesDoNotContainNumbersInMethods` | ||
- `TestCodeFilesNeverUseKeyring` | ||
This release features a minor bugfix in `Paragraph` related to text-alignment `JUSTIFIED`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file removed
BIN
-69.3 KB
tests/pdf/canvas/layout/artifacts_test_new_layout_methods/output_001.png
Binary file not shown.
Binary file modified
BIN
+364 Bytes
(100%)
...vas/layout/image/barcode/artifacts_test_add_barcode/output_001_ground_truth.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+105 Bytes
(100%)
...vas/layout/image/barcode/artifacts_test_add_barcode/output_002_ground_truth.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+95 Bytes
(100%)
...vas/layout/image/barcode/artifacts_test_add_barcode/output_003_ground_truth.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+190 Bytes
(100%)
...vas/layout/image/barcode/artifacts_test_add_barcode/output_004_ground_truth.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+162 Bytes
(100%)
...vas/layout/image/barcode/artifacts_test_add_barcode/output_005_ground_truth.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+210 Bytes
(100%)
...vas/layout/image/barcode/artifacts_test_add_barcode/output_006_ground_truth.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+202 Bytes
(100%)
...vas/layout/image/barcode/artifacts_test_add_barcode/output_007_ground_truth.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+134 Bytes
(100%)
...vas/layout/image/barcode/artifacts_test_add_barcode/output_008_ground_truth.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+250 Bytes
(100%)
...vas/layout/image/barcode/artifacts_test_add_barcode/output_009_ground_truth.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-4 Bytes
(100%)
tests/pdf/canvas/layout/image/image/artifacts_test_add_png_image/output_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+1 Byte
(100%)
tests/pdf/canvas/layout/image/image/artifacts_test_add_png_image/output_002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+6.74 KB
(120%)
...ut/image/unsplash/artifacts_test_add_unsplash_image/output_001_ground_truth.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+31.2 KB
(130%)
...ut/image/unsplash/artifacts_test_add_unsplash_image/output_002_ground_truth.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+31.2 KB
(130%)
...ut/image/unsplash/artifacts_test_add_unsplash_image/output_003_ground_truth.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed
BIN
-84.1 KB
...f/canvas/layout/image/unsplash/artifacts_test_add_unsplash_image/output_004.png
Binary file not shown.
Binary file modified
BIN
+11.1 KB
(110%)
...ut/image/unsplash/artifacts_test_add_unsplash_image/output_004_ground_truth.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+14 KB
...ph/artifacts_test_add_paragraph_alignment_justified/output_001_ground_truth.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+20 Bytes
(100%)
...vas/layout/text/paragraph/artifacts_test_add_paragraph_paint_box/output_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 48 additions & 0 deletions
48
tests/pdf/canvas/layout/text/paragraph/test_add_paragraph_alignment_justified.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import random | ||
|
||
from borb.pdf import PDF | ||
from borb.pdf import Alignment | ||
from borb.pdf import Lipsum | ||
from borb.pdf import Paragraph | ||
from borb.pdf import SingleColumnLayout | ||
from borb.pdf import Page | ||
from borb.pdf import Document | ||
|
||
from tests.test_case import TestCase | ||
|
||
|
||
class TestAddParagraphAlignmentJustified(TestCase): | ||
def test_add_paragraph_alignment_justified(self): | ||
|
||
pdf = Document() | ||
page = Page() | ||
pdf.add_page(page) | ||
layout = SingleColumnLayout(page) | ||
layout.add( | ||
self.get_test_header( | ||
test_description="This test adds a Paragraph to the PDF. The Paragraph is aligned JUSTIFIED." | ||
) | ||
) | ||
|
||
# mult-line paragraph | ||
random.seed(0) | ||
layout.add( | ||
Paragraph( | ||
Lipsum.generate_lipsum_text(5), text_alignment=Alignment.JUSTIFIED | ||
) | ||
) | ||
|
||
# single-line paragraph | ||
layout.add( | ||
Paragraph( | ||
Lipsum.generate_lipsum_text(1), text_alignment=Alignment.JUSTIFIED | ||
) | ||
) | ||
|
||
# store | ||
with open(self.get_first_output_file(), "wb") as fh: | ||
PDF.dumps(fh, pdf) | ||
|
||
# compare | ||
self.compare_visually_to_ground_truth(self.get_first_output_file()) | ||
self.check_pdf_using_validator(self.get_first_output_file()) |
Binary file modified
BIN
+0 Bytes
(100%)
...s/toolkit/export/html_to_pdf/artifacts_test_export_html_to_pdf/example_html_input_000.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...s/toolkit/export/html_to_pdf/artifacts_test_export_html_to_pdf/example_html_input_001.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...s/toolkit/export/html_to_pdf/artifacts_test_export_html_to_pdf/example_html_input_002.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...s/toolkit/export/html_to_pdf/artifacts_test_export_html_to_pdf/example_html_input_003.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...s/toolkit/export/html_to_pdf/artifacts_test_export_html_to_pdf/example_html_input_004.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...s/toolkit/export/html_to_pdf/artifacts_test_export_html_to_pdf/example_html_input_005.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...s/toolkit/export/html_to_pdf/artifacts_test_export_html_to_pdf/example_html_input_006.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...s/toolkit/export/html_to_pdf/artifacts_test_export_html_to_pdf/example_html_input_007.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...s/toolkit/export/html_to_pdf/artifacts_test_export_html_to_pdf/example_html_input_008.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...s/toolkit/export/html_to_pdf/artifacts_test_export_html_to_pdf/example_html_input_009.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...s/toolkit/export/html_to_pdf/artifacts_test_export_html_to_pdf/example_html_input_011.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...s/toolkit/export/html_to_pdf/artifacts_test_export_html_to_pdf/example_html_input_012.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...s/toolkit/export/html_to_pdf/artifacts_test_export_html_to_pdf/example_html_input_013.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...s/toolkit/export/html_to_pdf/artifacts_test_export_html_to_pdf/example_html_input_014.pdf
Binary file not shown.
Binary file modified
BIN
-8.28 KB
(28%)
...s/toolkit/export/html_to_pdf/artifacts_test_export_html_to_pdf/example_html_input_015.pdf
Binary file not shown.
Binary file removed
BIN
-95.4 KB
...export/html_to_pdf/artifacts_test_export_html_to_pdf/example_html_input_015.png
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...port/markdown_to_pdf/artifacts_test_export_markdown_to_pdf/example-markdown-input-001.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...port/markdown_to_pdf/artifacts_test_export_markdown_to_pdf/example-markdown-input-002.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...port/markdown_to_pdf/artifacts_test_export_markdown_to_pdf/example-markdown-input-003.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...port/markdown_to_pdf/artifacts_test_export_markdown_to_pdf/example-markdown-input-004.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...port/markdown_to_pdf/artifacts_test_export_markdown_to_pdf/example-markdown-input-005.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...port/markdown_to_pdf/artifacts_test_export_markdown_to_pdf/example-markdown-input-006.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...port/markdown_to_pdf/artifacts_test_export_markdown_to_pdf/example-markdown-input-007.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...port/markdown_to_pdf/artifacts_test_export_markdown_to_pdf/example-markdown-input-008.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...port/markdown_to_pdf/artifacts_test_export_markdown_to_pdf/example-markdown-input-009.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...port/markdown_to_pdf/artifacts_test_export_markdown_to_pdf/example-markdown-input-010.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...port/markdown_to_pdf/artifacts_test_export_markdown_to_pdf/example-markdown-input-011.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
...port/markdown_to_pdf/artifacts_test_export_markdown_to_pdf/example-markdown-input-012.pdf
Binary file not shown.
Binary file modified
BIN
+12 Bytes
(100%)
tests/toolkit/export/pdf_to_jpg/artifacts_test_export_pdf_to_jpg/output_001.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+12 Bytes
(100%)
tests/toolkit/export/pdf_to_jpg/artifacts_test_export_pdf_to_jpg/output_002.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-3.38 KB
(100%)
tests/toolkit/export/pdf_to_mp3/artifacts_test_export_pdf_to_mp3/output.mp3
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
tests/toolkit/table/artifacts_test_detect_table/input_000.pdf
Binary file not shown.
Binary file modified
BIN
-2 Bytes
(100%)
tests/toolkit/table/artifacts_test_detect_table/input_001.pdf
Binary file not shown.
Binary file modified
BIN
-3 Bytes
(100%)
tests/toolkit/table/artifacts_test_detect_table/input_002.pdf
Binary file not shown.
Binary file modified
BIN
+1 Byte
(100%)
tests/toolkit/table/artifacts_test_detect_table/input_003.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
tests/toolkit/table/artifacts_test_detect_table/input_004.pdf
Binary file not shown.
Binary file modified
BIN
+1 Byte
(100%)
tests/toolkit/table/artifacts_test_detect_table/input_005.pdf
Binary file not shown.
Binary file modified
BIN
+0 Bytes
(100%)
tests/toolkit/table/artifacts_test_detect_table/input_006.pdf
Binary file not shown.