diff --git a/changelogs/unreleased/fix-birt-custom-font-support.yml b/changelogs/unreleased/fix-birt-custom-font-support.yml new file mode 100644 index 0000000000..a6bfe667a0 --- /dev/null +++ b/changelogs/unreleased/fix-birt-custom-font-support.yml @@ -0,0 +1,3 @@ +--- +title: "Birt: Custom font support" +type: fix diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 92dc5245c5..d7ef911b8b 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -120,7 +120,10 @@ axelor.report.resource.path = reports.design.dir = {user.home}/data/reports # Reports custom fonts path -reports.fonts.config = fonts/ReportFonts.xml +# if file is not found then birt will use its own font +# if this property is commented then framework will use its own font +# sample of this file is there at fonts/sample/fontsConfig.xml +reports.fonts.config = {user.home}/fontsConfig.xml # Enable/disable demo data # ~~~~~ diff --git a/src/main/webapp/fonts/ReportFonts.xml b/src/main/webapp/fonts/ReportFonts.xml deleted file mode 100644 index a10c60ff40..0000000000 --- a/src/main/webapp/fonts/ReportFonts.xml +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - <band height="782"> - <staticText> - <reportElement x="0" y="50" width="150" height="40" - uuid="67cc85d2-1691-441c-8ed6-b65c59f98fbc"/> - <text><![CDATA[The quick brown fox jumps over the lazy dog.]]></text> - </staticText> - <staticText> - <reportElement x="160" y="50" width="390" height="40" - uuid="e0d254ad-1e47-4792-b380-f7afc5e4faa5"/> - <text><![CDATA[<staticText><reportElement x="0" y="50" width="150" height="40"/><text>The quick brown fox jumps over the lazy dog.</text></staticText>]]></text> - </staticText> - <staticText> - <reportElement x="0" y="100" width="150" height="40" - uuid="3c5505db-55e9-4aca-ad3a-ae92898ba1bb"/> - <textElement> - <font size="12"/> - </textElement> - <text><![CDATA[The quick brown fox jumps over the lazy dog.]]></text> - </staticText> - <staticText> - <reportElement x="160" y="100" width="390" height="40" - uuid="7d953de8-7629-4138-a296-dfe463cba691"/> - <text><![CDATA[<staticText><reportElement x="0" y="100" width="150" height="40"/><textElement><font size="14"/></textElement><text>The quick brown fox jumps over the lazy dog.</text></staticText>]]></text> - </staticText> - <staticText> - <reportElement x="0" y="150" width="150" height="40" - uuid="2a2117f5-ea77-409f-a44c-9fd0551f8862"/> - <textElement> - <font fontName="Lobster Two" size="12"/> - </textElement> - <text><![CDATA[The quick brown fox jumps over the lazy dog.]]></text> - </staticText> - <staticText> - <reportElement x="160" y="150" width="390" height="40" - uuid="39ce42dd-d5fa-43dd-a0de-de90b9e4b977"/> - <text><![CDATA[<staticText><reportElement x="0" y="150" width="150" height="40"/><textElement><font fontName="Lobster Two" size="12"/></textElement><text>The quick brown fox jumps over the lazy dog.</text></staticText>]]></text> - </staticText> - <staticText> - <reportElement x="0" y="200" width="150" height="40" - uuid="3828a320-c835-4eed-98d2-e6cb0324817b"/> - <textElement> - <font fontName="Lobster Two" size="12" isBold="true" isItalic="true"/> - </textElement> - <text><![CDATA[The quick brown fox jumps over the lazy dog.]]></text> - </staticText> - <staticText> - <reportElement x="160" y="200" width="390" height="40" - uuid="441f2d58-78bf-413b-bc9b-dd7d1713c1a6"/> - <text><![CDATA[<staticText><reportElement x="0" y="200" width="150" height="40"/><textElement><font fontName="Lobster Two" size="12" isBold="true" isItalic="true"/></textElement><text>The quick brown fox jumps over the lazy dog.</text></staticText>]]></text> - </staticText> - <staticText> - <reportElement x="0" y="250" width="150" height="40" - uuid="f96f1263-2d31-4eef-951e-2e39ada33878"/> - <textElement> - <font fontName="DejaVu Serif" size="12" isBold="false"/> - </textElement> - <text><![CDATA[The quick brown fox jumps over the lazy dog.]]></text> - </staticText> - <staticText> - <reportElement x="160" y="250" width="390" height="40" - uuid="08fb0715-b6ff-4ea3-ab20-0d4db2be8d77"/> - <text><![CDATA[<staticText><reportElement x="0" y="250" width="150" height="40"/><textElement><font fontName="DejaVu Serif" size="12" isBold="false"/></textElement><text>The quick brown fox jumps over the lazy dog.</text></staticText>]]></text> - </staticText> - <staticText> - <reportElement x="0" y="300" width="150" height="40" - uuid="2fda67e5-3953-44a0-9f88-f0d3dc6d8910"/> - <textElement> - <font fontName="DejaVu Serif" size="12" isBold="true"/> - </textElement> - <text><![CDATA[The quick brown fox jumps over the lazy dog.]]></text> - </staticText> - <staticText> - <reportElement x="160" y="300" width="390" height="40" - uuid="69138007-8118-4689-831a-840627dcd7b6"/> - <text><![CDATA[<staticText><reportElement x="0" y="300" width="150" height="40"/><textElement><font fontName="DejaVu Serif" size="12" isBold="true"/></textElement><text>The quick brown fox jumps over the lazy dog.</text></staticText>]]></text> - </staticText> - <staticText> - <reportElement x="0" y="350" width="150" height="40" - uuid="447870d2-5f05-4764-ad5e-4d3cdf11084b"/> - <textElement> - <font fontName="Monospaced" size="12" isItalic="true" isUnderline="true" - pdfFontName="Courier-Oblique"/> - </textElement> - <text><![CDATA[The quick brown fox jumps over the lazy dog.]]></text> - </staticText> - <staticText> - <reportElement x="160" y="350" width="390" height="40" - uuid="38702e0b-0a84-4a47-896f-361c02ea944e"/> - <text><![CDATA[<staticText><reportElement x="0" y="350" width="150" height="40"/><textElement><font fontName="Monospaced" size="12" isItalic="true" isUnderline="true" pdfFontName="Courier-Oblique"/></textElement><text>The quick brown fox jumps over the lazy dog.</text></staticText>]]></text> - </staticText> - <staticText> - <reportElement x="0" y="400" width="150" height="40" - uuid="9fcbe261-51f6-43b1-8752-11ffc10cc328"/> - <textElement> - <font fontName="Monospaced" size="12" isBold="true" isStrikeThrough="true" - pdfFontName="Courier-Bold"/> - </textElement> - <text><![CDATA[The quick brown fox jumps over the lazy dog.]]></text> - </staticText> - <staticText> - <reportElement x="160" y="400" width="390" height="40" - uuid="dbdf1aa0-5a2e-4c19-a84c-cce0438e7896"/> - <text><![CDATA[<staticText><reportElement x="0" y="400" width="150" height="40"/><textElement><font fontName="Monospaced" size="12" isBold="true" isStrikeThrough="true" pdfFontName="Courier-Bold"/></textElement><text>The quick brown fox jumps over the lazy dog.</text></staticText>]]></text> - </staticText> - <staticText> - <reportElement x="0" y="450" width="150" height="40" forecolor="#FF0000" - uuid="348534b1-c588-4b7a-83b0-957a5332a13a"/> - <textElement> - <font size="14"/> - </textElement> - <text><![CDATA[The quick brown fox jumps over the lazy dog.]]></text> - </staticText> - <staticText> - <reportElement x="160" y="450" width="390" height="40" - uuid="b9386ce9-aa44-4594-8559-3dcbb279a5f3"/> - <text><![CDATA[<staticText><reportElement x="0" y="450" width="150" height="40" forecolor="red"/><textElement><font size="14"/></textElement><text>The quick brown fox jumps over the lazy dog.</text></staticText>]]></text> - </staticText> - <staticText> - <reportElement mode="Opaque" x="0" y="500" width="150" height="40" - forecolor="#00FF00" backcolor="#FFFF00" uuid="ba8b385e-a4e5-4059-9555-d416774e87c4"/> - <textElement> - <font fontName="Serif" size="12" isBold="true" pdfFontName="Times-Bold"/> - </textElement> - <text><![CDATA[The quick brown fox jumps over the lazy dog.]]></text> - </staticText> - <staticText> - <reportElement x="160" y="500" width="390" height="40" - uuid="72ad7c1c-35c8-40ec-b1b8-78527db92baa"/> - <text><![CDATA[<staticText><reportElement x="0" y="500" width="150" height="40" forecolor="green" backcolor="#FFFF00" mode="Opaque"/><textElement><font fontName="Serif" size="12" isBold="true" pdfFontName="Times-Bold"/></textElement><text>The quick brown fox jumps over the lazy dog.</text></staticText>]]></text> - </staticText> - <staticText> - <reportElement mode="Opaque" x="0" y="550" width="150" height="90" - forecolor="#0000FF" backcolor="#FFDD99" uuid="dbce8c34-546e-4351-893a-c1905e5a068e"/> - <textElement textAlignment="Center" verticalAlignment="Middle"> - <font fontName="SansSerif" size="12" isBold="false" isItalic="true" - pdfFontName="Sans.Slanted" isPdfEmbedded="true"/> - </textElement> - <text><![CDATA[The quick brown fox jumps over the lazy dog.]]></text> - </staticText> - <staticText> - <reportElement x="160" y="550" width="390" height="90" - uuid="44f1dc5e-d435-4475-8274-48eb7bc9fead"/> - <text><![CDATA[<staticText><reportElement x="0" y="550" width="150" height="90" forecolor="blue" backcolor="#FFDD99" mode="Opaque"/><textElement textAlignment="Center" verticalAlignment="Middle"><font fontName="SansSerif" size="12" isBold="false" pdfFontName="Sans.Slanted" isPdfEmbedded="true"/></textElement><text>The quick brown fox jumps over the lazy dog.</text></staticText>]]></text> - </staticText> - <staticText> - <reportElement mode="Opaque" x="0" y="650" width="150" height="90" - forecolor="#FF0000" backcolor="#99DDFF" uuid="e5c5b52a-7beb-4381-bd5b-83d8bc848ba3"/> - <textElement textAlignment="Right" verticalAlignment="Bottom"> - <font fontName="SansSerif" size="12" isBold="true" pdfFontName="DejaVu Sans Bold" - isPdfEmbedded="true"/> - </textElement> - <text><![CDATA[The quick brown fox jumps over the lazy dog.]]></text> - </staticText> - <staticText> - <reportElement x="160" y="650" width="390" height="90" - uuid="31894e18-5a34-4419-a66c-c0148dd8bc60"/> - <text><![CDATA[<staticText><reportElement x="0" y="650" width="150" height="90" forecolor="red" backcolor="#99DDFF" mode="Opaque"/><textElement textAlignment="Right" verticalAlignment="Bottom"><font fontName="SansSerif" size="12" isBold="true" pdfFontName="DejaVu Sans Bold" isPdfEmbedded="true"/></textElement><text>The quick brown fox jumps over the lazy dog.</text></staticText>]]></text> - </staticText> - </band> - - \ No newline at end of file diff --git a/src/main/webapp/fonts/sample/fontsConfig.xml b/src/main/webapp/fonts/sample/fontsConfig.xml new file mode 100644 index 0000000000..299c0810c8 --- /dev/null +++ b/src/main/webapp/fonts/sample/fontsConfig.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + +