cancel
Showing results for 
Search instead for 
Did you mean: 

activiti-rest process diagram can't show chinese character well?

dylanblue
Champ on-the-rise
Champ on-the-rise

when I access the restful api: runtime/process-instance/{process-instanceid}}/diagram

why the diagram can't display Chinese character well?how to fixed it ? thanks.

so does the app-admin war.

5 REPLIES 5

salaboy
Star Collaborator
Star Collaborator

There might be several problems here. 

Which version are you using? 

One problem might be the default encoding of the JVM where you are running activiti. Are you changing the encoding? 

Can you check which encoding are you using? 

dylanblue
Champ on-the-rise
Champ on-the-rise

the version is 6.0.0

I didn't change the default encoding of the jvm;

but the activiti-app can display chinese well in web page.

i have searched on the internet that it may be the default font problem.

can you tell me how to configure the font name when the process diagram generated?

salaboy
Star Collaborator
Star Collaborator

Hi Dylan, that's probably in this project: Activiti/modules/activiti-image-generator at 6.x · Activiti/Activiti · GitHub 

Not sure if the font is configurable, but that sounds like a great community contribution. 

Hope that helps. 

dylanblue
Champ on-the-rise
Champ on-the-rise

I have found the source code to change font name.but it's not configurable.

I have just change the font name from "Arial " to "宋体" in the class "

ProcessEngineConfiguration".

Thank you for advice.

salaboy
Star Collaborator
Star Collaborator

We will appreciate if you submit a PR with your fix to our Github repo, so other community members can benefit from that, it is also good to boost your community profile Smiley Happy