Compare commits
	
		
			1 Commits
		
	
	
		
			master
			...
			90a43e2491
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						
						
							
						
						90a43e2491
	
				 | 
					
					
						
@ -7,6 +7,7 @@
 | 
				
			|||||||
"""
 | 
					"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import os
 | 
					import os
 | 
				
			||||||
 | 
					import platform
 | 
				
			||||||
import sys
 | 
					import sys
 | 
				
			||||||
import time
 | 
					import time
 | 
				
			||||||
import subprocess
 | 
					import subprocess
 | 
				
			||||||
@ -55,6 +56,12 @@ def extract_frame(video_file, time_offset, output_file):
 | 
				
			|||||||
    subprocess.call(shlex.split(cmd),stdout=devnull, stderr=devnull)
 | 
					    subprocess.call(shlex.split(cmd),stdout=devnull, stderr=devnull)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def get_font_path():
 | 
					def get_font_path():
 | 
				
			||||||
 | 
					    if platform.system() == "Darwin":
 | 
				
			||||||
 | 
					        # Assume DejaVu to be installed in the user library
 | 
				
			||||||
 | 
					        path = "~/Library/Fonts/DejaVuSans-Bold.ttf"
 | 
				
			||||||
 | 
					        return os.path.expanduser(path)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # Default platform: Linux
 | 
				
			||||||
    path = "/usr/share/fonts"
 | 
					    path = "/usr/share/fonts"
 | 
				
			||||||
    files = glob.glob(path + "/**/DejaVuSans-Bold.ttf", recursive = True)
 | 
					    files = glob.glob(path + "/**/DejaVuSans-Bold.ttf", recursive = True)
 | 
				
			||||||
    return files[0]
 | 
					    return files[0]
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user