Whilst small files can be uploaded to forum posts, if you have a custom theme or module to contribute please add it on the "Add-ons" page.

TOPIC: [SOLVED] watermarks and unicode

watermarks and unicode 1 month 2 days ago #1

  • joeysun
  • joeysun's Avatar
  • Offline
  • New
  • Posts: 56
I would like to properly show unicode characters in my watermarks (specifically the Chinese characters in my title of my family tree) in 1.7.x. Is there a way to easily enable that or hard code one of the php modules? Could not find any suggestions on my forum searches. You can see what is displayed on my website url joeclan.com .
Doug
webtrees v1.7.12 at Our Family Jiapu 家譜/家谱
PHP Version 7.0.30 | Home ISP w/ Raspberry Pi 2b
The administrator has disabled public write access.

watermarks and unicode 1 month 1 day ago #2

  • xmlf
  • xmlf's Avatar
  • Offline
  • New
  • Posts: 23
Your watermark is garbled because of incorrect character encoding.
Please try converting to UTF-8 encoding first.
I am not using a local watermark and can't help you more.
The administrator has disabled public write access.

watermarks and unicode 1 month 1 day ago #3

  • fisharebest
  • fisharebest's Avatar
  • Offline
  • Administrator
  • Posts: 10825
> Is there a way to easily enable that or hard code one of the php modules?

The PHP function used to create the text watermarks has many limitations.
It only supports characters that are included in the supplied font-file. It does not support right-to-left scripts, etc.

If you to try to make it work with Chinese characters, you will need to find a .TTF format font file that contains them.

The font-file is defined in this line.

github.com/fisharebest/webtrees/blob/1.7.12/app/Config.php#L25


FYI, for webtrees 2.0, I have replaced the text watermark with an image watermark.
Greg Roach - This email address is being protected from spambots. You need JavaScript enabled to view it. - fisharebest.webtrees.net
The administrator has disabled public write access.

[SOLVED] watermarks and unicode 2 weeks 6 days ago #4

  • joeysun
  • joeysun's Avatar
  • Offline
  • New
  • Posts: 56
Problem solved.
Doug
webtrees v1.7.12 at Our Family Jiapu 家譜/家谱
PHP Version 7.0.30 | Home ISP w/ Raspberry Pi 2b
The administrator has disabled public write access.
Powered by Kunena Forum