It's working and there is spacing in the text now which looks better but ami_font_bm_open() must be called several thousand times, often many times for the same font and size in a row. This makes it slow with netsurf -v to display all the output but maybe it will be alright without -v.
It's always going to be slower with -v anyway.
OpenDiskFont caches the fonts, my usual code does caching itself but here it's more complicated (due to having to open the right combination of font, size and flags) and I figured it was unnecessary.
I've been trying to track down the menu "Browser->Find text" bug which is caused by a NULL pointer which is then put on the stack and used by an RTS deep inside intuition.library. What ever happened to simple hits in the executable? I guess this is what happens when back porting to an OS which is missing the new APIs and support.
Edit: I have one lead pointing to the "Browser->Find text" bug being in amiga/menu.c ami_menu_item_browser_find(), It would be the GetAttr() call that has the hit and then guru in intuition.library. The NULL pointer may be at an offset of 8 from a structure (maybe a private struct). I would have to catch before the GetAttr() call if you need more info on arguments passed.
That GetAttr is used in a lot of the menu options - eg. Show Local History does it too. I can't believe there's anything wrong with that, it's only getting the WINDOW_UserData value.
Edit: actually this is probably a 68k registers thing too, it'll take me a while to get through these.
Scrolling the display window with the keyboard works but not the proportional gadgets which give NetSurf debugging messages like:
amiga/gui.c ami_scroller_hook 5168: IDCMP hook unhandled event: 0
OK, I think that's a 68k registers thing. I've probably fixed it. I'll hold off uploading new builds for the minute until I merge the bitmap fonts stuff across.