Add a new fonts parameter for HTML-CSS to simplify font configuration.
This commit is contained in:
parent
4ea4816553
commit
36194fe36a
|
@ -370,7 +370,7 @@
|
|||
if (this.adjustAvailableFonts) {this.adjustAvailableFonts(config.availableFonts)}
|
||||
if (settings.scale) {config.scale = settings.scale}
|
||||
if (font && font !== "Auto" && this.fontName[font]) {
|
||||
config.availableFonts = [];
|
||||
config.availableFonts = []; delete config.fonts;
|
||||
if (this.fontName[font] instanceof Array) {
|
||||
config.preferredFont = this.fontName[font][0];
|
||||
config.webFont = this.fontName[font][1];
|
||||
|
@ -379,6 +379,11 @@
|
|||
}
|
||||
if (config.preferredFont) {config.availableFonts[0] = config.preferredFont}
|
||||
}
|
||||
if (config.fonts) {
|
||||
config.availableFonts = config.fonts;
|
||||
config.preferredFont = config.webFont = config.fonts[0];
|
||||
if (config.webFont === "STIX") {config.webFont += "-Web"}
|
||||
}
|
||||
font = this.Font.findFont(config.availableFonts,config.preferredFont);
|
||||
if (!font && this.allowWebFonts) {font = config.webFont; if (font) {this.webFonts = true}}
|
||||
if (!font && this.config.imageFont) {font = config.imageFont; this.imgFonts = true}
|
||||
|
|
Loading…
Reference in New Issue
Block a user