- A+
宽
//会有负
//System.out.println(i+"\t"+"\n" +
// "字宽:"+(byteWidth-7*2/2)+"\t"+
// "字体:"+fontName+"\t"+
// "字号:"+fontSize+"\t"+
// "行距:"+Integer.toHexString(fontSize*2/3).replaceAll("f", "0"));
//System.out.println(i+"字宽:"+(byteWidth-7*2/2));
if((byteWidth-7*2/2)>=-13 || (byteWidth-7*2/2)<=-3){
System.out.println(i+"\t"+"\n" +
"字宽:"+(byteWidth-7*2/2)+"\t"+
"字体:"+fontName+"\t"+
"字号:"+fontSize+"\t"+
"行距:"+Integer.toHexString(fontSize*2/3).replaceAll("f", "0"));
System.out.println(i+"字宽:"+(byteWidth-7*2/2));
}
}
} catch (FileNotFoundException e1) {
e1.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (FontFormatException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public static void main(String[] args) {
FontUtils fontUtils = new FontUtils();
//fontUtils.generateFontStr();
fontUtils.ceilFontWidth();
}
}
- 微信在线客服
- 这是我的微信扫一扫
-
- 我的微信公众号
- 扫一扫码上服务
-





