Browse Source

Providing the Lato font along with the Package

Marcin Ziąbek 1 year ago
parent
commit
d6a0681bc6

+ 1 - 3
Source/QuestPDF/Drawing/FontManager.cs

@@ -74,9 +74,7 @@ namespace QuestPDF.Drawing
         private static void RegisterLibraryDefaultFonts()
         {
             var executionPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
-
-            var fontDirectory = Path.Combine(executionPath, "LatoFont");
-            var fontFilePaths = Directory.GetFiles(fontDirectory, "*.ttf");
+            var fontFilePaths = Directory.GetFiles(executionPath, "*.ttf", SearchOption.AllDirectories);
             
             foreach (var fileName in fontFilePaths)
             {

+ 0 - 0
Source/QuestPDF/Lato/Lato-Black.ttf → Source/QuestPDF/LatoFont/Lato-Black.ttf


+ 0 - 0
Source/QuestPDF/Lato/Lato-BlackItalic.ttf → Source/QuestPDF/LatoFont/Lato-BlackItalic.ttf


+ 0 - 0
Source/QuestPDF/Lato/Lato-Bold.ttf → Source/QuestPDF/LatoFont/Lato-Bold.ttf


+ 0 - 0
Source/QuestPDF/Lato/Lato-BoldItalic.ttf → Source/QuestPDF/LatoFont/Lato-BoldItalic.ttf


+ 0 - 0
Source/QuestPDF/Lato/Lato-ExtraBold.ttf → Source/QuestPDF/LatoFont/Lato-ExtraBold.ttf


+ 0 - 0
Source/QuestPDF/Lato/Lato-ExtraBoldItalic.ttf → Source/QuestPDF/LatoFont/Lato-ExtraBoldItalic.ttf


+ 0 - 0
Source/QuestPDF/Lato/Lato-ExtraLight.ttf → Source/QuestPDF/LatoFont/Lato-ExtraLight.ttf


+ 0 - 0
Source/QuestPDF/Lato/Lato-ExtraLightItalic.ttf → Source/QuestPDF/LatoFont/Lato-ExtraLightItalic.ttf


+ 0 - 0
Source/QuestPDF/Lato/Lato-Italic.ttf → Source/QuestPDF/LatoFont/Lato-Italic.ttf


+ 0 - 0
Source/QuestPDF/Lato/Lato-Light.ttf → Source/QuestPDF/LatoFont/Lato-Light.ttf


+ 0 - 0
Source/QuestPDF/Lato/Lato-LightItalic.ttf → Source/QuestPDF/LatoFont/Lato-LightItalic.ttf


+ 0 - 0
Source/QuestPDF/Lato/Lato-Medium.ttf → Source/QuestPDF/LatoFont/Lato-Medium.ttf


+ 0 - 0
Source/QuestPDF/Lato/Lato-MediumItalic.ttf → Source/QuestPDF/LatoFont/Lato-MediumItalic.ttf


+ 0 - 0
Source/QuestPDF/Lato/Lato-Regular.ttf → Source/QuestPDF/LatoFont/Lato-Regular.ttf


+ 0 - 0
Source/QuestPDF/Lato/Lato-SemiBold.ttf → Source/QuestPDF/LatoFont/Lato-SemiBold.ttf


+ 0 - 0
Source/QuestPDF/Lato/Lato-SemiBoldItalic.ttf → Source/QuestPDF/LatoFont/Lato-SemiBoldItalic.ttf


+ 0 - 0
Source/QuestPDF/Lato/Lato-Thin.ttf → Source/QuestPDF/LatoFont/Lato-Thin.ttf


+ 0 - 0
Source/QuestPDF/Lato/Lato-ThinItalic.ttf → Source/QuestPDF/LatoFont/Lato-ThinItalic.ttf


+ 0 - 0
Source/QuestPDF/Lato/OFL.txt → Source/QuestPDF/LatoFont/OFL.txt


+ 3 - 2
Source/QuestPDF/QuestPDF.csproj

@@ -3,7 +3,7 @@
         <Authors>MarcinZiabek</Authors>
         <Company>CodeFlint</Company>
         <PackageId>QuestPDF</PackageId>
-        <Version>2024.3.0-alpha</Version>
+        <Version>2024.3.0-internal53</Version>
         <PackageDescription>QuestPDF is an open-source, modern and battle-tested library that can help you with generating PDF documents by offering friendly, discoverable and predictable C# fluent API. Easily generate PDF reports, invoices, exports, etc.</PackageDescription>
         <PackageReleaseNotes>$([System.IO.File]::ReadAllText("$(MSBuildProjectDirectory)/Resources/ReleaseNotes.txt"))</PackageReleaseNotes>
         <LangVersion>10</LangVersion>
@@ -41,8 +41,9 @@
         
         <None Include="LatoFont\*.*">
             <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+            <CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
             <Pack>true</Pack>
-            <PackagePath>%(RecursiveDir)%(Filename)%(Extension)</PackagePath>
+            <PackagePath>runtimes\any\native\%(RecursiveDir)%(Filename)%(Extension)</PackagePath>
         </None>
         
         <None Include="Runtimes\**\*.*">