Skip to content

Commit

Permalink
[ve] Add unknown fonts to LoadDocumentFonts
Browse files Browse the repository at this point in the history
  • Loading branch information
konovalovsergey committed Nov 30, 2024
1 parent 1806a32 commit 330758b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions draw/model/VisioDocument.js
Original file line number Diff line number Diff line change
Expand Up @@ -379,15 +379,15 @@
let newFontStartIndex = 2;
this.faceNames.forEach(function (faceName_Type) {
let nameU = faceName_Type.nameU;
aFonts.push(new AscFonts.CFont(nameU, newFontStartIndex, "", 0));
newFontStartIndex += 1;
let fontInfo = api.FontLoader.fontInfos.find(function(cFontInfo) {
return cFontInfo.Name === nameU;
});
if (fontInfo === undefined || fontInfo === null) {
AscCommon.consoleLog("Unknown font used in visio file: " + nameU);
} else {
AscCommon.consoleLog("Font" + nameU + "will be loaded");
aFonts.push(new AscFonts.CFont(nameU, newFontStartIndex, "", 0));
newFontStartIndex += 1;
}
});

Expand Down

0 comments on commit 330758b

Please sign in to comment.