Is there a way to be able to choose and embed a specific font on PDF ?
I have on my side set the Font as following :
Var d As New PDFDocument(PDFDocument.PageSizes.A4)
d.EmbeddedFonts = True
g.DrawingColor = Color.Black
g.FontName = "Al Tarikh"
g.DrawText(titleAr, 105, 330, 350)
But unfortunately I have either “???” as text or nothing is showing .
I did tried to copy and embed the fonts on the app as well and nothing happens.
There are plugins from Einhugur and MBS that support PDF by making use of libraries that implemented things correctly. Xojo just made the format up as they went along in Xojo code, making their PDF engine weak, unreliable, and slow.
Unicode & complex script support in PDF is not trivial. Xojo may be working on it as we speak but I imagine they won’t be able to get close to the functionality of a dedicated PDF library.
Your best bet is to use a plugin or declare into a 3rd party library (the MBS & Einhuger plugins are mainly wrappers for two of the libraries out there). If you switch to another development environment you may find that it is just using one of the libraries that you seem to be trying to avoid.
The original poster knows, and anyone working in certain non-Latin languages will know what I’m talking about. Arabic is written right-to-left – opposite of most scripts – and specific support for this has to be built in to any system that images text. It doesn’t just happen.
LOL. OK, let me rephrase the question, since I can’t find this information anywhere: WILL Xojo’s PDFDocument support include right-to-left script support? Is that in the development plan/on the roadmap?
I don’t expect you to answer if you don’t know, but it’s a good question to ask.