cancel
Showing results for 
Search instead for 
Did you mean: 

ProcessDiagram doesn't display unicode character properly

sherlockq
Champ in-the-making
Champ in-the-making
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);
    g.setPaint(Color.black);

    Font font = new Font("Arial", Font.BOLD, 11);
    g.setFont(font);
    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.
1 REPLY 1

sebastian_s
Champ in-the-making
Champ in-the-making
Seems to me as if you should fill a JIRA issue for this.