Add several fonts

This commit is contained in:
Paulo Gustavo Veiga 2022-01-03 14:11:22 -08:00
parent 849eabeb07
commit e25f67a554

View File

@ -22,14 +22,12 @@ class FontFamilyPanel extends ListToolbarPanel {
// eslint-disable-next-line class-methods-use-this // eslint-disable-next-line class-methods-use-this
buildPanel() { buildPanel() {
const content = $("<div class='toolbarPanel' id='fontFamilyPanel'></div>"); const content = $("<div class='toolbarPanel' id='fontFamilyPanel'></div>");
content.html( const list = ['Arial', 'Baskerville', 'Tahoma', 'Limunari', 'Brush Script MT', 'Verdana', 'Times', 'Cursive', 'Fantasy', 'Perpetua', 'Brush Script', 'Copperplate']
'<div id="times" model="Times" class="toolbarPanelLink" style="font-family:times;">Times</div>' .sort()
+ '<div id="arial" model="Arial" style="font-family:arial;">Arial</div>' .map((f) => `<div model="${f}" class="toolbarPanelLink" style="font-family:${f};">${f}</div>`)
+ '<div id="tahoma" model="Tahoma" style="font-family:tahoma;">Tahoma</div>' .join('\n');
+ '<div id="tahoma" model="Luminari" style="font-family:Luminari">Luminari</div>'
+ '<div id="tahoma" model="Brush Script MT" style="font-family:\'Brush Script MT\';">Brush Script</div>' content.html(list);
+ '<div id="verdana" model="Verdana" style="font-family:verdana;">Verdana</div>',
);
return content; return content;
} }
} }