Changing the font of the text.
<p><span style="color:rgb(36,39,41);font-family:Arial, 'Helvetica Neue', Helvetica, sans-serif;font-size:15px;">I have created a </span>Birt<span style="color:rgb(36,39,41);font-family:Arial, 'Helvetica Neue', Helvetica, sans-serif;font-size:15px;"> report in which I defined a </span><em>Segoeuii</em><span style="color:rgb(36,39,41);font-family:Arial, 'Helvetica Neue', Helvetica, sans-serif;font-size:15px;"> font-family to the text it works fine in windows but when it come of Unix OS it change all the fonts to the </span><em>Times new Roman</em><span style="color:rgb(36,39,41);font-family:Arial, 'Helvetica Neue', Helvetica, sans-serif;font-size:15px;"> it is somehow because the font is not present in the Unix file system and </span>Birt<span style="color:rgb(36,39,41);font-family:Arial, 'Helvetica Neue', Helvetica, sans-serif;font-size:15px;"> does not register the font that is not in the file system so we need to register the fonts first so using </span>FontFactory<span style="color:rgb(36,39,41);font-family:Arial, 'Helvetica Neue', Helvetica, sans-serif;font-size:15px;"> I register the font and than set this font in the property but still it displaying </span><em>Times new Roman</em><span style="color:rgb(36,39,41);font-family:Arial, 'Helvetica Neue', Helvetica, sans-serif;font-size:15px;"> .</span><br><span style="color:rgb(36,39,41);font-family:Arial, 'Helvetica Neue', Helvetica, sans-serif;font-size:15px;">Here is my code.</span></p>
<p> </p>
<p><span style="font-family:Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;margin:0px;color:rgb(16,16,148);"> public</span><span style="font-family:Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;margin:0px;color:rgb(48,51,54);"> </span><span style="font-family:Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;margin:0px;color:rgb(16,16,148);">void</span><span style="font-family:Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;margin:0px;color:rgb(48,51,54);"> testCode</span><span style="font-family:Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;margin:0px;color:rgb(48,51,54);">()</span><span style="font-family:Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;margin:0px;color:rgb(48,51,54);"> </span><span style="font-family:Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, sans-serif;margin:0px;color:rgb(48,51,54);">{</span></p>
<p><span style="margin:0px;color:rgb(48,51,54);"> URL font </span><span style="margin:0px;color:rgb(48,51,54);">=</span><span style="margin:0px;color:rgb(48,51,54);"> </span><span style="margin:0px;color:rgb(43,145,175);">Thread</span><span style="margin:0px;color:rgb(48,51,54);">.</span><span style="margin:0px;color:rgb(48,51,54);">currentThread</span><span style="margin:0px;color:rgb(48,51,54);">().</span><span style="margin:0px;color:rgb(48,51,54);">getContextClassLoader</span><span style="margin:0px;color:rgb(48,51,54);">().</span><span style="margin:0px;color:rgb(48,51,54);">getResource</span><span style="margin:0px;color:rgb(48,51,54);">(</span><span style="margin:0px;color:rgb(125,39,39);">"segoeuii.ttf"</span><span style="margin:0px;color:rgb(48,51,54);">);</span><br><span style="margin:0px;color:rgb(43,145,175);"> TextItemHandle</span><span style="margin:0px;color:rgb(48,51,54);"> text </span><span style="margin:0px;color:rgb(48,51,54);">=</span><span style="margin:0px;color:rgb(48,51,54);"> </span><span style="margin:0px;color:rgb(48,51,54);">(</span><span style="margin:0px;color:rgb(43,145,175);">TextItemHandle</span><span style="margin:0px;color:rgb(48,51,54);">)</span><span style="margin:0px;color:rgb(48,51,54);"> designHandle</span><span style="margin:0px;color:rgb(48,51,54);">.</span><span style="margin:0px;color:rgb(48,51,54);">findElement</span><span style="margin:0px;color:rgb(48,51,54);">(</span><span style="margin:0px;color:rgb(125,39,39);">"TextProbingAttacks"</span><span style="margin:0px;color:rgb(48,51,54);">);</span><br><span style="margin:0px;color:rgb(43,145,175);"> FontFactory</span><span style="margin:0px;color:rgb(48,51,54);">.</span><span style="margin:0px;color:rgb(16,16,148);">register</span><span style="margin:0px;color:rgb(48,51,54);">(</span><span style="margin:0px;color:rgb(48,51,54);">font</span><span style="margin:0px;color:rgb(48,51,54);">.</span><span style="margin:0px;color:rgb(48,51,54);">toString</span><span style="margin:0px;color:rgb(48,51,54);">(),</span><span style="margin:0px;color:rgb(48,51,54);"> </span><span style="margin:0px;color:rgb(125,39,39);">"test_font"</span><span style="margin:0px;color:rgb(48,51,54);">);</span><br><span style="margin:0px;color:rgb(43,145,175);"> Font</span><span style="margin:0px;color:rgb(48,51,54);"> myfont </span><span style="margin:0px;color:rgb(48,51,54);">=</span><span style="margin:0px;color:rgb(48,51,54);"> </span><span style="margin:0px;color:rgb(43,145,175);">FontFactory</span><span style="margin:0px;color:rgb(48,51,54);">.</span><span style="margin:0px;color:rgb(48,51,54);">getFont</span><span style="margin:0px;color:rgb(48,51,54);">(</span><span style="margin:0px;color:rgb(125,39,39);">"test_font"</span><span style="margin:0px;color:rgb(48,51,54);">);</span><br><span style="margin:0px;color:rgb(16,16,148);"> try</span><span style="margin:0px;color:rgb(48,51,54);"> </span><span style="margin:0px;color:rgb(48,51,54);">{</span><br><span style="margin:0px;color:rgb(48,51,54);"> text</span><span style="margin:0px;color:rgb(48,51,54);">.</span><span style="margin:0px;color:rgb(48,51,54);">setProperty</span><span style="margin:0px;color:rgb(48,51,54);">(</span><span style="margin:0px;color:rgb(125,39,39);">"fontFamily"</span><span style="margin:0px;color:rgb(48,51,54);">,</span><span style="margin:0px;color:rgb(48,51,54);"> myfont</span><span style="margin:0px;color:rgb(48,51,54);">);</span><br><span style="margin:0px;color:rgb(48,51,54);"> }</span><span style="margin:0px;color:rgb(48,51,54);"> </span><span style="margin:0px;color:rgb(16,16,148);">catch</span><span style="margin:0px;color:rgb(48,51,54);"> </span><span style="margin:0px;color:rgb(48,51,54);">(</span><span style="margin:0px;color:rgb(43,145,175);">SemanticException</span><span style="margin:0px;color:rgb(48,51,54);"> e</span><span style="margin:0px;color:rgb(48,51,54);">)</span><span style="margin:0px;color:rgb(48,51,54);"> </span><span style="margin:0px;color:rgb(48,51,54);">{</span><br><span style="margin:0px;color:rgb(133,140,147);"> // TODO Auto-generated catch block</span><br><span style="margin:0px;color:rgb(48,51,54);"> e</span><span style="margin:0px;color:rgb(48,51,54);">.</span><span style="margin:0px;color:rgb(48,51,54);">printStackTrace</span><span style="margin:0px;color:rgb(48,51,54);">();</span><br><span style="margin:0px;color:rgb(48,51,54);"> }</span><br><span style="margin:0px;color:rgb(48,51,54);"> }</span></p>
<p> </p>
<p><span style="margin:0px;color:rgb(48,51,54);"><span style="font-size:12px;">But later I </span>found</span>Birt<span style="color:rgb(36,39,41);font-size:13px;"> is just showing </span>Times new Roman<span style="color:rgb(36,39,41);font-size:13px;"> whether the font is in filesystem or not. This problem is with the Unix specifically Ubuntu 14.04.</span></p>
<p> </p>
<p><span style="color:rgb(36,39,41);font-size:13px;">Anybody faces this issue ?</span></p>