Skip to content

Instantly share code, notes, and snippets.

View josephcagle's full-sized avatar
👨‍💻

Joseph Cagle josephcagle

👨‍💻
View GitHub Profile
@killercup
killercup / pandoc.css
Created July 3, 2013 11:31
Add this to your Pandoc HTML documents using `--css pandoc.css` to make them look more awesome. (Tested with Markdown and LaTeX.)
/*
* I add this to html files generated with pandoc.
*/
html {
font-size: 100%;
overflow-y: scroll;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
@bornfree
bornfree / image_using_font.py
Last active April 22, 2023 19:42
Generate an image using TTF font with PIL (pillow)
from PIL import Image, ImageFont, ImageDraw
FONT_SIZE = 40
MAX_PADDING = 4
font_path = "~/Downloads/Roboto.ttf"
font_object = ImageFont.truetype(font_path, FONT_SIZE) # Font has to be a .ttf file
word = "hello"
fg = "#000000" # black foreground