SegoeuiiBirt
フォント ファミリをテキストに定義したレポートを作成しましたが、Windows では問題なく動作しますが、Unix OS の場合、すべてのフォントがTimes new Romanに変更されます。 Unixファイルシステムであり、ファイルシステムにないフォントを登録しないため、最初にフォントを登録する必要があるため、フォントを登録してから、このフォントをプロパティに設定しますが、それでもTimes new Romanを表示します。
これが私のコードです。 Birt
FontFactory
public void testCode() {
URL font = Thread.currentThread().getContextClassLoader().getResource("segoeuii.ttf"); // getResourceAsStream("segoeuii.ttf");
TextItemHandle text = (TextItemHandle) designHandle.findElement("TextProbingAttacks");
FontFactory.register(font.toString(), "test_font");
Font myfont = FontFactory.getFont("test_font");
try {
text.setProperty("fontFamily", myfont);
} catch (SemanticException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}