upcoming change to IFPainter.drawText()

2010-08-30 Thread Glenn Adams
Folks, I'd like to mention a change I will implement on IFPainter#drawText method in order to accommodate complex scripts (as well as non-complex script usage in a variety of written languages). I'm bringing this up now so there can be discussion ahead of time if needed. Basically, the change is

Re: upcoming change to IFPainter.drawText()

2010-08-30 Thread Glenn Adams
Perhaps it is useful to indicate how the existing dx[] adjustments map into the more generalized gpos[][] adjustments. Given a dx[] array or a gpos[][] array or neither, they are reconciled as follows: int[][] reconcileAdjustments(int[] dx, int[][] gpos) { if ( dx == null ) { return gpos;

Re: upcoming change to IFPainter.drawText()

2010-08-30 Thread Glenn Adams
Oops, that code snippet should read: int[][] reconcileAdjustments(int[] dx, int[][] gpos) { if ( dx == null ) { return gpos; } else { if ( gpos == null ) { gpos = new int[dx.length][4]; } for ( int i = 0; i < dx.length; i++ ) { int d = dx[i]; if ( *d* != 0 ) {

Re: upcoming change to IFPainter.drawText()

2010-08-31 Thread Vincent Hennebert
Hi Glenn, A dedicated class with meaningful fields (e.g., xPlacement, xAdvance) would probably be preferable to an array of 4 int. This would be safer and easier to understand and use. For the rest, that sounds good. Vincent Glenn Adams wrote: > Folks, > > I'd like to mention a change I will

Re: upcoming change to IFPainter.drawText()

2010-08-31 Thread Glenn Adams
Thanks, that's a good suggestion. I've been contemplating that for a while now. On Tue, Aug 31, 2010 at 9:24 PM, Vincent Hennebert wrote: > Hi Glenn, > > A dedicated class with meaningful fields (e.g., xPlacement, xAdvance) > would probably be preferable to an array of 4 int. This would be safer