package com.chinaweal.aiccs.common.provider;//package com.chinaweal.aiccs.common.provider;
//
//import com.itextpdf.text.BaseColor;
//import com.itextpdf.text.DocumentException;
//import com.itextpdf.text.Font;
//import com.itextpdf.text.pdf.BaseFont;
//import com.itextpdf.tool.xml.XMLWorkerFontProvider;
//
//import java.io.IOException;
//
///**
// * @author Lee
// * @since 2021/6/3 10:27
// */
//public class SimsunFontProvider extends XMLWorkerFontProvider {
//    public Font getFont(final String fontname, final String encoding, final boolean embedded,
//                        final float size, final int style, final BaseColor color) {
//        BaseFont bf = null;
//
//        try {
////            bf = BaseFont.createFont("C:\\Windows\\Fonts\\simsun.ttc,1",BaseFont.IDENTITY_H,BaseFont.NOT_EMBEDDED);
//            bf = BaseFont.createFont("c:\\windows\\fonts\\SIMFANG.TTF", BaseFont.IDENTITY_H, BaseFont.NOT_EMBEDDED);
//        } catch (Exception e) {
//            e.printStackTrace();
//        }
//        Font font = new Font(bf,size,style,color);
//        font.setColor(color);
//        return font;
//    }
//}
