DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=39422>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=39422 [EMAIL PROTECTED] changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[EMAIL PROTECTED] ------- Additional Comments From [EMAIL PROTECTED] 2006-04-28 00:37 ------- (In reply to comment #5) Hi Max: > I've added a tracker item for axsl > http://sourceforge.net/tracker/index.php? func=detail&aid=1478049&group_id=123259&atid=695974 I am responding to the aXSL request here so that I can pick up the existing thread. The aXSL methods you are looking for are: FontUse boolean glyphAvailable(int codePoint) FontUse int unavailableChar(CharSequence chars, int beginIndex) FontUse int[] unavailableChars(CharSequence chars, int beginIndex) These methods are in FontUse instead of Font so that we can properly deal with Encoding issues, mostly for Type1 fonts. FontUse is the intersection of a Font, a FontConsumer, and an Encoding. FontUse instances are what get returned by the font-selection methods. For a glyph to be usable by your application, it must both 1) be available in the font, and 2) encodable by the font's encoding. > so my "dirty hack" solution would be: > - if glyph is not in font, go through list of all fonts until you find a font that has this glyph, use it > instead. > a good solution would be: > - get a list of all fonts supporting that glyph. Find the one that is the "best match". use it. This might be permissible under font-selection-strategy="auto", but I rather think would only be permissible as a fallback. What you probably really want is to implement the font-selection-strategy="character-by-character". The font- selection methods in aXSL require one codepoint to be passed, presumably the first codepoint that needs to be encoded. Then, using the methods noted above, your application needs to determine whether the remaining text can use the same font. If not, the font-selection method needs to be consulted again, this time passing the codepoint that is not served by the first font selected. IIRC, the last time I looked at FOP code, it took the first font-family in the list and used it for all text within scope, simply using a # glyph if the desired glyph was not available. I think Vincent is working on changing that, but I don't monitor the FOP lists, and don't know the status. When I implemented this in FOray, the hard part was not the algorithm, but finding the place to store its results. Either the FOTree or AreaTree has to know how to segment a chunk of text based on font selection. So, although the font system provides tools that are needed for the correct algorithm, it doesn't have any control over whether the correct algorithm is used. Since the XSL-FO "font-family" property is really a *list*, to ensure that you get a sigma character, you might say font-family="Base14-Helvetica, Base14- Symbol". Assuming the other font-selection criteria allow it, your sigma character would then be handled by the Base14-Symbol font. HTH. Victor Mote -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
