Ticket #212 (Fixed)Tue Jul 21 14:57:19 UTC 2009
ScrollList_SetFont and TextArea_SetFont don't accept a font handle (only an identifier).
Reported by: | Christopher Bazley (288) | Severity: | Enhancement |
Part: | RISC OS: Module | Release: | |
Milestone: | Status | Fixed |
Details by Christopher Bazley (288):
The TextGadgets module provides two methods ScrollList_SetFont and TextArea_SetFont, which are analogous to the (undocumented) methods that the Window module provides to set the text font for displaying gadgets of type ActionButton, RadioButton, DisplayField, WritableField, StringSet or Button.
Unlike the methods provided by the Window module, the TextGadgets module does not interpret values of R4 less than 256 as raw font handles. Instead, it will pass such values directly to SWI Font_FindFont, which treats them as a pointer to a font identifier string and reads garbage from zero page until encountering a control character.
Although the ScrollList_SetFont and TextArea_SetFont methods are not broken in this respect, it seems reasonable to expect them to behave like the equivalent methods provided for inbuilt gadget types. We should attempt to harmonise behaviour of the TextGadgets and Window modules as far as possible.
Changelog:
Modified by Jeffrey Lee (213) Sat, June 25 2011 - 22:41:04 GMT
- Status changed from Open to Fixed
This should be fixed in TextGadgets 0.32; ScrollList_SetFont and TextArea_SetFont should now behave the same as the corresponding methods in the Windows module.