Font.Bold not honoured, after Font.Style
Original Reporter info from Mantis: Martin @martin_frb
-
Reporter name: Martin Friebe
Original Reporter info from Mantis: Martin @martin_frb
- Reporter name: Martin Friebe
Description:
put the code below in a forms OnPaint event (tested on w32)
Both lines are shown none bold.
The reason is that:
Canvas.Font.Style := [];
does not update FFlags in TFPCanvasHelper (base of TFont)
Therefore Flags are stil 32 (bold). But Style is [] (none bold)
TextRect honours Style.
But
Canvas.Font.Bold := True;
checks against Flags. So it believes wrongly, that nothing needs to be changed.
Additional information:
Canvas.Font.Bold := True;
Canvas.Font.Style := [];
Canvas.TextRect(ClientRect, 11, 11, 'Test');
Canvas.Font.Bold := True;
Canvas.TextRect(ClientRect, 11, 33, 'bold');
Mantis conversion info:
- Mantis ID: 17930
- Version: 0.9.29 (SVN)
- Fixed in version: 0.9.29 (SVN)
- Fixed in revision: 28268 (#8890b2e2)
- Target version: 0.9.30