[reportlab-users] Japanese & other Asian character support

Simon simon at apricotwebsolutions.com
Wed Nov 3 13:09:29 EDT 2010


Hmm, I'm in exactly same position!

I chose Cyberbit font for the Japanese as it supports a wide range of
languages. But
its Latin is not Sans.

You can download Cyberbit from
http://aol-4.vo.llnwd.net/pub/communicator/extras/fonts/windows/
or
http://orwell.ru/test/download/

I'll probably use this technique. After looking at mwlib. Thank you Volker.

Ben do you have a function you can post?

Regards
Simon

On 14 October 2010 12:04, Volker Haas <volker.haas at brainbot.com> wrote:


>

>

> On 10/13/2010 06:45 PM, Benjamin Higgins wrote:

>

>> Andy,

>>

>> Excellent suggestion with breaking up the text with<font>s. I hadn't

>> thought of that. Thanks a lot!

>>

>> Ben

>>

> Hi Ben,

>

> I developed fontswitching for the mwlib project (PDFs from Wikipedia

> articles) in the same way Andy suggested above. If you like take a look at

> http://code.pediapress.com/wiki/wiki/mwlibrl

> This might be overkill, and the documentation isn't exactly great. But the

> "fontifyText" method in

> http://code.pediapress.com/git/mwlib.rl?p=mwlib.rl;a=blob;f=mwlib/rl/fontconfig.py;h=98737355a590e7c89c20b509dce59012a70d6d6f;hb=HEADdoes pretty much what you need.

>

> I can supply a minimal example how to use that if you think it's a viable

> route.

>

> Best,

> Volker

>

>

> On Wed, Oct 13, 2010 at 1:00 AM, Andy Robinson<andy at reportlab.com>

>> wrote:

>>

>>> On 12 October 2010 22:58, Benjamin Higgins<bhiggins at gmail.com> wrote:

>>>

>>>> I have a bunch of text that includes Latin *and* Japenese characters,

>>>> all intermixed (really!). It may also, someday, include other Asian

>>>> characters. I want the Latin characters in Helvetica and the Japanese

>>>> characters in whatever makes the most sense. Right now the Japanese

>>>> characters show up as black squares. How do I best approach this?

>>>>

>>>> The simplest approach for you would be to see if you can live with the

>>> Latin glyphs in the built-in Japanese fonts.

>>>

>>> Otherwise, you would need to scan through your paragraphs and break

>>> them into chunks based on the Unicode code points, using the<font>

>>> tag which can be embedded to switch fonts in mid-text.

>>>

>>> - Andy

>>> _______________________________________________

>>> reportlab-users mailing list

>>> reportlab-users at lists2.reportlab.com

>>> http://two.pairlist.net/mailman/listinfo/reportlab-users

>>>

>>> _______________________________________________

>> reportlab-users mailing list

>> reportlab-users at lists2.reportlab.com

>> http://two.pairlist.net/mailman/listinfo/reportlab-users

>>

>

> --

> volker haas brainbot technologies ag

> fon +49 6131 2116394 boppstraße 64

> fax +49 6131 2116392 55118 mainz

> volker.haas at brainbot.com http://www.brainbot.com/

>

>

> _______________________________________________

> reportlab-users mailing list

> reportlab-users at lists2.reportlab.com

> http://two.pairlist.net/mailman/listinfo/reportlab-users

>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/reportlab-users/attachments/20101103/676bda8d/attachment.html>


More information about the reportlab-users mailing list