Victor Mote wrote (August 27, 2005):

> > > In order to move forward, I suggest the addition of the following 
> > > methods in
> > > org.axsl.font.Font:
> > > 
> > >     public byte nextBolderWeight();
> > >     public byte nextLighterWeight();
> > >     public org.axsl.font.Font nextBolderFont();
> > >     public org.axsl.font.Font nextLighterFont();

...

> > > There is another area complexity in font selection that 
> has not yet 
> > > been addressed, so I pose it here to Vincent and Manuel 
> especially, 
> > > and to any others who wish to comment. The whole issue of
> > whether the
> > > Font has a glyph for the character(s) has not yet been
> > addressed. The
> > > best idea I have for this is as follows:
> > > 
> > > 1. Add a char to the signature of
> > org.axsl.font.FontServer.selectFont. 
> > > This char represents the first char of the text for which
> > the font is
> > > being selected. This allows the selection process to pass by a 
> > > font-family if it cannot paint the character.

...

> > > 2. Add the following method to org.axsl.font.Font:
> > >     /**
> > >      * Examines each character in string to ensure that a
> > glyph exists
> > > in the font for that
> > >      * character. If a character has no glyph in the font, the 
> > > character's index in string
> > >      * is returned.
> > >      * @return The index in string of its first character
> > for which no
> > > glyph exists in this
> > >      * font. If all characters in the string have glyphs in
> > this font,
> > > -1 is returned.
> > >      */
> > >     public int unavailableChar(String string);
> > > 
> > >     Add also an overridden version of this method with
> > char[] as the
> > > parameter.
> > 
> > Why not directly return an array of all indexes where there is a 
> > missing glyph?
> 
> OK. Probably in a separate method called unavailableChars.
> 
> > Or add a beginIndex parameter so that one doesn't have to 
> artificially 
> > recreate a String made of the initial String minus all 
> characters up 
> > to the first missing glyph?
> 
> Yes. That definitely needs to be there.

The following methods have now been added to org.axsl.font.Font:
    public byte nextBolderWeight() ;
    public byte nextLighterWeight() ;
    public Font nextBolderFont() ;
    public Font nextLighterFont() ;

    public int unavailableChar(String string, int beginIndex) ;
    public int unavailableChar(char[] chars, int beginIndex) ;
    public int[] unavailableChars(String string, int beginIndex) ;
    public int[] unavailableChars(char[] chars, int beginIndex) ;

and a char has been added to the signature of the method
org.axsl.font.FontServer.selectFont.

Stub implementations have been created in FOray, but the added functionality
is, in general, not actually in place yet. I'll get to that as I am able,
but at least those working with the interface can move forward when they are
ready.

Victor Mote

Reply via email to