Commit 0f7f1f5a authored by 李驰骋's avatar 李驰骋

UReport添加新字体

parent aa1ce55f
package com.ximai.web.core.config;
import com.bstek.ureport.definition.datasource.BuildinDatasource;
import com.bstek.ureport.export.pdf.font.FontRegister;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import javax.annotation.Resource;
......@@ -35,5 +37,36 @@ public class UReportConfig implements BuildinDatasource {
}
return null;
}
@Bean
public FontRegister fontRegister() {
return new FontRegister() {
@Override
public String getFontName() {
return "ThaiSans";
}
@Override
public String getFontPath() {
return "reports/fonts/thaisansneue-regular-webfont.ttf";
}
};
}
@Bean
public FontRegister fontRegister2() {
return new FontRegister() {
@Override
public String getFontName() {
return "Arial Narrow";
}
@Override
public String getFontPath() {
return "reports/fonts/ARIALN.ttf";
}
};
}
}
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment