AnsweredAssumed Answered

Any reason not using logical font in ProcessDiagramCanvas?

Question asked by steve1 on May 12, 2012
Hi,

I'm using ProcessDiagramGenerator.generateDiagram to display process image,
but Asian charactres are not shown.

After investigating forum and source code, I found that the ProcessDiagramCanvas uses physical font.

Is there any reason not using logical font?

Below is a quote from Java Doc.

Logical fonts are the five font families defined by the Java platform which must be supported by any Java runtime environment: Serif, SansSerif, Monospaced, Dialog, and DialogInput. These logical fonts are not actual font libraries. Instead, the logical font names are mapped to physical fonts by the Java runtime environment. The mapping is implementation and usually locale dependent, so the look and the metrics provided by them vary. Typically, each logical font name maps to several physical fonts in order to cover a large range of characters.

Peered AWT components, such as Label and TextField, can only use logical fonts.

For a discussion of the relative advantages and disadvantages of using physical or logical fonts, see the Internationalization FAQ document.

Related post:
http://forums.activiti.org/en/viewtopic.php?f=6&t=3553&hilit=ProcessDiagramGenerator
http://forums.activiti.org/en/viewtopic.php?f=6&t=2648&hilit=ProcessDiagramGenerator

If logical font(like Font.SANS_SERIF) can be set, these issue will be resolved.

Thanks.

Outcomes