View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0031674 | Lazarus | Widgetset | public | 2017-04-17 21:46 | 2017-04-19 21:50 |
Reporter | Anton Kavalenka | Assigned To | Juha Manninen | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | i386 | OS | Linux | ||
Product Version | 1.7 (SVN) | ||||
Summary | 0031674: gtk2: DrawText implementation DT_NOPREFIX faulty handling | ||||
Description | TLabel with ShowAccelChar=true always cause GTK2 to complain in console: project1:11848): Pango-[1;33mWARNING[0m **: Invalid UTF-8 string passed to pango_layout_set_text() This happens only with cyrillic text prefixed with ampersand & | ||||
Steps To Reproduce | Run the attached project. GTK2 complains only on '&Привет' caption but not on '&__Привет' | ||||
Tags | No tags attached. | ||||
Fixed in Revision | r54633 | ||||
LazTarget | - | ||||
Widgetset | GTK 2 | ||||
Attached Files |
|
related to | 0031677 | closed | Zeljan Rikalo | gtk3: Can not link GTK3 application, non-existent symbol imported |
|
|
|
Seems like gtk2winapi.inc:2661 Calculating the underscore line length GetTextExtentPoint(DC, @aStr[pIndex], 1, Points[1]); Points[1].cX := Points[0].cX + Points[1].cX; Points[1].cY := Points[0].cY; Cyrillic symbol at position 1 is obviously not 1-byte in size. It is definitely wrong UTF8. |
|
I replaced this ln to GetTextExtentPoint(DC, @aStr[pIndex], UTF8CharacterLength(@aStr[pIndex]), Points[1]); and error gone.. |
|
Is the problem only with GTK2? |
|
|
|
Same problem in GTK3 gtk3winapi.inc:921 GetTextExtentPoint(DC, @aStr[pIndex], 1, Points[1]); Btw GTK3 WS can not be linked. There is no such symbol gdk_pixbuf_gettext in libgdk_pixbuf-2.0.so.0 Reported in 0031677 |
|
Fixed both GTK2 and GTK3, please test. |
Date Modified | Username | Field | Change |
---|---|---|---|
2017-04-17 21:46 | Anton Kavalenka | New Issue | |
2017-04-17 21:46 | Anton Kavalenka | File Added: laztest102.zip | |
2017-04-17 22:12 | Anton Kavalenka | Note Added: 0099649 | |
2017-04-18 08:22 | CudaText man | Note Added: 0099660 | |
2017-04-18 13:58 | Juha Manninen | Assigned To | => Juha Manninen |
2017-04-18 13:58 | Juha Manninen | Status | new => assigned |
2017-04-18 13:59 | Juha Manninen | Note Added: 0099667 | |
2017-04-18 18:09 | Anton Kavalenka | File Added: Здымак экрана, 2017-04-18 19-10-08.png | |
2017-04-18 18:11 | Anton Kavalenka | Note Added: 0099672 | |
2017-04-18 18:19 | Anton Kavalenka | Note Edited: 0099672 | View Revisions |
2017-04-18 18:25 | Anton Kavalenka | Note Edited: 0099672 | View Revisions |
2017-04-18 19:15 | Juha Manninen | Relationship added | related to 0031677 |
2017-04-18 20:12 | Juha Manninen | Fixed in Revision | => r54633 |
2017-04-18 20:12 | Juha Manninen | LazTarget | => - |
2017-04-18 20:12 | Juha Manninen | Note Added: 0099673 | |
2017-04-18 20:12 | Juha Manninen | Status | assigned => resolved |
2017-04-18 20:12 | Juha Manninen | Resolution | open => fixed |
2017-04-19 21:50 | Anton Kavalenka | Status | resolved => closed |