OrwellHindenberg
OrwellHindenberg

Reputation: 5078

Why wont my text change size?

I am using Jaspersoft Studio and am attempting to do what should be one of the simplest tasks, resize a static text element. However no matter what means I think of to try and change the text size it stays the default size.

Here is the .jrxml code I am using for one such static text element

<staticText>
            <reportElement mode="Opaque" x="0" y="0" width="700" height="40" forecolor="#00B050" uuid="52a12b2e-4819-44b4-8d51-047fd668e28c">
                <property name="local_mesure_unitx" value="pixel"/>
                <property name="com.jaspersoft.studio.unit.x" value="px"/>
                <property name="local_mesure_unity" value="pixel"/>
                <property name="com.jaspersoft.studio.unit.y" value="px"/>
                <property name="local_mesure_unitwidth" value="pixel"/>
                <property name="com.jaspersoft.studio.unit.width" value="px"/>
                <property name="local_mesure_unitheight" value="pixel"/>
                <property name="com.jaspersoft.studio.unit.height" value="px"/>
            </reportElement>
            <textElement textAlignment="Left">
                <font size="18" isBold="true"/>
            </textElement>
            <text><![CDATA[Supportive Services]]></text>
        </staticText>

Attached is also an image of where I've set the font size using the editor. enter image description here

After making these changes the text is still the default size. Here is an image of the resulting report... enter image description here

Does anyone know why this is happening? Is there some sort of global text setting in Jaspersoft Studio or JasperReports in general that I am forgetting?

Upvotes: 0

Views: 4132

Answers (1)

Darshan Lila
Darshan Lila

Reputation: 5868

You would need to create a font extension for the fonts you want to use. The reason behind this is that JVM does not get the fonts you want to use at runtime, hence it takes the fonts it has with it (Arial in most cases).

Upvotes: 1

Related Questions