mirror of
https://github.com/Nioux/AideDeJeu.git
synced 2025-10-29 22:45:44 +00:00
Patch génération pdf : problème avec font custom
This commit is contained in:
parent
72f450dab9
commit
f45537e3b0
1 changed files with 4 additions and 2 deletions
|
|
@ -137,7 +137,8 @@ namespace AideDeJeu.Pdf
|
|||
string fontPath = fontName;
|
||||
if(Xamarin.Essentials.DeviceInfo.Platform != Xamarin.Essentials.DevicePlatform.Unknown)
|
||||
{
|
||||
fontPath = Path.Combine(Xamarin.Essentials.FileSystem.CacheDirectory, fontPath);
|
||||
fontPath = Path.Combine(Xamarin.Essentials.FileSystem.AppDataDirectory, fontPath);
|
||||
//fontPath = Path.Combine(Xamarin.Essentials.FileSystem.CacheDirectory, fontPath);
|
||||
}
|
||||
using (var inFont = AideDeJeu.Tools.Helpers.GetResourceStream($"AideDeJeu.Pdf.{fontName}"))
|
||||
{
|
||||
|
|
@ -148,7 +149,8 @@ namespace AideDeJeu.Pdf
|
|||
}
|
||||
FontFactory.Register(fontPath);
|
||||
|
||||
return iTextSharp.text.pdf.BaseFont.CreateFont(fontPath, iTextSharp.text.pdf.BaseFont.IDENTITY_H, iTextSharp.text.pdf.BaseFont.EMBEDDED);
|
||||
//return iTextSharp.text.pdf.BaseFont.CreateFont(fontPath, iTextSharp.text.pdf.BaseFont.IDENTITY_H, iTextSharp.text.pdf.BaseFont.EMBEDDED, true, null, null, true, true);
|
||||
return iTextSharp.text.pdf.BaseFont.CreateFont();
|
||||
}
|
||||
|
||||
BaseFont _CinzelRegular = null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue