字体转PNG工具 适合手机端查看特殊字体

字体转PNG工具 适合手机端查看特殊字体

PhantomJS 截屏工具 附带JAVA代码

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;

public class PhantomJS {

    public static String getSrcContent(String content,int size,String family,String color) {

        // windowsphantomjs
        String path = "D:/phantomjs-2.0.0-windows/";

        Runtime rt = Runtime.getRuntime();
        Process process = null;
        try {
            process = rt.exec(path + "phantomjs.exe D:/phantomjs-2.0.0-windows/test.js template.html");
        } catch (IOException e) {
            e.printStackTrace();
        }
        InputStream is = process.getInputStream();  
        BufferedReader br = new BufferedReader(new InputStreamReader(is));
        StringBuffer sbf = new StringBuffer();
        String tmp = "";
        try {
            while((tmp = br.readLine())!=null){
                sbf.append(tmp);
            }
        } catch (IOException e) {
            e.printStackTrace();
        }

        return sbf.toString();
    }
    public static void main(String[] args) {
        PhantomJS.getSrcContent("",12,"KaiTi","red");
    }
}

图片裁剪、处理工具 ImageMagick

评论

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×