Oecn_base_fonts 使用说明(解决v.7.0,v6.1,V6.0.x的PDF中文字体方框问题,支持CJK语言)
- 
oecn_base_fonts_config.py文件中两段代码是无效的:         env = {<br />            'windir': os.environ.get('windir', os.getcwd()),<br />            'home': os.environ.get('HOME', os.getcwd()),<br />            }<br />        FontFolders = [<br />            '%(windir)s/Fonts',<br />            '/usr/share/fonts',<br />            '%(home)s/tmp/corefonts',<br />            ]<br />        folders = [ s % env for s in FontFolders]<br />
 以及        fontdirs = folders[:]<br />        for ele in folders:<br />            for root, dirs, files in os.walk(ele):<br />                for name in dirs:<br />                    fontdirs.append(os.path.join(root, name))<br />
 reportlab的字体搜索路径是由reportlab.rl_config中的T1SearchPath和TTFSearchPath定义的,这个两个变量根据reportlab/rl_config.py文件中的定义和处理在reportlab载入时自动检测得到有效的字体搜索路径。在这些搜索路径之外的字体,根本不能被搜索到。因此此处代码只需要如下形式即可:        fontdirs = rl_config.T1SearchPath[:]<br />        fontdirs.extend(rl_config.TTFSearchPath)<br />
 如果需要载入其他路径的字体,必须修改reportlab/rl_config.py中的定义。
- 
楼上请加入这个组 
 <br / https://launchpad.net/~openerp-chinese-team br />
 不仅能参与讨论而且有权限共为维护这些本地化模块。
- 
[quote author=mrshelly link=topic=2791.msg9409#msg9409 date=1330838878] 
 不错....
 要是把 中文字体名的问题一并解决了. 就完美了....
 [/quote]
 [size=12pt]我这里真是举步维艰,按照上面的方法试了一次,大功告成。这几天重装了一次,再做以上设置就不行了。设置是做了,也生效了。出来的字还是黑方块哦[/size]

