12345678910111213141516171819202122 |
- /**
- * Created by Tony on 2018/8/2.
- */
- let fontMapObj = {
- "宋体": "simsun_1"
- ,"楷体": "simkai"
- ,"黑体": "simhei"
- // ,"Arial": "arial"
- };
- // 目前不支持下划线
- module.exports = {
- getActualFont: getActualFont
- }
- function getActualFont(mapName, isBold, isItalic) {
- let rst = "simsun_1";
- if (fontMapObj[mapName]) rst = fontMapObj[mapName];
- rst = rst + (isBold?"_bold":"") + (isItalic?"_italic":"");
- return rst;
- }
|