mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-11-04 01:47:47 +03:00 
			
		
		
		
	Fix RAQM feature detection
This commit is contained in:
		
							parent
							
								
									2528743d8c
								
							
						
					
					
						commit
						42831098ac
					
				| 
						 | 
				
			
			@ -4,7 +4,6 @@ modules = {
 | 
			
		|||
    "pil": "PIL._imaging",
 | 
			
		||||
    "tkinter": "PIL._tkinter_finder",
 | 
			
		||||
    "freetype2": "PIL._imagingft",
 | 
			
		||||
    "raqm": "PIL._imagingft",
 | 
			
		||||
    "littlecms2": "PIL._imagingcms",
 | 
			
		||||
    "webp": "PIL._webp",
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -46,6 +45,7 @@ def get_supported_codecs():
 | 
			
		|||
features = {
 | 
			
		||||
    "webp_mux": ("PIL._webp", 'HAVE_WEBPMUX'),
 | 
			
		||||
    "transp_webp": ("PIL._webp", "HAVE_TRANSPARENCY"),
 | 
			
		||||
    "raqm": ("PIL._imagingft", "HAVE_RAQM")
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
def check_feature(feature):
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -828,7 +828,7 @@ setup_module(PyObject* m) {
 | 
			
		|||
#else
 | 
			
		||||
    v = PyBool_FromLong(0);
 | 
			
		||||
#endif
 | 
			
		||||
    PyDict_SetItemString(d, "have_raqm", v);
 | 
			
		||||
    PyDict_SetItemString(d, "HAVE_RAQM", v);
 | 
			
		||||
 | 
			
		||||
    return 0;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -184,7 +184,7 @@ if __name__ == "__main__":
 | 
			
		|||
        ("jpg_2000", "OPENJPEG (JPEG2000)"),
 | 
			
		||||
        ("zlib", "ZLIB (PNG/ZIP)"),
 | 
			
		||||
        ("libtiff", "LIBTIFF"),
 | 
			
		||||
        ("raqm", "RAQM")
 | 
			
		||||
        ("raqm", "RAQM (Bidirectional Text)")
 | 
			
		||||
    ]:
 | 
			
		||||
        if features.check(name):
 | 
			
		||||
            print("---", feature, "support ok")
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user