2

I am having issues with Pillow's text rendering features. I wanted to enable kerning for the font so that it looked nicer, but have descended into an endless rabbit hole of insanity.

When trying to run this code line:

draw.text((1255, 224), desc, font=font.font_variant(size=94), fill=0xff0000ff, features=['kern'])

I receive the following error message:

    size, offset = self.font.getsize(
KeyError: 'setting text direction, language or font features is not supported without libraqm'

I've searched online for a long while and have found a few answers that have not yielded any results... Most notably How to install pre-built Pillow wheel with libraqm DLLs on Windows? and Installing Raqm (Libraqm) Windows 10.

I was so stressed that I eventually copied and pasted the DLL files in every folder I could think of (such as System32, SysWOW64, Python38, Python38\Scripts, Python38\DLLs, etc.), but still failed.

I was even changing PATH, PYTHONPATH, and sys.path.

>>> from PIL import features
>>> features.check('raqm')
False

The check above always printed False

I inspected the code that checks if a feature is present and checked myself, it cannot find any DLL:

>>> imported_module = __import__('PIL._imagingft', fromlist=['PIL'])
>>> vars(imported_module)
{ ..., 'HAVE_RAQM': False, 'HAVE_FRIBIDI': False, 'HAVE_HARFBUZZ': False, ... }

For reference, these are my versions:

  • Windows 10 Pro 20H2
  • Pillow 8.2.0
  • Python 3.8.7

I have become very desperate for any answer... Looked online for a while and was not able to find much information, always only one or two Google results had some relevance to this issue.

  • Have you tried placing the `libraqm.dll` in the current working directory of your script? That worked for me a while ago, when I needed Raqm support in Pillow on Windows 10. – HansHirse Jun 02 '21 at 18:44
  • @HansHirse, still reports as not present... – UserNotFound Jun 02 '21 at 20:55
  • Then kindly put together a [mre] and [edit](https://stackoverflow.com/posts/67805726/edit) your question accordingly, so that people can further test. – HansHirse Jun 03 '21 at 07:06

1 Answers1

0

I have the same problem I tried placing libraqm.dll everywhere possible After googling for days with no hope, At the end I installed virtualbox and continued my project on Manjaro linux.

I have windows 10 Home Version 10.0.19042 Build 19042 Pillow 8.2.0 Python 3.9.5