Closed DD-A-YAN closed 5 years ago
Hi, You'll have to set up rules for converting each of the fonts that you're using in Illustrator to HTML/CSS equivalents.
Here's how you can do it:
ai2html-config.json
.ai2html.js
script, or in the same directory as your .ai document.Here is an example of the data you need to put in the config file:
{
"fonts": [{"aifont":"AdobeSongStd-Light","family":"SimSun,STSong,宋体,华文宋体,serif","weight":"","style":""}]
}
If you are not sure of the name to use for "aifont", ai2html should list the AI names of all the fonts that don't have rules, in the message that pops up after you run the script.
If you are not sure of the HTML font names, this article might help: http://www.kendraschaefer.com/2012/06/chinese-standard-web-fonts-the-ultimate-guide-to-css-font-family-declarations-for-web-design-in-simplified-chinese/
Thanks! I have solved the problem through your answer.
I don't how to use Chinese fonts in ai2html, can you tell me?