GTK2 Font underline bug
Original Reporter info from Mantis: tsapi
-
Reporter name: Tsvetoslav
Original Reporter info from Mantis: tsapi
- Reporter name: Tsvetoslav
Description:
Currently, selecting "underline" option does not have any effect on GTK2 applications ( for example, in Lazarus IDE go to Environment | Options...| Editor | Colors and check "underline" option for whichever element you want - it does not have effect).
After some investigation I found that the problem is in
"lcl/interfaces/gtk2/gtk2winapi.inc" file, function TGtk2WidgetSet.CreateFontIndirectEx - a call to pango_layout_set_attributes is missing, i.e. between
Attr := pango_attr_strikethrough_new(LogFont.lfStrikeOut<>0);
pango_attr_list_change(AttrList, Attr);
and
if AttrListTemporary then
pango_attr_list_unref(AttrList);
you must add
pango_layout_set_attributes(CurFont, AttrList);
to make the "Underline" and "StrikeOut" options work properly.
Mantis conversion info:
- Mantis ID: 15237
- OS: Linux
- OS Build: Ubuntu 9.10
- Platform: i386
- Version: 0.9.29 (SVN)
- Fixed in revision: 23038 (#38e5fefe)
- Monitored by: » @flyingsheep (Bart Broersma)
- Target version: 0.9.30