Bonjour,
As said in the title, I see a difference of line thickness between texts on screen and texts printed or saved as pdf with some fonts, example :
View larger image to see more the differences.
I use g.DrawText to display texts.
With the same texts, there is no difference with Pages.
Is that a bug? or it is me?
Thanks.
Hi @Eric_Pousse
PDF text drawing is as close as possible to the text you seen on screen; still, as you pointed out, there are some differences.
Difficult to see what you describe, since apparently what you posted is only the PDF. A side by side comparison would be way more relevant.
As a font specialist, what I see is normal. The line under the text indeed gets bolder relative to the font bold attribute.
Note that what you see on screen is an approximation, whereas PDF produces a very accurate representation, akin to what a laser printer would produce.
Michel,
It is a side by side comparison.
The left is a screen shoot put on the pdf.
View larger image to see more the differences.
With Pages there is no difference.
The issue could be due to the way underline is synthesized. Underline is not coded in the font, so this task resorts to the imager.
Instead of looking at the PDF on screen, you may want to print it. Make sure to use Acrobat Reader to do so.
Thank you Javier to respond.
And will this differences be corrected?
Who would you expect to do the ācorrectionā?
Once data is in a PDF, the way it is rendered is down to the PDF viewer.
There are differences between the way Preview on a Mac, Adobe, and Foxit (to name a few) preview or render PDFs that I create.
Iāve seen many cases where Foxit will display aspects of a PDF that Preview does not, for example
And if you then print, you sometimes hand over rendering to the printer driver, adding another layer of variance.
(to speed things up, some printers use an internal copy of common fonts such as Times and Arial, instead of taking bitmap data from the originator)
If you want full control of that line thickness, maybe donāt āunderline the lettersā, but draw a line of the thickness you want using PDF line drawing commands?
1 Like
Jeff,
I donāt want a particular thickness for the underline.
I want the line to have the same thickness in print as on screen.
Because for both, I use the same Xojo command.
The screen has a resolution of up to 216 dpi on current screens. Print commonly uses resolutions of 1200 dpi.
Screen will show only an approximation. It is pretty impossible to have exactly the same rendition as on paper.
What you see is not a bug.
1 Like
With the same fonts, there is no difference between screen and pdf with Pagesā¦
In my example, some differences are big.
It is probably possible to do better.
OK. So how does it matter, really ?
How is that difference a show stopper ?
It is not a show stopper.
With some fonts, there is no difference.
It is just an information āpour faire avancer le schmilblickā 
Font technology is not as evident as you seem to believe. Each platform has its own way to image fonts.
Years ago, I had an order for a set of fonts that would display exactly the same on Mac and Windows. It took a lot of work to actually get that.