Solutions:
In Java environments above JRE 5, Java automatically loads the fonts under the $JAVA_HOME/ JRE /lib/ Fonts directory. Link or copy text or Microsoft yahei fonts to this directory to solve.
For example, if Java application is deployed in Docker container, font files need to be put into the corresponding directory when building the image, as follows
1. Create a new directory under Project Resources, TTF, and put the font file into the directory
2. Add configuration to the Maven plug-in Docker-Maven-Plugin in poM configuration
configuration.resources
< resource>
& lt; targetPath> /< /targetPath>
& lt; directory> ${project.build.outputDirectory}< /directory> < ! — Resource directory –& GT;
& lt; include> ttf/*< /include> < ! — The font file in the TTF directory that the program depends on –& GT;
< /resource> # font file
ADD the vera.ttf/* $JAVA_HOME/jre/lib/fonts/fallback/
3. DockerFile new are as follows
# font file
ADD the vera.ttf/* $JAVA_HOME/jre/lib/fonts/fallback
Fonts files can be downloaded from the web. The Windows environment Fonts file is located in the directory C:\Windows\ \Fonts\; you can also get the corresponding font files
Extension :(if the server has installed the corresponding font, the jre directory can not put the font file)
The Linux server installs fonts
01. Install font related software packages
yum install -y fontconfig mkfontscale
02, copy fonts to the specified directory
cp simsun.ttc /usr/share/fonts/
Mkfontscale // font extension
mkfontdir // new font directory
fc-cache-fv // refresh cache
03. Verify font installation
fc-list //” song style “Chinese font has been installed successfully
Read More:
- The Vue project is packaged and deployed to tomcat, and an Error 404 is reported as soon as it is refreshed
- Solution to the problem that some special characters in finereport cannot be displayed or displayed as question mark
- Rviz global status is displayed as the problem resolution of error
- When a system is deployed on weblogic12.2.1.3, it reports an error “IllegalStateException zip file closed”. When it is deployed on weblogic12.2.1.2, it does not report an error and can be accessed normally.
- It will appear as soon as it is turned on BTServer.exe -Application error (0xc0150002)
- After node.js is installed, use the instruction node version in vscode to show that it is not an external or internal instruction. The solution is as follows:
- The icon on the layui page is not displayed, and an error message is reported: Failed to decode downloaded font …..
- In machine learning, the prediction errors in sklearn, such as mean square error, etc
- Bug001: error in gradle configuration environment variable: ERROR:JAVA_ Home is set to an invalid directory!
- C / C + + cannot open the source file directory, the header file is not imported, the solution is as follows
- IOS automation: error dyld in Xcode compilation_ shared_ cache_ extract_ Dylibs failed — the solution is as follows
- An error is displayed when virtualbox uses modifyhd command to expand capacity: Resize medium operation for this format is not implemented yet
- Error 0210: stick key 28 is displayed when ThinkPad E40 is turned on
- After the vs2013 + OpenGL environment is set up, there is an error in running the first program
- Vs code solves the problem that latex does not display references and [?] is displayed in the text
- In Java, int is converted to string, and zero is added before the number of bits is insufficient
- Could not find appears when JDK is configured java.dll Could not find Java se runtime environment problems
- Ror deployed to heroku has application error and code = H10 desc = “app crashed” problems
- Solution to the problem that listen TCP 0.0.0.0:3306: bind: address already in use port is occupied in Linux centos7
- Solution windowserror: [error 193]% 1 is not a valid Win32 Application