Class ReportFonts

java.lang.Object
io.leandev.appfuse.report.ReportFonts

public final class ReportFonts extends Object

renderer 使用的字型登錄;不可變,可在多執行緒共用

文件以邏輯家族名稱(TextStyle.fontFamily)引用字型。每個家族的每個字面列出一條 fallback 鏈, render 時逐字選擇第一個含該字元的字型;所有字型都缺字時以 □(U+25A1)替代。

ReportFonts fonts = ReportFonts.builder()
        .family("sans", f -> f
                .regular(FontSource.file(latinRegular), FontSource.file(cjkRegular))
                .bold(FontSource.file(latinBold), FontSource.file(cjkBold)))
        .defaultFamily("sans")
        .build();
Since:
4.0.0