Skip to content

Commit

Permalink
Update images
Browse files Browse the repository at this point in the history
  • Loading branch information
pathumego committed Dec 27, 2024
1 parent d4d3a2e commit 97cc1ee
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 18 deletions.
Binary file modified documentation/image1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 14 additions & 11 deletions documentation/image1.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,20 @@
import argparse

# Constants, these are the main "settings" for the image
WIDTH, HEIGHT, MARGIN, FRAMES = 2048, 1024, 128, 1
FONT_PATH = "fonts/ttf/RadioCanadaDisplay-Regular.ttf"
WIDTH, HEIGHT, MARGIN, FRAMES = 2048, 2048, 128, 1
FONT_PATH = "fonts/ttf/DavasaProDEV-Regular.ttf"
FONT_LICENSE = "OFL v1.1"
AUXILIARY_FONT = "Helvetica"
AUXILIARY_FONT = "Inconsolata"
AUXILIARY_FONT_SIZE = 48

BIG_TEXT = "AaBb"
BIG_TEXT_FONT_SIZE = 730
# Update BIG_TEXT for multiple lines

BIG_TEXT_LINES = ["පබාවතී?", "මොකටද", "ආදර මල් "]
BIG_TEXT_FONT_SIZE = 400
BIG_TEXT_SIDE_MARGIN = MARGIN * 1
BIG_TEXT_BOTTOM_MARGIN = MARGIN * 2
BIG_TEXT_BOTTOM_MARGIN = MARGIN * 3



GRID_VIEW = False # Toggle this for a grid overlay

Expand Down Expand Up @@ -90,11 +94,10 @@ def draw_main_text():
stroke(None)
font(FONT_PATH)
fontSize(BIG_TEXT_FONT_SIZE)
# Adjust this line to center main text manually.
# TODO: This should be done automatically when drawbot-skia
# has support for textBox() and FormattedString
#text(BIG_TEXT, ((WIDTH / 2) - MARGIN * 4.75, (HEIGHT / 2) - MARGIN * 2.5))
text(BIG_TEXT, (BIG_TEXT_SIDE_MARGIN, BIG_TEXT_BOTTOM_MARGIN))
y = BIG_TEXT_BOTTOM_MARGIN
for line in BIG_TEXT_LINES:
text(line, (BIG_TEXT_SIDE_MARGIN, y))
y += BIG_TEXT_FONT_SIZE * 1.2 # Adjust the line spacing as needed


# Divider lines
Expand Down
Binary file modified documentation/image2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 19 additions & 7 deletions documentation/image2.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,26 @@
import argparse

# Constants, these are the main "settings" for the image
WIDTH, HEIGHT, MARGIN, FRAMES = 2048, 1024, 128, 1
FONT_PATH = "fonts/ttf/RadioCanadaDisplay-Regular.ttf"
WIDTH, HEIGHT, MARGIN, FRAMES = 2048, 2048, 128, 1
FONT_PATH = "fonts/ttf/DavasaProDEV-Regular.ttf"
FONT_LICENSE = "OFL v1.1"
AUXILIARY_FONT = "Helvetica"
AUXILIARY_FONT_SIZE = 48
AUXILIARY_FONT = "Inconsolata"
AUXILIARY_FONT_SIZE = 36

LINE_ONE = "ABCDEFGHIJKLMNOPQ"
LINE_TWO = "RSTUVWXYZ123456789"
LINE_THREE = "abcdefghijklmnopqrstu"
LINE_FOUR = "vwxyz,.;:!@#$%^&*(){}[]"
BIG_TEXT_FONT_SIZE = 160
LINE_FIVE = "අආඇඈඉඊඋඌඍඎඏඐ "
LINE_SIX = "එඒඓඔඕඖකඛගඝඞඟච"
LINE_SEVEN = "ඡජඣඤඥඦටඨඩඪණඬත"
LINE_EIGHT = "ථදධනඳපඵබභමඹයරලවශ"
LINE_NINE = "ෂසහළෆ෴"


BIG_TEXT_FONT_SIZE = 140
BIG_TEXT_SIDE_MARGIN = MARGIN * 1
BIG_TEXT_BOTTOM_MARGIN = MARGIN * 5.45
BIG_TEXT_BOTTOM_MARGIN = MARGIN * 13.2

GRID_VIEW = False # Toggle this for a grid overlay

Expand Down Expand Up @@ -96,11 +103,16 @@ def draw_main_text():
# Adjust this line to center main text manually.
# TODO: This should be done automatically when drawbot-skia
# has support for textBox() and FormattedString
LEADING = 1.2
LEADING = 1.4
text(LINE_ONE, (BIG_TEXT_SIDE_MARGIN, BIG_TEXT_BOTTOM_MARGIN))
text(LINE_TWO, (BIG_TEXT_SIDE_MARGIN, BIG_TEXT_BOTTOM_MARGIN - (MARGIN * LEADING)))
text(LINE_THREE, (BIG_TEXT_SIDE_MARGIN, BIG_TEXT_BOTTOM_MARGIN - (MARGIN * (LEADING * 2))))
text(LINE_FOUR, (BIG_TEXT_SIDE_MARGIN, BIG_TEXT_BOTTOM_MARGIN - (MARGIN * (LEADING * 3))))
text(LINE_FIVE, (BIG_TEXT_SIDE_MARGIN, BIG_TEXT_BOTTOM_MARGIN - (MARGIN * (LEADING * 4))))
text(LINE_SIX, (BIG_TEXT_SIDE_MARGIN, BIG_TEXT_BOTTOM_MARGIN - (MARGIN * (LEADING * 5))))
text(LINE_SEVEN, (BIG_TEXT_SIDE_MARGIN, BIG_TEXT_BOTTOM_MARGIN - (MARGIN * (LEADING * 6))))
text(LINE_EIGHT, (BIG_TEXT_SIDE_MARGIN, BIG_TEXT_BOTTOM_MARGIN - (MARGIN * (LEADING * 7))))
text(LINE_NINE, (BIG_TEXT_SIDE_MARGIN, BIG_TEXT_BOTTOM_MARGIN - (MARGIN * (LEADING * 8))))


# Divider lines
Expand Down

0 comments on commit 97cc1ee

Please sign in to comment.