Hi Vincent: > I've encountered a first little difficulty in adapting > FOrayFont to Fop. In > render.pdf.PDFRenderer.renderCharacter(Character) a switch is > used to escape text differently whether the font is multibyte or not. > The method used to know that is the Typeface.isMultiByte() > method. There is no such method in aXSL Font but there is a > getFontComplexity method that returns SIMPLE or COMPOSITE. > I'm afraid I don't know anything about font formats. But I > guess that Composite refers to CID fonts? In fact, where in
IIRC, in the FOP maintenance branch (and probably the trunk also) TTF = CID = Multibyte. Those three concepts are really not equal, and they needed to pulled apart. Probably this change is related to the clarifications surrounding that. > Fop the isMultiByte() test is used, in FOray this is the > getFontComplexity method. Apart from that code fragments are > pretty much the same. It also appears that only CIDFont's > isMultiByte method returns true. > So can someone confirm that I can use getFontComplexity() > wherever I find isMultiByte()? Almost certainly so. In FOray this code lives in PDFString, method addCharToBuffer(StringBuffer buffer, char ch): http://cvs.sourceforge.net/viewcvs.py/foray/foray/foray-pdf/src/java/org/for ay/pdf/object/PDFString.java?view=markup Probably the most efficient way to proceed is to go with your assumption for now and take another look at it if something doesn't work at the end. Victor Mote
