I noticed after the server upgrade yesterday that the wrap text in a PDFdocument is different now. It does not seem to span the width and follow the parameter for width
This is the correct wrapping before the server upgrade:
Sorry for the vagueness. This is on Xojo Cloud. Xojo version 2024 R1. Below is the email notification from Alyssa on 8/12 regarding the upgrade
On August 26th and 27th we will be upgrading all Xojo Cloud servers from CentOS 7 to AlmaLinux 9. In order to complete this upgrade, each Xojo Cloud server will experience a 1-2 hour period of downtime on August 26th or August 27th.
If you would like to schedule a specific window of time for this upgrade, please reply to this email before Thursday, August 22nd. We are happy to work with you to arrange a specific date and time that wonât interrupt your use of the server.
If we do not hear from you by Thursday, August 22nd, we will proceed with the upgrade on August 26th or 27th.
This upgrade allows Xojo to offer up-to-date security and improved performance for all Xojo Cloud users going forward. If you have any questions, please reply to this email for assistance.
I did see there were additional fonts added. Maybe that is a culprit. I do make the call in code to use g.FontName = âArialâ, and I have this font on my server. Nothing else with the document is messed up. Only the wrapping
From what I remember: in console apps, yes (long standing difference). Remember that this case the font is no longer on the server after update, it changed from âArialâ to âArialMTâ
Here is a response from Greg on my other post asking about the correct name to use. This function allowed me to see the names that are on the server. I had to build the test app to see the fonts on the server. Just debugging, it showed a ton more, but these were just fonts on my machine.
If you installed Times New Roman on your XC server, and that is the name of the font, you should be ok. In my case, I previously installed an Arial font. As Alberto said, prior to the upgrade, it mightâve been named âArialâ, but after the upgrade, it is named âArialMTâ. Thanks to Gregâs tip, I was able to see what the actual name was
If you donât install any, it looks like these are the fonts that were added:
Cantarell
Cantarell
Cantarell
Cantarell
DejaVu LGC Sans Mono
DejaVu LGC Serif
DejaVu LGC Serif
DejaVu Sans
DejaVu Sans
DejaVu Sans
DejaVu Sans Mono
Source Code Pro
Source Code Pro
Source Code Pro
Source Code Pro
Source Code Pro
Source Code Pro
Here is a screenshot my test app showing when g.FontName = âTimes New Romanâ (I do not have this installed on my server). Itâs the same result I saw when using âArialâ (not installed as âArialâ, rather as âArialMTâ, which did produce the correct result)
PDF readers are guaranteed to have those Standard (often called Core) fonts available: Helvetica, Times, etc. Itâs part of the specification and allows many PDFs to be smaller because they donât need to include those very commonly-used fonts.
However, in order to properly measure and lay out text, an application creating a PDF still needs to have access to the metrics for any font it wants to use if it wants to do anything more than the most basic text layout. Otherwise, thereâs no way to know how wide each character is, and thus no way to know how to wrap lines, etc. This means having the font installed on the system where the application is running.
It is also perfectly valid to write a PDF that references a font you donât have installed on your system. The PDF reader will search its own local resources for the font and if it cannot find it, it will use a generic substitution, usually with terrible (although possibly legible) results.