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

added GNU Free Font to be used by sales PDFs #14710

Conversation

rossmc
Copy link
Contributor

@rossmc rossmc commented Apr 15, 2018

Please Note: A similar PR(#13016) I submitted for the same issue to the 2.2-develop branch has been merged already.

Description

The sales PDFs use the Libertine font which is not a unicode font and therefore it does not have full support of characters. It does not support Arabic, Russian, Greek, Indian or Thai alphabets and many more. For example it does not support the Indian rupee currency symbol ( ₹ ) and displays tofu boxes instead, which makes the PDF invoice totals illegible.

It's better if we use a unicode font to support more writing systems and characters. So I've added the open source GNU Free Font which supports much more writing systems.

Fixed Issues (if relevant)

  1. Magento 2.1.6 - Invoice PDF doesn't support Thai #9666: Magento 2.1.6 - Invoice PDF doesn't support Thai
  2. Magento 2.1.3 - Invoice and shipment PDF doesn't support Arabic #12323: Magento 2.1.3 - Invoice and shipment PDF doesn't support Arabic

Manual testing scenarios

  1. Set the store currency to use the ruppe currency symbol ( ₹ ) .
  2. Print an invoice.

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@savadk00hi
Copy link

@rossmc

Hello
I use Farsi language in magento 2.3 but in sales pdf the characters are not displayed correctly

screen shot 2018-04-15 at 10 13 25 pm

@rossmc
Copy link
Contributor Author

rossmc commented Apr 15, 2018

Hi @savadk00hi,

I'm not sure if the GNU Free Font I added in this PR supports Farsi, but it does support much more writing systems than the current Libertine font that is being used. From what I could find it supports more writing systems than any other open source font available.

The issue is that there is no one single font that supports all writing systems and characters in existence. It's not possible with the OpenType font spec.

Anyway, If the GNU Free Font added in this PR does not support Farsi, you could try forking this module of mine and change it use a font which supports Farsi, one of Google's Noto fonts probably support Farsi.
https://www.google.com/get/noto/

@magento-engcom-team
Copy link
Contributor

Hi @rossmc. Thank you for your contribution.
Changes from your Pull Request will be available with the upcoming 2.3.0 release.

@msliman
Copy link

msliman commented May 30, 2018

Any solution for Arabic Language, the characters are separated and reversed ?

@afnanm
Copy link

afnanm commented May 31, 2018

also me, arabic letters are not connected. how to fix it? is there a solution? also currency symbol in arabic is shown as character @rossmc @magento-engcom-team

@Sumayah90
Copy link

Hi @rossmc,
Is this issue solved?
I can see 3 out of 4 is done

Kindly inform us

Thanks

@pieal86
Copy link

pieal86 commented Dec 4, 2019

any solution for this: "characters are separated and reversed"?
More than a year..

@rossmc
Copy link
Contributor Author

rossmc commented Dec 5, 2019

See response with suggested solution from more than a year ago...
#14710 (comment)

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

Successfully merging this pull request may close these issues.

None yet