[jboss-user] [JBoss Seam] - Re: problem with unicodes in itext
srmo642002
do-not-reply at jboss.com
Wed Nov 14 07:18:13 EST 2007
you must manipulate UIFont class locatet in org.jboss.seam.pdf.ui;
| private BaseFont getFont(String familyName) {
| try {
| return BaseFont.createFont("c:/windows/fonts/" + familyName + ".ttf",
| BaseFont.IDENTITY_H, BaseFont.EMBEDDED);
| } catch (Exception e) {
| e.printStackTrace();
| try {
| return BaseFont.createFont("d:/windows/fonts/" + familyName + ".ttf",
| BaseFont.IDENTITY_H, BaseFont.EMBEDDED);
| } catch (Exception e1) {
| e1.printStackTrace();
| }
| }
| return null;
| }
|
| @Override
| public void createITextObject(FacesContext context) {
| familyName = (String) getAttributes().get("familyName");
| if (familyName == null || familyName.equals(""))
| familyName = "nazanin";
| //int family = (familyName==null) ? Font.UNDEFINED : Font.getFamilyIndex(familyName);
| size = (Integer) valueBinding(context, "size", size);
|
| font = new Font(getFont(familyName), size);
| font.getBaseFont().correctArabicAdvance();
|
| style = (String) valueBinding(context, "style", style);
| if (style != null) {
| font.setStyle(style);
| }
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4104512#4104512
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4104512
More information about the jboss-user
mailing list