Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update of Pr #2284, Complex Text Support #2576

Merged
merged 41 commits into from
Jul 1, 2017

Conversation

wiredfool
Copy link
Member

@wiredfool wiredfool commented Jun 13, 2017

Includes #2284.

So far, fixes:

  • rebased
  • feature detection
  • Testing both branches when raqm is installed

Todo/test/check

  • install docs/alternate platforms
    • 5 of the dockers now have raqm available.
  • install detection/enable/disable
  • font license
  • review docs
  • ppa check

Additional note, we should add the Deja license to the font licence directory as well: https://dejavu-fonts.github.io/License.html

@Fahad-Alsaidi
Copy link
Contributor

to build libraqm natively on windows or OSX, you can libraqm-cmake repo.

@khaledhosny
Copy link

Any idea what corresponds to these failing lines in Makefile.am?

@wiredfool
Copy link
Member Author

wiredfool commented Jun 26, 2017

No, I'm afraid I haven't dived into automake.

But I just tried it on Freebsd with the cmake version and it builds and passes tests with that version. So that part is good anyway. I've noticed that the cmake and other repo are slightly out of sync -- would it be possible to sync them up and declare a 0.3.0 release, or add the cmake portions to the main repo?

@wiredfool wiredfool removed the FreeBSD label Jun 27, 2017
@wiredfool
Copy link
Member Author

With the cmake version of libraqm, I'm getting one test failure on osx:

(vpy27)Erics-MacBook-Air:Pillow erics$ ./test-installed.py Tests/test_imagefontctl.py
..F.......
======================================================================
FAIL: TestImagecomplextext.test_complex_unicode_text
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/erics/Pillow/Tests/test_imagefontctl.py", line 55, in test_complex_unicode_text
    self.assert_image_similar(im, target_img, .5)
  File "/Users/erics/Pillow/Tests/helper.py", line 110, in assert_image_similar
    ave_diff, epsilon))
AssertionError:  average pixel value difference 12.5302 > epsilon 0.5000

With an image like this:
complex_unicode

Which is clearly completely failing.

Install procedure here was roughly:

brew install fribidi harfbuzz cmake
  • clone libraqm-cmake
  • build with prefix /usr/local
  • build pillow.

@Fahad-Alsaidi
Copy link
Contributor

It is weird. I see this draw.text((0, 0), u'السلام عليكم', font=ttf, fill=500) but there is no u notation in the other tests. Is it OK? try to remove it to be synced with the other tests.

@wiredfool
Copy link
Member Author

Ok. Current state is:

  • Generally, all un*x platforms work that I've tried. linux, freebsd, mac/brew
  • Windows is going to be a treat due to getting harfbuzz and firbidi compiled with msvc.
  • Just added direction/features to getsize. Need to test that with some of the features, kerning, possibly ttb.

Almost ready at this point.

@Fahad-Alsaidi
Copy link
Contributor

For windows, you can benefit from Raqm dependencies project .

@wiredfool
Copy link
Member Author

The trouble with the dependencies on windows is that as far as I know, Python needs the compiler to be consistent between the Python version and its extensions. So mingw isn't going to work.

I'm going to merge for now and we'll deal with windows later. The compilation issues are only going to get better over time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants