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

Automatically download the unicode font when it is needed the first time #3304

Open
mattab opened this issue Aug 7, 2012 · 0 comments
Open
Labels
c: Usability For issues that let users achieve a defined goal more effectively or efficiently. Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.

Comments

@mattab
Copy link
Member

mattab commented Aug 7, 2012

Currently, for users to generate graphs with unicode characters (japanese, chinese, arabic, etc.) users need to [http://piwik.org/faq/how-to-install/#faq_142
upload on their server the unitfont.ttf as explained in this faq]

Obviously this is not user friendly.. it's not even explained in the UI, so users will have to browse the FAQ or doc to find out.

Instead we could:

  • if the unifont is not found in the expected path, and if the user is using the UI in any language we know needs unifont, display in General Settings a little warning / notice message explaining that the font is needed.
  • the first time the unifont is needed to generate a static graph, in the language it is known to be required:
    • if there is no right permission in the folder to put the font
      piwik/plugins/ImageGraph/fonts/unifont.ttf we could write in tmp/assets/unifont.ttf
    • if still no permission, cancel
    • we could then attempt to download the font from the piwik server or the official original server (if it is mirrored?)
    • The request to download should handle redirect ie. $followDepth = 3 or so
    • if the download fails, set a flag
    • Do we retry downloading later, or fail once and do not try again, ie. generate the graph with the default font?

See related code to refactor a bit: https://github.com/piwik/piwik/blob/master/plugins/ImageGraph/API.php#L110

@mattab mattab added this to the Future releases milestone Jul 8, 2014
@mattab mattab removed the P: normal label Aug 3, 2014
@mattab mattab changed the title UX: Automatically download the unicode font when it is needed the first time Automatically download the unicode font when it is needed the first time Oct 12, 2014
@mattab mattab added c: Usability For issues that let users achieve a defined goal more effectively or efficiently. and removed c: UI - UX (AngularJS twig less) labels Oct 12, 2014
@mattab mattab modified the milestones: Long term, Mid term Dec 23, 2015
@mattab mattab modified the milestones: Long term, Mid term Dec 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Usability For issues that let users achieve a defined goal more effectively or efficiently. Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
Projects
None yet
Development

No branches or pull requests

1 participant