Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
pathumego committed Dec 28, 2024
1 parent 1f4a561 commit 76aca2e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 23 deletions.
12 changes: 0 additions & 12 deletions documentation/DESCRIPTION.en_us.html
Original file line number Diff line number Diff line change
@@ -1,12 +0,0 @@
<p>
Please add a text describing the font here, 100 chracters or more, but no more than 500 words.
See https://googlefonts.github.io/gf-guide/description.html for further reference.
Please make sure that HTML characters are properly encoded. ('&' becomes &amp; etc.)
If unsure, use https://www.freeformatter.com/html-escape.html for formatting. (Use "Escape HTML").
</p>
<p>
Could be several paragraphs, also.
</p>
<p>
To contribute, see <a href="https://github.com/youruseraccount/yourrepository">github.com/youruseraccount/yourrepository</a>.
</p>
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/DedigamaDEV-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

0 comments on commit 76aca2e

Please sign in to comment.