Font with number in name gets wrong size
Original Reporter info from Mantis: cobines
-
Reporter name:
Original Reporter info from Mantis: cobines
- Reporter name:
Description:
For example there is a font Vemana2000.
When setting this font to a control the size is permanently set to 2000.
In function FontNameToPangoFontDescStr() nested GetSize treats the 2000 as the font size.
Maybe a space between the font name and font size should be required. For example: "Vemana2000 10" would set font size to 10.
Vemana2000 can be downloaded from:
http://www.kavya-nandanam.com/dload.htm.old
Steps to reproduce:
- Run example.
- Press "Set Memo1.Font name" button to set font to Vemana2000. Text in Memo1 will seem to have disappeared but it just has a very big size.
- Press "Show Memo1.Font info". "Sometext cx, cy" describe TextExtent of "Sometext" and are rather large numbers (for me cx=12828, cy=3105). Size returned by Pango is large too (2048000 for me).
- Press "Set Memo1.Font size" to set the font size to 20 - it won't work. The Font.Size is now 20 but TextExtent and Pango still return the same size (as if it was set to 2000 permanently).