mirror of
				https://github.com/skishore/makemeahanzi.git
				synced 2025-10-31 19:07:07 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			15 lines
		
	
	
		
			412 B
		
	
	
	
		
			Python
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			412 B
		
	
	
	
		
			Python
		
	
	
		
			Executable File
		
	
	
	
	
| #!/usr/bin/python
 | |
| '''
 | |
| Converts a font from one format to another. The input and output formats are
 | |
| inferred based on file names. This script is a thin wrapper around the fontforge
 | |
| Python library, which it depends on.
 | |
| '''
 | |
| 
 | |
| import fontforge
 | |
| import sys
 | |
| 
 | |
| if __name__ == '__main__':
 | |
|   assert len(sys.argv) == 3, 'Usage: ./convert.py <input> <output>'
 | |
|   font = fontforge.open(sys.argv[1])
 | |
|   font.generate(sys.argv[2])
 | 
