TTMSFMXPDFLib : include fonts on Android

I build PDF at runtime on Windows, OSX, IOS and Android.



Only on Android, the font I use (Lato) isn't included in the pdf.



On GUI, the font is used properly (so it's available on the sytem).



The font is deployed in : .\assets\internal



Any idea is welcomed...



Christian

Hi,


On Android, only system installed fonts are supported. You'l need to install the font on the device itself in order for the PDFDocument to pick it up.

Thanks for your answer.



I did the stuff like it's described here :



https://www.tmssoftware.com/site/forum/forum_posts.asp?TID=5067&title=pdf-export-on-android-font-deployment



Fonts are available on controls with :

TextSettings.Font.Family:= System.ioutils.tpath.Combine(System.ioutils.TPath.Combine(System.ioutils.TPath.GetDocumentsPath, 'Fonts'), 'Lato-Regular.ttf');



But if I do the same in the PDF Library :



FontName:= System.ioutils.tpath.Combine(System.ioutils.TPath.Combine(System.ioutils.TPath.GetDocumentsPath, 'Fonts'), 'Lato-Regular.ttf');



or

FontName := 'Lato-Regular.ttf'

or

FontName := 'Lato-Regular'



it doesn't include the files, and doesn't print with the font.



Any help would be very appreciated, or some piece of code.



Regards



Christian





Hi, 


The font is available in FMX as this is installed at deploytime for the application, but the PDF rendering engine uses a native approach, which doesn't include custom TTF font loading. To make sure the PDF rendering engine uses the font that is assigned to the fontname, you'll need to install the font on the Android device itself.

Bad news



Thanks