View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0026624 | Lazarus | Printer | public | 2014-08-23 22:28 | 2014-08-27 21:30 |
Reporter | Jkey | Assigned To | Jesus Reyes | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | Linux x86-64 gtk2 | OS | Linux Mint | OS Version | 13 Maya MATE |
Product Version | 1.2.4 | Product Build | |||
Target Version | 1.4 | Fixed in Version | 1.3 (SVN) | ||
Summary | 0026624: Underlined text printing bug - Linux | ||||
Description | Underlined texts are not printed using Lazarus 1.2.4. Text part is visible, but fsUnderline properly is omitted, however, e.g. fsBold prints properly. Using the same Linux environment, former Lazarus 1.0.14 did print underlined texts as expected. Described error does not exists under win32. This has an impact on printed reports of Lazreport and maybe many other components which have printing features. | ||||
Steps To Reproduce | 1. Open a new project. 2. Put a Button1 on Form1. 3. Add Printers unit to uses section. 4. Add Printer4lazarus as a new requirement to the project. 5. Add this Button OnClick event: (source: "Using the Printer" wiki page) procedure TForm1.Button1Click(Sender: TObject); const LEFTMARGIN = 100; HEADLINE = 'This should be not only bold, but underlined too '; var YPos, LineHeight, VerticalMargin: Integer; SuccessString: String; begin with Printer do try BeginDoc; Canvas.Font.Name := 'Courier New'; Canvas.Font.Size := 10; Canvas.Font.Color := clBlack; Canvas.Font.Style := [fsBold, fsUnderline]; //Inserted line to reproduce bug LineHeight := Round(1.2 * Abs(Canvas.TextHeight('I'))); VerticalMargin := 4 * LineHeight; // There we go YPos := VerticalMargin; SuccessString := HEADLINE + DateTimeToStr(Now); Canvas.TextOut(LEFTMARGIN, YPos, SuccessString); finally EndDoc; end; end; 6. Run it, and after clicking the button the text is printed out to the default printer as bold, but without underline. | ||||
Additional Information | Possibly the updated Printer4lazarus package causes the issue. It used to work with Lazarus 1.0.14. | ||||
Tags | No tags attached. | ||||
Fixed in Revision | 46077 | ||||
LazTarget | 1.4 | ||||
Widgetset | GTK 2 | ||||
Attached Files |
|
|
Does it happen with any canvas when using GTK2 or just Printer.Canvas? |
|
I tried with the canvas of a TImage. It works as expected and shows the underline. |
|
Fixed, please test. |
|
Yes, it works. Even the fsStrikeOut property works as expected, thanks. Ticket can be closed. |
|
Issue solved. |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-08-23 22:28 | Jkey | New Issue | |
2014-08-24 12:02 | Juha Manninen | LazTarget | => - |
2014-08-24 12:02 | Juha Manninen | Note Added: 0076692 | |
2014-08-24 12:02 | Juha Manninen | Status | new => feedback |
2014-08-24 15:02 | Jkey | Note Added: 0076694 | |
2014-08-24 15:02 | Jkey | Status | feedback => new |
2014-08-26 00:48 | Jesus Reyes | Assigned To | => Jesus Reyes |
2014-08-26 00:48 | Jesus Reyes | Status | new => assigned |
2014-08-26 03:20 | Jesus Reyes | Fixed in Revision | => 46077 |
2014-08-26 03:20 | Jesus Reyes | LazTarget | - => 1.4 |
2014-08-26 03:20 | Jesus Reyes | Note Added: 0076719 | |
2014-08-26 03:20 | Jesus Reyes | Status | assigned => resolved |
2014-08-26 03:20 | Jesus Reyes | Fixed in Version | => 1.3 (SVN) |
2014-08-26 03:20 | Jesus Reyes | Resolution | open => fixed |
2014-08-26 03:20 | Jesus Reyes | Target Version | => 1.4 |
2014-08-27 21:29 | Jkey | Note Added: 0076751 | |
2014-08-27 21:30 | Jkey | Note Added: 0076752 | |
2014-08-27 21:30 | Jkey | Status | resolved => closed |