Please do NOT post requests for help here. Use the Help forum for that.
  • Page:
  • 1

TOPIC:

International language (UNICODE?) support for Notes section 2 weeks 4 days ago #1

  • ruchir.sodhani
  • ruchir.sodhani's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 4
I have setup webtrees and am creating my family tree. All names and usage are in English.I am testing out writing 'Notes' for an individual in a foreign language. In my case the language is Hindi.Entry and on-screen display works fine. However, the pdfs generated in 'Reports' (such as Reports --> Individual) does not display the foreign language characters properly. Only unprintable blobs are displayed.Any ideas? Thanks for your help.
Webtrees 2.0.16 with XAMPP in test mode right now
Want to use notes in foreign language (Hindi)
Attachments:

Please Log in or Create an account to join the conversation.

Last edit: by ruchir.sodhani. Reason: remove double attachment

International language (UNICODE?) support for Notes section 2 weeks 4 days ago #2

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 14636
Hindi and other asian fonts are not included in the dejavu font used by the PDF reports:

See:
github.com/fisharebest/webtrees/issues/1479
github.com/fisharebest/webtrees/issues/3798

/edit
As a temporary workaround, you might be able to take another font (which includes the characters you need), and overwrite resources/fonts/DejaVuSans.ttf
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

Last edit: by fisharebest.

International language (UNICODE?) support for Notes section 2 weeks 4 days ago #3

genealogie.ravenzwaaij.eu published by webtrees 2.09 on debian 10.7 with nginx 1.19.5, php 7.4.13 and mariadb 10.5.8

Please Log in or Create an account to join the conversation.

Last edit: by Lars1963.

International language (UNICODE?) support for Notes section 2 weeks 4 days ago #4

  • bertkoor
  • bertkoor's Avatar
  • Offline
  • Platinum Member
  • Platinum Member
  • Greetings from Utrecht, Holland
  • Posts: 2330
Maybe an improvement: a new module where the site admin can specify what font to use for pdf generation. These are stored in the data/fonts folder, so remain untouched with upgrades.
stamboom.BertKoor.nl runs on webtrees v1.7.13

Please Log in or Create an account to join the conversation.

International language (UNICODE?) support for Notes section 2 weeks 1 day ago #5

  • ruchir.sodhani
  • ruchir.sodhani's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 4
I tried changing the font to freesans, which does support the hindi character set.
For that I had to change the resources/xml/<reportname>.xml file to use the freesans font rather than the dejavusans font.

Consequently, it does render hindi characters. However the rendering of words is not fully correct (some vowel "matras" are misplaced and are added to the following character in the word). Apparently this is a known issue in tcpdf, the tool used to render the pdf.

Anyway, a big improvement. Rather than blobs or question-marks, we get to see some hindi characters. I tried many things and many other fonts. However, the problem may require some indic language-specific support in the tcpdf engine.

For now, we can let the human brain parse what is written. [for example we all know intuitively when we read "wirttne" that it must be "written". Hmmm.]
Webtrees 2.0.16 with XAMPP in test mode right now
Want to use notes in foreign language (Hindi)

Please Log in or Create an account to join the conversation.

International language (UNICODE?) support for Notes section 2 weeks 1 day ago #6

  • ruchir.sodhani
  • ruchir.sodhani's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 4
Note Klokantech fonts did not work. Looks like this font does not support the unicode Hindi character set.
Thanks for your help.
Webtrees 2.0.16 with XAMPP in test mode right now
Want to use notes in foreign language (Hindi)

Please Log in or Create an account to join the conversation.

Last edit: by ruchir.sodhani.

International language (UNICODE?) support for Notes section 2 weeks 1 day ago #7

  • ruchir.sodhani
  • ruchir.sodhani's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 4
Some other forums have suggested using mpdf rather than tcpdf for better international language support. But, that is too big a task for my expertise level!
Webtrees 2.0.16 with XAMPP in test mode right now
Want to use notes in foreign language (Hindi)

Please Log in or Create an account to join the conversation.

International language (UNICODE?) support for Notes section 2 weeks 1 day ago #8

As statet on github.com/tecnickcom/TCPDF, tcpdf is to be considered obselet. A rewrite is being done under github.com/tecnickcom/tc-lib-pdf with a initial release number 8.0.6. The author marks it as "under development", so webtrees should not use it for now.

I do not have the impression that the development is very active and for now I don't see its going to support more international fonts as tcpdf is doing.

You might also read this: peterdev.pl/2019/01/11/picking-a-php-tool-to-generate-pdfs/
genealogie.ravenzwaaij.eu published by webtrees 2.09 on debian 10.7 with nginx 1.19.5, php 7.4.13 and mariadb 10.5.8

Please Log in or Create an account to join the conversation.

Last edit: by Lars1963.
Do you need a web hosting solution for your webtrees site?
If you prefer a host that specialises in webtrees, the following page lists some suppliers able to provide one for you: 
  • Page:
  • 1
Powered by Kunena Forum