-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontent.json
More file actions
1 lines (1 loc) · 3.01 KB
/
content.json
File metadata and controls
1 lines (1 loc) · 3.01 KB
1
{"meta":{"title":"MyWebsite","subtitle":"","description":"","author":"鹰仓杏铃","url":"https://github.com/CodeEngieer/CodeEngineer.github.io.git","root":"/CodeEngineer.github.io/"},"pages":[{"title":"404","text":"","path":"404/index.html","date":"03-13","excerpt":""},{"title":"search","text":"","path":"search/index.html","date":"03-13","excerpt":""}],"posts":[{"title":"商务办公软件总结","text":"2022年3月14日15:59:30刚刚测试过,上传到GitHub项目。 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748//使用方法:InitGlobalFont(font); //统一设置字体//自定义字体: String root=System.getProperty("user.dir"); String fontname = "Droid Serif"; Font font =Loadfont.loadFont(root+"WorkFont/萝莉体.ttc", 16f); //填入字体位置,修改这个位置/*package FontDemo;import java.io.*;import java.awt.*;public class Loadfont{public static Font loadFont(String fontFileName, float fontSize){ //第一个参数是外部字体名,第二个是字体大小{ trytry{ File file = new File("C:\\\\Users\\\\Government\\\\MyEclipse\\\\Demo测试代码\\\\WorkFont\\\\萝莉体.ttc"); //修改这个位置 FileInputStream aixing = new FileInputStream(file); Font dynamicFont = Font.createFont(Font.TRUETYPE_FONT, aixing); Font dynamicFontPt = dynamicFont.deriveFont(fontSize); aixing.close(); return dynamicFontPt; } catch(Exception e)//异常处理 { e.printStackTrace(); return new java.awt.Font("宋体", Font.PLAIN, 12); } } public static java.awt.Font Font(){ String root=System.getProperty("user.dir");//项目根目录路径 System.out.println(root); Font font = Loadfont.loadFont(root+"/WorkFont萝莉体.ttc", 12f);//调用,修改这个位置 return font;//返回字体 } }/** * 统一设置字体,父界面设置之后,所有由父界面进入的子界面都不需要再次设置字体常见错误io FileNotFound 文件名不规范反斜杠 */private static void InitGlobalFont(Font font) { FontUIResource fontRes = new FontUIResource(font); for (Enumeration<Object> keys = UIManager.getDefaults().keys(); keys.hasMoreElements();) { Object key = keys.nextElement(); Object value = UIManager.get(key); if (value instanceof FontUIResource) { UIManager.put(key, fontRes); } }}}","path":"2022/03/14/商务办公软件总结/","date":"03-14","excerpt":"","tags":[]},{"title":"Hello World","text":"Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub. Quick StartCreate a new post1$ hexo new "My New Post" More info: Writing Run server1$ hexo server More info: Server Generate static files1$ hexo generate More info: Generating Deploy to remote sites1$ hexo deploy More info: Deployment","path":"2022/03/12/hello-world/","date":"03-12","excerpt":"","tags":[]}],"categories":[],"tags":[]}