AnsweredAssumed Answered

ProcessDiagram doesn't display unicode character properly

Question asked by sherlockq on Feb 29, 2012
Latest reply on Feb 29, 2012 by sebastian.s
In our project we need to show a process diagram and some activity's display name is non-alphabet like Chinese character. And they are not rendered properly till version 5.8.

I suppose the reason for that is a hardcoded font set in ProcessDiagramCanvas and Arial font only supports ascii characters.

   * Creates an empty canvas with given width and height.
  public ProcessDiagramCanvas(int width, int height) {
    this.canvasWidth = width;
    this.canvasHeight = height;
    this.processDiagram = new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB);
    this.g = processDiagram.createGraphics();
    g.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);

    Font font = new Font("Arial", Font.BOLD, 11);
    this.fontMetrics = g.getFontMetrics();

I'd like to ask for such features:
1. Font can be set through engine configuration.
2. Or at least add a constructor to ProcessDiagram to support font injection, and make changes to ProcessDiagramGenerator to support that.

Thank you.