cancel
Showing results for 
Search instead for 
Did you mean: 

probe and explorer show process picture problem

greenwood
Champ in-the-making
Champ in-the-making
hi

Task Name in my process file was Chinese , and in probe and explorer ,the picture has some problem when it show up .

I upload my picture below :
13 REPLIES 13

greenwood
Champ in-the-making
Champ in-the-making
hi

I changed the font in "ProcessDiagramCanvas"  and put my font file in JVM , now it can support chinese , but the picture still show the diagram with wrong flow and waypoings ,  just as jira : ACT-629 listed.

herist
Champ in-the-making
Champ in-the-making
You could download ProcessDiagramCanvas.java and ProcessDiagramGenerator.java from  http://svn.codehaus.org/activiti/activiti/trunk/modules/activiti-engine/src/main/java/org/activiti/e....

Then modify the ProcessDiagramCanvas.java like this:

  /**
   * 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("微软雅黑", Font.PLAIN, 12);
   
    g.setFont(font);
    this.fontMetrics = g.getFontMetrics();
  }

Just change the font,the process diagram will be Ok ^_^

andymao
Champ in-the-making
Champ in-the-making
hi greenwood,
I have the same problem with you , can you tell more details on how to put fonts into jre environment. Your help well very appreciated!
Thanks!

stormsky
Champ in-the-making
Champ in-the-making
to change the font is not a good method.
is there anyone who solves the problem in other way?