increased news font size
This commit is contained in:
parent
4ef2b88d60
commit
97389d85d7
@ -1,3 +1,3 @@
|
|||||||
symbol,name,base,current,24hr change
|
symbol,name,base,current,24hr change
|
||||||
BTC,bitcoin,usd,39062,1.451872309860798
|
BTC,bitcoin,usd,39062,1.451872309860798
|
||||||
ETH,ethereum,gbp,1961.49,1.6934708417131437
|
ETH,ethereum,gbp,1957.05,1.4454835579595058
|
||||||
|
|
@ -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,4 +1,4 @@
|
|||||||
name,current,opening
|
name,current,opening
|
||||||
MSFT,249.62,251.17
|
MSFT,249.575,251.17
|
||||||
NFLX,501.1229,501.8
|
NFLX,501.03,501.8
|
||||||
GOOG,2431.28,2436.94
|
GOOG,2431.38,2436.94
|
||||||
|
|
@ -235,7 +235,7 @@ class StockTicker():
|
|||||||
f.close()
|
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)
|
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)
|
self.scrollImageTransition(['scroll_text.ppm', 'scroll_text.ppm'], offset_x = 128, offset_y = 0, stocks = False)
|
||||||
|
|
||||||
def displayNews(self):
|
def displayNews(self):
|
||||||
headline_font = ImageFont.load("./fonts/8x13B.pil")
|
headline_font = ImageFont.load("./fonts/10x20.pil")
|
||||||
source_font = ImageFont.load("./fonts/5x8.pil")
|
source_font = ImageFont.load("./fonts/10x20.pil")
|
||||||
while True:
|
while True:
|
||||||
headlines = []
|
headlines = []
|
||||||
source_date_times = []
|
source_date_times = []
|
||||||
@ -278,7 +278,7 @@ class StockTicker():
|
|||||||
logo = Image.open(os.path.join(logos_path, 'techcrunch' + '.png'))
|
logo = Image.open(os.path.join(logos_path, 'techcrunch' + '.png'))
|
||||||
print(logo.size)
|
print(logo.size)
|
||||||
img = Image.new('RGB', (headline_img.size[0], 32))
|
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.paste(source_img, (2,16))
|
||||||
|
|
||||||
img= self.stitchImage([logo,img])
|
img= self.stitchImage([logo,img])
|
||||||
@ -623,7 +623,7 @@ if __name__ == '__main__':
|
|||||||
#stock_ticker.displayUserText()
|
#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/open.gif')
|
||||||
|
|
||||||
#stock_ticker.displayGIF('/home/pi/Desktop/stock_ticker/gifs/close.gif')
|
#stock_ticker.displayGIF('/home/pi/Desktop/stock_ticker/gifs/close.gif')
|
||||||
|
Loading…
Reference in New Issue
Block a user