Commit 57e3222d by ramdayalmunda

Calibri font added

parent 90f53e1e
......@@ -36,7 +36,7 @@ var ADocEditor = function (customConfig) {
},
style: {
fontSize: 16,
fontFamily: 'Kenia',
fontFamily: 'Calibri',
bold: false,
italic: false,
fontColor: "#001"
......@@ -149,7 +149,7 @@ var ADocEditor = function (customConfig) {
</div>
`
addFonts(["./assets/fonts/customfont.woff", "./assets/fonts/customfont.ttf"], 'customfont')
addFonts(["./assets/fonts/Calibri.ttf"], 'Calibri')
addFonts(["./assets/fonts/Kenia-Regular.ttf"], 'Kenia')
container.innerHTML = htmlSetup
......@@ -438,7 +438,6 @@ var ADocEditor = function (customConfig) {
}else{
caretData.style = { ...caretData.activeData.style }
}
// fontFamilyDropdown.value = caretData.style.fontFamily
ctx.restore()
}
......@@ -775,7 +774,7 @@ var ADocEditor = function (customConfig) {
format = format[format.length-1]
linkString += `url(${paths[i]}) format("${format=='ttf'?'truetype':format}")${(i>=paths.length-1)?'':',\n'}`
}
const customFont = new FontFace('YourCustomFont', `${linkString}`);
const customFont = new FontFace(`${name}`, `${linkString}`);
customFont.load()
.then( (loadedFont)=>{
document.fonts.add(loadedFont);
......
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