Zend PDF trying to print Russian language

2019-09-14 22:27发布

I am using Zend PDF, trying to print Russian words. My code is

$unicodeString = "это фигня";

$page->drawText($unicodeString, 72, 720, 'UTF-8');

but the result is ѕто фигнѕ

So, it is printing something weird. I read that the issue might have to do with fonts and Unicode, so I am planning to fix it by doing this:

$font = Zend_Pdf_Font::fontWithPath('/Library/Fonts/Times New Roman Bold.ttf');

How can i find the path to this font in on an IBM i / AS/400 machine?

One more very basic question. The font will be coming from the server. What I understand is that the fonts should be on the server, Zend PDF is just finding the font by name. The font is not part of the Zend framework . Is my understanding correct?

I am just curious how a Chinese or in general a non-English language speaker will access a website like Google, Yahoo, or StackOverflow. What i am trying to ask is, if the person doesn't know English and the keyboard is not in English how they will type the url? Or am I completely wrong?

Is the url in English only?

google.com      谷歌随着

Is the above is possible or not?

2条回答
爱情/是我丢掉的垃圾
2楼-- · 2019-09-14 23:14

I don't know the intricacies of Unicode and PHP on the IBM i but the Microsoft TrueType Core Fonts can be downloaded from http://sourceforge.net/projects/corefonts/files/the%20fonts/final/.

You may want to review the licensing and how it relates to your application.

查看更多
爷的心禁止访问
3楼-- · 2019-09-14 23:23

True Type fonts are optional on the IBM i. Have your IBM admin look at this web page: http://publib.boulder.ibm.com/infocenter/iseries/v6r1m0/index.jsp?topic=/rzalu/rzalucontruetype.htm If this doesn't fit your needs, have the admin create a directory for you and copy the fonts you need into that.

查看更多
登录 后发表回答