Problem with struct font_misc_info

Tony van der Hoff tony at mk-net.demon.co.uk
Sun Feb 24 16:22:55 GMT 2002


On 24 Feb 2002, in message <b759e30d4b.sbrodie at usr-offsite-75.cam.pace.co.uk>,
Stewart Brodie <stewart.brodie at pace.co.uk> wrote:

> In message <b2f8ddd4b%alex at thouky.co.uk> you wrote:
> 
> > OSLib defines the miscellaneous font metrics information structure
> > (returned by Font_ReadFontMetrics) as:
> 
> > i.e. a 52 byte block rather than a 28 byte one.
> > 
> > The OSLib definition does appear to match that specified in the PRMs
> > (3-478), but that isn't terribly helpful when the font manager returns
> > something different.
> > 
> > Preumably, either the PRM information was always wrong, or (more likely)
> > the behaviour changed in a later release of RISC OS. I'm guessing that
> > someone working on the font manager changed an internal data structure to
> > improve efficiency and didn't realise the knock-on effects.
> 
> Yes - the PRMs are wrong as they show the organisation of the data as it
> appears in the IntMetrics file and not in the block returned by this SWI. 
> Effectively, all the shorts are actually 32-bit ints.  It is likely that
> the information was always wrong.
> 
Ah, thanks for for pointing out the problem, Alex, and for the clarification,
Stewart. Amazingly, I have a note in my PRM of exactly this problem, which I
guess must pre-date my taking on the maintenance of OSLib :-(

Anyway, I guess this is a bug; no need to retain a compatible structure/call? 

-- 
Tony van der Hoff         | MailTo:tony at mk-net.demon.co.uk
                          | MailTo:avanderhoff at iee.org
Buckinghamshire, England  | http:www.mk-net.demon.co.uk



More information about the oslib-user mailing list