increased news font size

This commit is contained in:
Neythen 2021-05-31 11:35:37 +01:00
parent 4ef2b88d60
commit 97389d85d7
4 changed files with 10 additions and 10 deletions

View File

@ -1,3 +1,3 @@
symbol,name,base,current,24hr change
BTC,bitcoin,usd,39062,1.451872309860798
ETH,ethereum,gbp,1961.49,1.6934708417131437
ETH,ethereum,gbp,1957.05,1.4454835579595058

1 symbol name base current 24hr change
2 BTC bitcoin usd 39062 1.451872309860798
3 ETH ethereum gbp 1961.49 1957.05 1.6934708417131437 1.4454835579595058

View File

@ -1 +1 @@
hello world!,255,255,0
a quick brown fox jumped over the lazy dog. A QUICK BROWN FOX JUMPED OVER THE LAZY DOG. 0123456789,255,255,0

1 hello world! a quick brown fox jumped over the lazy dog. A QUICK BROWN FOX JUMPED OVER THE LAZY DOG. 0123456789 255 255 0

View File

@ -1,4 +1,4 @@
name,current,opening
MSFT,249.62,251.17
NFLX,501.1229,501.8
GOOG,2431.28,2436.94
MSFT,249.575,251.17
NFLX,501.03,501.8
GOOG,2431.38,2436.94

1 name current opening
2 MSFT 249.62 249.575 251.17
3 NFLX 501.1229 501.03 501.8
4 GOOG 2431.28 2431.38 2436.94

View File

@ -235,7 +235,7 @@ class StockTicker():
f.close()
font = ImageFont.load("./fonts/texgyre-27.pil")
font = ImageFont.load("./fonts/4x6.pil")
img = self.textImage(text, font, int(r), int(g), int(b), True)
@ -243,8 +243,8 @@ class StockTicker():
self.scrollImageTransition(['scroll_text.ppm', 'scroll_text.ppm'], offset_x = 128, offset_y = 0, stocks = False)
def displayNews(self):
headline_font = ImageFont.load("./fonts/8x13B.pil")
source_font = ImageFont.load("./fonts/5x8.pil")
headline_font = ImageFont.load("./fonts/10x20.pil")
source_font = ImageFont.load("./fonts/10x20.pil")
while True:
headlines = []
source_date_times = []
@ -278,7 +278,7 @@ class StockTicker():
logo = Image.open(os.path.join(logos_path, 'techcrunch' + '.png'))
print(logo.size)
img = Image.new('RGB', (headline_img.size[0], 32))
img.paste(headline_img, (2, 0))
img.paste(headline_img, (2, -3))
img.paste(source_img, (2,16))
img= self.stitchImage([logo,img])
@ -623,7 +623,7 @@ if __name__ == '__main__':
#stock_ticker.displayUserText()
#
#stock_ticker.displayNews()
stock_ticker.displayNews()
#stock_ticker.displayGIF('/home/pi/Desktop/stock_ticker/gifs/open.gif')
#stock_ticker.displayGIF('/home/pi/Desktop/stock_ticker/gifs/close.gif')