title: Jasper reports font size issue exporting to pdf
body: <p>I'm using Jaspersoft Studio 5.6.</p>
  
  <p>It displays correctly in Jaspersoft Studio in Design view. In Preview view it is also correctly displayed (using java or pdf).<br/>
  When I execute the report from my Java application the three texts are displayed at the same size.</p>
  
  <p>I noticed that Bold and Italic works fine but if I change the font (DejaVu, Arial, Times new roman, etc) that is also ignored. In the report generated by my application I always get the same font.</p>
  
  <p>What is failing? Am I forgetting any configuration option?</p>
  
  <p>The example mixes static fields and text fields just to test.</p>
  
  <p>EDIT:</p>
  
  <p>It seems like I found a "solution" (wich has side effects).</p>
  
  <p>I was generating the report like this:</p>
  
  <pre><code>JasperRunManager.runReportToPdfStream(stream, outStream, params, datasource);
  </code></pre>
  
  <p>Now, generating in this way the size of the texts are correct in the generated pdf:</p>
  
  <pre><code>JasperReport jasperReport = JasperCompileManager.compileReport("my/report.jrxml");
  JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, params, datasource);
  JasperExportManager.exportReportToPdfStream(jasperPrint, outStream);
  </code></pre>
  
  <p>The font type however is not correct.</p>
  
  <p>The side effect, I think, is that JasperRunManager.runReportToPdfStream does not load the report into memory while <code>JasperFillManager.fillReport</code> does.</p>
  
  <p>Any idea about why <code>JasperRunManager.runReportToPdfStream</code> ignores the font size?</p>
  
  <p>Any idea about why the other way is ignoring the font type? Both JSS and my java application are on the same Windows machine (so the fonts must be available to both).</p>
  
  <p>Any advise to avoid loading into memory the whole report?</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="subinforme_pag_1" pageWidth="802" pageHeight="552" orientation="Landscape" columnWidth="802" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="c6f5d08f-f28b-4c77-8523-5cf4746cdcf2"&gt;
      &lt;queryString language="SQL"&gt;
          &lt;![CDATA[]]&gt;
      &lt;/queryString&gt;
      &lt;detail&gt;
          &lt;band height="551" splitType="Stretch"&gt;
              &lt;textField&gt;
                  &lt;reportElement x="0" y="80" width="180" height="40" uuid="50721cba-c082-47de-9abf-effcf1b784dd"&gt;
                      &lt;property name="local_mesure_unitheight" value="pixel"/&gt;
                  &lt;/reportElement&gt;
                  &lt;textElement textAlignment="Center" verticalAlignment="Middle"&gt;
                      &lt;font fontName="SansSerif" size="4"/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA["Text Field (size 4)"]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;textField&gt;
                  &lt;reportElement x="0" y="0" width="180" height="40" uuid="05c5129f-f29e-47a1-ad82-4547b51e3d56"/&gt;
                  &lt;textElement textAlignment="Center" verticalAlignment="Middle"&gt;
                      &lt;font fontName="SansSerif" size="16"/&gt;
                  &lt;/textElement&gt;
                  &lt;textFieldExpression&gt;&lt;![CDATA["Text Field (Size 16)"]]&gt;&lt;/textFieldExpression&gt;
              &lt;/textField&gt;
              &lt;staticText&gt;
                  &lt;reportElement x="0" y="40" width="180" height="40" uuid="5c69d29b-b168-408d-89aa-c6d527f0cae1"&gt;
                      &lt;property name="local_mesure_unitwidth" value="pixel"/&gt;
                      &lt;printWhenExpression&gt;&lt;![CDATA[$V{REPORT_COUNT} == 1]]&gt;&lt;/printWhenExpression&gt;
                  &lt;/reportElement&gt;
                  &lt;textElement textAlignment="Center" verticalAlignment="Middle"&gt;
                      &lt;font fontName="SansSerif" size="8" isBold="false"/&gt;
                  &lt;/textElement&gt;
                  &lt;text&gt;&lt;![CDATA[Static Text (Size 8)]]&gt;&lt;/text&gt;
              &lt;/staticText&gt;
          &lt;/band&gt;
      &lt;/detail&gt;
  &lt;/jasperReport&gt;
  </code></pre>